-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
4.2.2 release changed the way tagged service are injected #29836
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
Comments
any chance to bisect which PR broke this ? |
This is a bit hard to bisect because we merge older branch. If someone has this, I used the following script: <?php
require __DIR__.'/vendor/autoload.php';
exec('rm -rf '.__DIR__.'/var/cache');
try {
$k = new AppKernel('dev', true);
$k->boot();
$c = $k->getContainer();
} catch (\Exception $e) {
exit(255);
}
$dataProviders = $c->get('api_platform.collection_data_provider');
if (iterator_to_array($dataProviders->dataProviders)[0] instanceof AppBundle\Api\DataProvider\AggregatedLogDataProvider) {
exit(0);
}
exit(1); and in git bisect start && git bisect good v4.2.1 && git bisect bad v4.2.2 && git bisect run php ../../../test.php |
well, is there a way to force bisect to identify the merge commit merging the issue ? All our changes happen through merges (from PR, or from older branches). That would restrict the list of impacted changes (if it is a branch merge, we would then have to check only the few PRs merged in by this particular merge) |
just found https://github.com/dealertrack/merge-bisect which might help here. |
I took a fresh 3.4 website-skeleton and added APIP on it. |
Yeah, |
Is it considered as a BC Break ? IMHO it should be because it breaks so many applications |
Yes, let's revert that PR, it doesn't correctly fix the issue it was supposed to anyway. PR welcome. |
…n services as unused" (mmarynich) This PR was merged into the 3.4 branch. Discussion ---------- Revert "bug #29597 [DI] fix reporting bindings on overriden services as unused" This reverts commit 44e9a91, reversing changes made to 91b28ff. | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #29836 | License | MIT | Doc PR | 4.2.2 release changed the way tagged service are injected As asked by @nicolas-grekas #29836 (comment) Commits ------- b3e17d2 Revert "bug #29597 [DI] fix reporting bindings on overriden services as unused (nicolas-grekas)"
Thanks @fabpot |
Symfony version(s) affected: 4.2.2
Description
The framework changed the way tagged service are injected
How to reproduce
We are using API Platform, and it uses the following code:
https://github.com/api-platform/core/blob/c20b86cfa6def8f1921dd7e02280d283fcd80e8a/src/Bridge/Symfony/Bundle/Resources/config/data_provider.xml#L25-L27
On 4.2.1 when I dump the injected service I have:
Note:
CollectionDataProvider
is the default Data Provider from API Platform, andAggregatedLogDataProvider
,#...
are my Data ProviderPossible Solution
Patch all third party relying on this feature or fix Symfony.
Note: I tried to change the priority of the default Data Provider in APIP, and it fixes my issue.
The text was updated successfully, but these errors were encountered: