Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
On the quest to kill entity manager, berdir and I discussed this as a good choke point to kill a large number of usages in tests. We can use the deprecated service property trait to trigger an error on entityManager usage here and remove about 100 usages in tests from core.
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#2 | 3052272-2.drupal.Remove-entityManager-use-in-EntityKernelTestBase-and-all-tests-which-extend-it.patch | 51.78 KB | mikelutz |
Comments
Comment #2
mikelutzPretty straightforward, I hope...
Comment #3
BerdirThought if this a problem, but the new DeprecatedServicePropertyTrait doesn't set it, so every call will go directly to \Drupal::service(), which means there's no problem with stale objects.
This a simple search & replace that makes sense as a standalone issue.
Comment #4
mikelutzThat was my conclusion on the refreshServices call as well.
Comment #5
larowlan👊Committed b9f30c9 and pushed to 8.8.x. Thanks!