Issue #3396062: Deprecate NodeStorage
Closes #3396062
Merge request reports
Activity
- Resolved by Adam Bramley
31 31 * The plugin ID for the plugin instance. 32 32 * @param mixed $plugin_definition 33 33 * The plugin implementation definition. 34 * @param \Drupal\node\NodeStorageInterface $node_storage 34 * @param \Drupal\Core\Entity\EntityStorageInterface $node_storage 35 35 * The node storage. 36 36 */ 37 public function __construct(array $configuration, $plugin_id, $plugin_definition, NodeStorageInterface $node_storage) { 37 public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityStorageInterface $node_storage) { - Resolved by Adam Bramley
- Resolved by Adam Bramley
- Resolved by Adam Bramley
added 44 commits
-
aeb5df78...60ce3e07 - 37 commits from branch
project:11.x
- 9f5377b2 - Issue #3396062: Deprecate NodeStorage
- a7ff40ab - Lint fixes
- c47bff1b - Lint fixes again
- b9c289ff - Fix NodeHooks
- 1f519db0 - Undeprecate NodeStorage and NodeStorageInterface so we dont break existing usages
- 156b764e - Add revisionIds to NodeRepository, tidy up NodeRevisionDeleteForm
- 87c231ae - Remove post update
Toggle commit list-
aeb5df78...60ce3e07 - 37 commits from branch
514 516 #[Hook('configurable_language_delete')] 515 517 public function configurableLanguageDelete(ConfigurableLanguageInterface $language): void { 516 518 // On nodes with this language, unset the language. 517 \Drupal::entityTypeManager()->getStorage('node')->clearRevisionsLanguage($language); 519 $table = \Drupal::entityTypeManager()->getStorage('node')->getRevisionTable(); Hadn't notice this before.
This is exactly the kind of methods that should be in a custom storage class. Stuff that directly interacts with the database and bypasses entity query. It's also not test code.
It's not a solution to just do it outside of storage.
However, it also shouldn't be a node specific thing, because any translatable + revisionable entity type has this issue, it being node specific is just a leftover from when only nodes had revisions.
so either we do it for all of them or none. I know there are issues open about problems when removing translations, I'm not sure if this has test coverage and if it even does what it says. What happens if you remove it, are there failing tests?
Could skip this method and repurpose this to just remove the methods that are easy to do.
However, it also shouldn't be a node specific thing, because any translatable + revisionable entity type has this issue, it being node specific is just a leftover from when only nodes had revisions. Could skip this method and repurpose this to just remove the methods that are easy to do.
Making this generic to all revisionable/translatable entity types is out of scope of this issue. IMO we should do it the other way - deprecate it on the storage class and create a follow up to handle this for all entity types.
added 38 commits
-
87c231ae...7da6cdbf - 30 commits from branch
project:11.x
- c31efa00 - Issue #3396062: Deprecate NodeStorage
- ab3ecf33 - Lint fixes
- d3a50d40 - Lint fixes again
- b08859ef - Fix NodeHooks
- cde327ec - Undeprecate NodeStorage and NodeStorageInterface so we dont break existing usages
- 61051632 - Add revisionIds to NodeRepository, tidy up NodeRevisionDeleteForm
- dd732452 - Remove post update
- 01b21f41 - Remove interface
Toggle commit list-
87c231ae...7da6cdbf - 30 commits from branch
added 97 commits
-
01b21f41...148d8ddb - 89 commits from branch
project:11.x
- ace48ead - Issue #3396062: Deprecate NodeStorage
- e3c67515 - Lint fixes
- d6f18a04 - Lint fixes again
- 79b614a3 - Fix NodeHooks
- cca73e94 - Undeprecate NodeStorage and NodeStorageInterface so we dont break existing usages
- 81947d7c - Add revisionIds to NodeRepository, tidy up NodeRevisionDeleteForm
- ad2482f9 - Remove post update
- 32b03627 - Remove interface
Toggle commit list-
01b21f41...148d8ddb - 89 commits from branch
added 350 commits
-
32b03627...4fd90637 - 341 commits from branch
project:11.x
- 73bb8cd1 - Issue #3396062: Deprecate NodeStorage
- a7973c8b - Lint fixes
- 3edd8d10 - Lint fixes again
- b491b5de - Fix NodeHooks
- 0e24f8cd - Undeprecate NodeStorage and NodeStorageInterface so we dont break existing usages
- a4b914c5 - Add revisionIds to NodeRepository, tidy up NodeRevisionDeleteForm
- 8dc0a5d1 - Remove post update
- 34328ff9 - Remove interface
- 89fa8cc9 - Use NodeRepository in NodeRevisionsTest
Toggle commit list-
32b03627...4fd90637 - 341 commits from branch