- Issue created by @dpi
- π¦πΊAustralia dpi Perth, Australia
There are of course non-optimal workarounds:
Remove the
container.service_locator
tag from the service locator [service]. Such that\Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass
does not trigger converting args to\Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument
Or,
Do not make the referenced services private.
- π¦πΊAustralia dpi Perth, Australia
The solution for this is out of my area. Drupal's Dumpers (
\Drupal\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumper
, etc, and\Drupal\Component\DependencyInjection\Container
are a mystery to me.Perhaps: build private services and reference them internally via IDs??
- last update
about 1 year ago Custom Commands Failed - @dpi opened merge request.
- Status changed to Needs review
about 1 year ago 9:28am 5 October 2023 - π¦πΊAustralia dpi Perth, Australia
The MR I posted fixes my particular issue, but I'm not really happy with it. Similarly the coverage is an adaptation of the coverage added by β¨ Support ServiceClosureArgument in \Drupal\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumper::dumpValue Fixed . However tests still pass after removing implementations.
Changing to Needs Review to solicit feedback about the approach.
- last update
about 1 year ago 30,330 pass, 2 fail - π¦πΊAustralia dpi Perth, Australia
So my current workaround is a compiler pass that un-privatises services https://git.drupalcode.org/project/symfony_messenger_scheduler/-/blob/1....
If I remove this workaround, things break.
If I apply the code from the attached MR, and without the workaround, things work again.
Would be great if someone with deeper knowledge of these systems to pick it up. Thanks!
- π¬π§United Kingdom longwave UK
If we can figure out how Symfony does this, we should follow the same path and/or borrow code from them.
- π«π·France andypost
Can't figure how it works on a first look, so probably better to start with test
- Status changed to Needs work
about 1 year ago 4:54pm 12 October 2023 - πΊπΈUnited States smustgrave
Just moving to NW for test in #9, least that's how I read it.