-
-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BC Break] Internal container refactoring. #501
Conversation
New version drops GoAspectContainer class and rely just on Container class now. Container uses now generic methods, so IDE and PhpStan aware about types now. Tags have been replaced with interface names, which simplifies usage of marker interfaces. All unnecessary string variables were replaced with class FQN. No more special methods to register advisors or pointcuts - they are just values in container.
A new inspection was created. |
{ | ||
$this->loaders[] = $loader; | ||
public function __construct( | ||
protected AspectContainer $container, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line indented incorrectly; expected 4 spaces, found 8
@@ -83,7 +80,7 @@ protected function getAdvice( | |||
$interceptorAttribute instanceof After => new AfterInterceptor($adviceCallback, $adviceOrder, $pointcutExpression), | |||
$interceptorAttribute instanceof Around => new AroundInterceptor($adviceCallback, $adviceOrder, $pointcutExpression), | |||
$interceptorAttribute instanceof AfterThrowing => new AfterThrowingInterceptor($adviceCallback, $adviceOrder, $pointcutExpression), | |||
default => throw new UnexpectedValueException('Unsupported method meta class: ' . get_class($interceptorAttribute)), | |||
default => throw new UnexpectedValueException('Unsupported method meta class: ' . $interceptorAttribute::class), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line indented incorrectly; expected 8 spaces, found 12
$result[$id] = $this->get($id); | ||
} | ||
} | ||
$this->add($id, function (self $container) use ($id, $lazyDefinitionClosure): object { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected 1 space after closing parenthesis; found 0
New version drops the
GoAspectContainer
class and rely just on Container class now.Container uses now generic methods, so IDE and PhpStan aware about types now.
Tags have been replaced with interface names, which simplifies usage of marker interfaces.
All unnecessary string variables were replaced with class FQN.
No more special methods to register advisors or pointcuts - they are just values in container.