-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[DI] Add AutowireRequiredMethodsPass to fix bindings for @required methods
#24301
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
[DI] Add AutowireRequiredMethodsPass to fix bindings for @required methods
#24301
Conversation
| $this->assertEquals(array(new Reference('foo')), $container->getDefinition('def2')->getArguments()); | ||
| } | ||
|
|
||
| public function testScalarSetter() |
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.
Here is the test that backs up the fixed behavior.
| // should be called | ||
| } | ||
|
|
||
| /** @inheritdoc*/ |
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.
this fabbot failure is expected
ogizanagi
left a comment
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.
Perhaps AutowireRequiredMethodsPass would be more explicit.
8bb946a to
a9afeea
Compare
|
@ogizanagi renamed, thanks |
a9afeea to
c7afcf6
Compare
| return $value; | ||
| } | ||
|
|
||
| $autowiredMethods = $this->getMethodsToAutowire($reflectionClass); |
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.
The getMethodsToAutowire still exists in this class, can be removed now
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.
indeed, done, thanks
c7afcf6 to
aa2b76b
Compare
@required methods@required methods
aa2b76b to
dc55dd2
Compare
…or `@required` methods (nicolas-grekas) This PR was merged into the 3.4 branch. Discussion ---------- [DI] Add AutowireRequiredMethodsPass to fix bindings for `@required` methods | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | yes | BC breaks? | yes | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Spotted while doing a SF4 workshop :) Discovery of `@required` methods should be split from AutowirePass so that bindings can apply to these methods also when autowiring is enabled. Commits ------- dc55dd2 [DI] Add AutowireRequiredMethodsPass to fix bindings for `@required` methods
Spotted while doing a SF4 workshop :)
Discovery of
@requiredmethods should be split from AutowirePass so that bindings can apply to these methods also when autowiring is enabled.