Problem/Motivation

currently the node module still contains deprecated code.

Proposed resolution

Remove the following items:

  • Remove \Drupal\node\NodeAccessControlHandler(Interface)::writeGrants()
  • Remove node_delete_action action
  • Remove node_publish_action action
  • Remove node_save_action action
  • Remove node_unpublish_action action
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

JeroenT created an issue. See original summary.

andypost’s picture

JeroenT’s picture

JeroenT’s picture

Status: Active » Needs review
JeroenT’s picture

Issue summary: View changes
JeroenT’s picture

Berdir’s picture

Status: Needs review » Needs work

Try searching for @trigger_error() and @deprecated in the whole module, there's quite a bit more to remove. And then also "group legacy" for any tests that are covering the things we are removing.

Berdir’s picture

Wim Leers’s picture

Title: remove node.module BC layers » Remove node.module BC layers

we don't want to remove the whole module :)

😆

JeroenT’s picture

#7 @Berdir, I searched for @deprecated, trigger_error and group legacy in the node module, but I didn't find anything. Am I missing something?

#8: Woops! 🤦‍♂️

JeroenT’s picture

Status: Needs work » Needs review
Wim Leers’s picture

Status: Needs review » Needs work
  1. Just like @JeroenT, I cannot find what other removals @Berdir is referring to…
  2. +++ b/core/modules/node/src/NodeAccessControlHandlerInterface.php
    @@ -28,27 +28,6 @@ interface NodeAccessControlHandlerInterface {
    -  public function writeGrants(NodeInterface $node, $delete = TRUE);
    

    We also still need to remove the implementation of this, at \Drupal\node\NodeAccessControlHandler::writeGrants().

JeroenT’s picture

Status: Needs work » Needs review
FileSize
9.18 KB
496 bytes

ah good catch.

Wim Leers’s picture

Assigned: JeroenT » Berdir
Issue summary: View changes

Really tempted to mark this RTBC, but let's wait for DrupalCI to confirm tests are still passing, and let's wait for @Berdir to respond with what other things he spotted that should be removed.

Thanks for opening this issue, the clear issue summary and the patch, @JeroenT! 🙏

Berdir’s picture

Title: Remove node.module BC layers » Remove deprecated node.module action plugins and leftovers
Assigned: Berdir » Unassigned
Status: Needs review » Reviewed & tested by the community

Sorry about that, I probably looked at the wrong branch, we already did node module in #3097428: Remove node.module BC layers

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 5fca5fe and pushed to 9.0.x. Thanks!

+++ b/core/modules/node/src/NodeAccessControlHandler.php
@@ -156,14 +156,6 @@ public function acquireGrants(NodeInterface $node) {
-  /**
-   * {@inheritdoc}
-   */
-  public function writeGrants(NodeInterface $node, $delete = TRUE) {
-    $grants = $this->acquireGrants($node);
-    $this->grantStorage->write($node, $grants, NULL, $delete);
-  }

+++ b/core/modules/node/src/NodeAccessControlHandlerInterface.php
@@ -28,27 +28,6 @@ interface NodeAccessControlHandlerInterface {
-   * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0.
-   *   Use \Drupal\node\NodeAccessControlHandlerInterface::acquireGrants().
-   */
-  public function writeGrants(NodeInterface $node, $delete = TRUE);

So this was deprecated before our deprecation policy was defined. So there's no @trigger_error() BUT it has been deprecated for the nearly entirety of the Drupal 8 cycle and is completely untested and any contrib or custom implementations of the interface will not be broken by the removal so I think this okay.

  • alexpott committed 5fca5fe on 9.0.x
    Issue #3108851 by JeroenT, Berdir, Wim Leers: Remove deprecated node....

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

AaronBauman’s picture

I'm running into WSODs for drupal core views that relied on these, and I'm not the only one.
See #3045570: Plugin missing for node actions

How are/were these views supposed to get updated?
The actions were deprecated, and the install config was updated, which is good for new installs.
D8 early adopters are left in the lurch.

Sorry to necropost, but before I open a new issue I thought I'd check here.

andypost’s picture

@AaronBauman Please file new issue and link it here, migrations should be in-place as the issue just removes remains

AaronBauman’s picture