-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DependencyInjection] resolve aliases in factories #17554
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
Conversation
xabbuh
commented
Jan 27, 2016
Q | A |
---|---|
Bug fix? | yes |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | FriendsOfSymfony/FOSUserBundle#2048 |
License | MIT |
Doc PR |
private function processFactory($factory) | ||
{ | ||
if (null === $factory || !is_array($factory) || !$factory[0] instanceof Reference) { | ||
return; |
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 needs to return the factory
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.
good catch, fixed
33e0669
to
fde10e7
Compare
$defId = $this->getDefinitionId($id = (string) $factory[0]); | ||
|
||
if ($defId !== $id) { | ||
$factory[0] = new Reference($defId, $factory[0]->getInvalidBehavior(), $factory[0]->isStrict()); |
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.
note that this line will need changes when merging into 2.8 (and then again in 3.0) due to changes to isStrict
👍 |
Status: reviewed |
Thank you @xabbuh. |
This PR was merged into the 2.7 branch. Discussion ---------- [DependencyInjection] resolve aliases in factories | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | FriendsOfSymfony/FOSUserBundle#2048 | License | MIT | Doc PR | Commits ------- fde10e7 resolve aliases in factories
@xabbuh Can I let you merge 2.3 into 2.7, 2.7 into 2.8, and 2.8 into 3.0? This should be easy as I've done the merge not too long ago. |
@fabpot sure, did so |