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
feat(proxy): pass advices as argument to injectJoinPoints instead of property
Closes#518
Previously, generated proxy classes embedded advisor name strings directly
in the \$__joinPoints property initializer. ClassProxyGenerator::injectJoinPoints()
would then read that property via reflection, transform the strings into Joinpoint
objects, and write them back — mutating the property's type at runtime.
Now the \$__joinPoints property is always declared empty
(private static array \$__joinPoints = []) and the full advice names array
is passed as a second argument to the injectJoinPoints() call at the bottom
of the generated proxy file. This makes the initialization call self-contained
and removes the reflection read step.
Updated ProxyClassReflectionHelper::extractAdvicesFromProxyFile() replaces
the old getStaticPropertyValue('__joinPoints') approach in test constraints
so they read advisor names from the injectJoinPoints() call in the proxy file.
Also corrected the wrapWithJoinPoints() docblock: the parameter is
string[][][] (advisor name strings), not Advice[][][], and removed the
now-obsolete PHPStan baseline entry.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
0 commit comments