- Issue created by @acbramley
- Merge request !12336Issue #3529274: Turn ViewsConfigUpdater into a service β (Closed) created by acbramley
- π¦πΊAustralia acbramley
To do that we need to add public API for getting the
deprecationsEnabled
flag, IMO this is covered by the other issue but I can see value in keeping a test around.I've pushed something up. The test only run will fail but that'll be because the service doesn't exist so you'll have to manually edit the post update + presave hooks to see that.
- πΊπΈUnited States smustgrave
Ran the test-only job here https://git.drupalcode.org/issue/drupal-3529274/-/jobs/5584584 which outputted
1) Drupal\Tests\views\Functional\ViewsConfigUpdaterTest::testDeprecationsFlagPersists
The update failed with the following message: "Failed: Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "Drupal\views\ViewsConfigUpdater". in Symfony\Component\DependencyInjection\ContainerBuilder->getDefinition() (line 1041 of /builds/issue/drupal-3529274/vendor/symfony/dependency-injection/ContainerBuilder.php)."
/builds/issue/drupal-3529274/core/tests/Drupal/Tests/UpdatePathTestTrait.php:68
/builds/issue/drupal-3529274/core/modules/views/tests/src/Functional/ViewsConfigUpdaterTest.php:67
FAILURES!
Tests: 1, Assertions: 5, FailuI searched the repo for "\Drupal::classResolver(ViewsConfigUpdater" and all 4 instances have been replaced.
Can we get a CR about this being a service and how should be used going forward.
- πΊπΈUnited States smustgrave
Thanks! Believe all feedback has been addressed
-
longwave β
committed e19ac2e6 on 11.x
Issue #3529274 by acbramley, smustgrave: ViewsConfigUpdater $...
-
longwave β
committed e19ac2e6 on 11.x
- π¬π§United Kingdom longwave UK
Tried to think of downsides or problems with converting this to a service, but apart from a tiny bit of additional bloat in the container I don't think there are any issues.
Committed e19ac2e and pushed to 11.x. Thanks!
As a bug fix this is technically eligible for backport, but given this is only to fix a problem in a not-yet-committed issue I think this can remain in 11.x only.
Automatically closed - issue fixed for 2 weeks with no activity.