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.
Another part of #2886622: Deprecate all EntityManager methods with E_USER_DEPRECATED, bunch of seldomly used on*Create|Update|Delete methods, this is a fairly small patch.
Still need to write the legacy tests similar to #3023981: Add @trigger_error() to deprecated EntityManager->EntityRepository methods
Comment | File | Size | Author |
---|---|---|---|
#4 | entity-manager-listener-3028656-4.patch | 26.97 KB | Berdir |
#2 | entity-manager-listener-3028656-2.patch | 22.17 KB | Berdir |
Comments
Comment #2
BerdirComment #4
BerdirMissed a few.
Comment #5
martin107 CreditAttribution: martin107 as a volunteer commenteda) The idea behind this issue is good.
b) After a visual scan of the patch - nothing extraneous, all code changes have a clear intent, everything implemented well
c) There are a couple of modifications, for example ModuleInstaller.php that make use of \Drupal::service() where I would like to see direct injections. But after a little reflections I can why this is the best thing to do as there is a @todo notices marking the code as soon to be changes by xyz and so the larger code block will soon be refactored away.
Comment #6
BerdirThanks for the review. Note this will conflict with #3023981: Add @trigger_error() to deprecated EntityManager->EntityRepository methods and I'd prefer for that to get in first as it unblocks other issues.
DI for ModuleHandler is very complex and it's not visible from the patch context, but $entity_manager isn't injected either. So using DI there is IMHO not in scope of this issue.
Comment #9
BerdirLooks like this was committed, didn't conflict after all :)