Problem/Motivation
- Replace deprecated
\Drupal::entityQuery; - Injection service plugin.manager.alias_type (Drupal\pathauto\AliasTypeManager );
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | interdiff-2-5.txt | 1.82 KB | thalles |
| #5 | pathauto-Injection_on_PathautoGenerator-3031650-5-D8.patch | 4.54 KB | thalles |
| #2 | pathauto-Injection_on_PathautoGenerator-3031650-2-D8.patch | 4.56 KB | thalles |
Comments
Comment #2
thallesFollow the patch!
Comment #3
idebr commentedLet's add an empty post_update hook so the services container is rebuilt, see
\taxonomy_post_update_clear_entity_bundle_field_definitions_cache()for an example. Existing sites will trigger an error:ArgumentCountError: Too few arguments to function Drupal\pathauto\PathautoGenerator::__construct()Let's use $alias_type_manager for consistency with the other variables.
Comment #4
berdir1. I'm not that fond of the empty post update pattern, we could for BC just make the arguments optional and fall back to \Drupal::service() in the constructor, then it will work fine too.
Comment #5
thallesFollow the new patch!
Comment #7
berdirThanks, committed.