Skip to content
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

[DependencyInjection] Add test asserting service with factory is not tagged #30693

Merged

Conversation

malarzm
Copy link
Contributor

@malarzm malarzm commented Mar 25, 2019

Q A
Branch? 4.2
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets n/a
License MIT
Doc PR n/a

I wrote a test for a scenario that was failing for me on 4.1 branch to find out it's already fixed in 4.2 (which is awesome). Since I already had a test written and couldn't really find a PR in the changelog that could have fixed my issue I figured I'll PR a test, so the behaviour I was expecting won't get broken :)

EDIT: For the record, the issue in 4.1 is: Symfony\Component\DependencyInjection\Tests\Fixtures\BarInterface gets tagged due to _instanceof which results in it being handed to Symfony\Component\DependencyInjection\Tests\Fixtures\BarFactory via !tagged. In the end this results in a recursion which is not handled.

@malarzm malarzm force-pushed the test-for-not-tagging-services-using-factories branch from 2aa3bcf to a8e9f40 Compare March 25, 2019 21:30
@nicolas-grekas nicolas-grekas added this to the 4.2 milestone Mar 26, 2019
@fabpot
Copy link
Member

fabpot commented Mar 27, 2019

Thank you @malarzm.

@fabpot fabpot merged commit a8e9f40 into symfony:4.2 Mar 27, 2019
fabpot added a commit that referenced this pull request Mar 27, 2019
…ctory is not tagged (malarzm)

This PR was merged into the 4.2 branch.

Discussion
----------

[DependencyInjection] Add test asserting service with factory is not tagged

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

I wrote a test for a scenario that was failing for me on `4.1` branch to find out it's already fixed in 4.2 (which is awesome). Since I already had a test written and couldn't really find a PR in the changelog that could have fixed my issue I figured I'll PR a test, so the behaviour I was expecting won't get broken :)

EDIT: For the record, the issue in 4.1 is: `Symfony\Component\DependencyInjection\Tests\Fixtures\BarInterface` gets tagged due to `_instanceof` which results in it being handed to `Symfony\Component\DependencyInjection\Tests\Fixtures\BarFactory` via `!tagged`. In the end this results in a recursion which is not handled.

Commits
-------

a8e9f40 Test service with factory is not tagged
@malarzm malarzm deleted the test-for-not-tagging-services-using-factories branch March 27, 2019 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants