Lets say I have a method:
public function createFoo(Foo $foo, $isPremiumFoo=false);
In hindsight, it was a little silly to have that $isPremiumFoo
flag argument hanging off the end. So we moved it into Foo
and now I'd like to remove it from the method signature. But I don't want to do it all at once since this is a public method and is out in the wild being used. I'd like to @deprecate
it to alert users to the fact that they should stop using it and then eventually remove it. Since you can't overload methods in PHP, how can I deprecate just that method argument and not the entire method?