Closed (fixed)
Project:
Drupal core
Version:
9.2.x-dev
Component:
base system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 May 2021 at 12:27 UTC
Updated:
6 Apr 2022 at 19:22 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
alexpottThis one is going to be fun because we don't have the info from the ContainerBuilder so we're going to have to somehow provide it. Here's an approach with a compiler pass.
Let's see if we trigger any deprecations!
Comment #3
longwaveI found #2529516: Decouple tests from relying that $container is a container builder while trawling for Bug Smash Initiative, that seems at least tangentially related because of the finding in the upstream issue that deprecations work in kernel tests but not functional tests.
Comment #4
alexpott@longwave nice find - I agree related but not a blocker per se here.
Here's a test. The test only patch is the interdiff.
Comment #7
alexpottFixing the deprecation now triggered in HEAD & fixing the test namespace so that run-tests.sh can run it.
Comment #9
longwaveLooks like a reasonable approach. We could add the deprecated definition to OptimizedPhpArrayDumper::getServiceDefinition() but that would only cover services - aliases would need special handling to extract and store their deprecation messages. The compiled container won't be much different so this method seems like far less code for the same result.
Good that we found a missed deprecation in our own code as well :)
Comment #11
larowlanCommitted 70175bc and pushed to 9.3.x. Thanks!
Backported to 9.2.x
Nice solution
Comment #13
fabianx commentedThis was not a good approach as it is a SEVERE performance regression in the critical path.
At least move it later in the function.
It would indeed be better to put that into the dumper as that looks at every service anyway ...
Comment #14
larowlanCan we get a follow up issue @fsbianx?