- Issue created by @catch
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
This could be a novice issue if we are just adding
autoconfigure: true
to all theservices.yml
's - π¨π¦Canada Charlie ChX Negyesi πCanada
I read the page you linked and solely based on how AsEventListener behaves -- which I have studied for the OOP hook patch -- I think you will be very disappointed at what autoconfigure: true actually provides with the components Drupal core currently uses: it is registered here aka in the full symfony/symfony package. twig.extension is added in Symfony\Bundle\TwigBundle\DependencyInjection\TwigExtension which does ship with Drupal core but as far as I am aware, Drupal doesn't use Symfony bundles at all.
This is not to say it is completely useless -- but it does require some work, a bit of copy/paste at least to make it really useful.
- Status changed to Needs review
5 months ago 12:48am 5 June 2024 - π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
Given we are held up with concerns in β¨ Turn autowire & autoconfigure ON/OFF globally Needs review should we go ahead and do it the manual way here first?
I was curious so I added
autoconfigure: true
andautowire: true
to every services.yml file to see what happens. - π¬π§United Kingdom catch
Yeah I think we should manually configure autoconfigure everywhere (what a sentence) in core whatever happens. The test failures in the MR show we might run into issues doing β¨ Turn autowire & autoconfigure ON/OFF globally Needs review for contrib too, but maybe it'll help us figure out what to do there.
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
I also added
autowire: true
everywhere too, which I think we should remove and just doautoconfigure: true
first. - π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
I've toned this down to only add
autoconfigure: true
to non-test modules. I had to exclude themysql.services.yml
too for reasons I haven't looked into. - First commit to issue fork.
- Status changed to RTBC
5 months ago 11:03am 12 June 2024 - π¬π§United Kingdom longwave UK
I agree with doing this as it sets a good precedent for contrib and custom code to copy, I also enabled it for announcements_feed which was missed from the MR.
The reason that mysql fails is that
mysql.views.cast_sql
implements a Views interface, but not all tests enable Views, so the interface cannot be loaded during container rebuild in some tests. I don't think this is worth trying to work around - database drivers are probably a special case here. -
alexpott β
committed bbd5898b on 10.4.x
Issue #3449569 by kim.pepper, longwave, catch: Use autoconfigure more in...
-
alexpott β
committed bbd5898b on 10.4.x
-
alexpott β
committed 0bfb4c79 on 11.0.x
Issue #3449569 by kim.pepper, longwave, catch: Use autoconfigure more in...
-
alexpott β
committed 0bfb4c79 on 11.0.x
-
alexpott β
committed 2588e097 on 11.x
Issue #3449569 by kim.pepper, longwave, catch: Use autoconfigure more in...
-
alexpott β
committed 2588e097 on 11.x
- Status changed to Fixed
5 months ago 11:22am 12 June 2024 - π¬π§United Kingdom alexpott πͺπΊπ
Committed and pushed 2588e097a9 to 11.x and 0bfb4c7978 to 11.0.x and bbd5898ba6 to 10.4.x. Thanks!
Backported to 10.4.x as this is a task and not necessary to be a part of 10.3.x
Automatically closed - issue fixed for 2 weeks with no activity.