You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When feature is enabled, then we can weak arguments for original methods and implement different advices that will be able to handle such arguments like ParamConverter from the Symfony.
Possible usage: automatic injection of value for tests, handling custom proxies, etc...
The text was updated successfully, but these errors were encountered:
Since we are using inheritance, we are unable to remove parameters from method signature - I am for that option (unfortunately, it is impossible to do it like in example below):
class A_AopProxied
{
publicmethod foo(ParamType $value, ParamOtherType $value2...)
{
}
}
class A extends A_AopProxied
{
publicmethod foo()
{
// invoke parent method with func_get_args
}
}
Generating proxy methods in such way would allow us to use GoAOP for implementing adapter pattern, useful with vendor libraries....
However, this:
class A extends A_AopProxied
{
publicmethod foo($value, $value2...)
{
// invoke parent method with func_get_args
}
}
is next best thing. So, yeah - this will be useful and powerful tool as well.
Framework engine could use PHP7.2 feature for parameter type widening in generated proxies. This feature is described here: https://wiki.php.net/rfc/parameter-no-type-variance
When feature is enabled, then we can weak arguments for original methods and implement different advices that will be able to handle such arguments like
ParamConverter
from the Symfony.Possible usage: automatic injection of value for tests, handling custom proxies, etc...
The text was updated successfully, but these errors were encountered: