Comments

naveenvalecha created an issue. See original summary.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

andypost’s picture

Status: Active » Needs review
StatusFileSize
new1.89 KB

I think plugins should go to core instead of system

andypost’s picture

StatusFileSize
new964 bytes
new2.83 KB

Added update hook, probably we need to resave all views which using bulk actions because some of them could use configured actions and have action module in dependencies

tim.plunkett’s picture

Title: Move message,goto and email action plugin to system module » Move message, goto, and email action plugins to Drupal\Core\Action

Only nits left

  1. +++ b/core/modules/action/action.post_udate.php
    @@ -0,0 +1,26 @@
    +  \Drupal::classResolver(ConfigEntityUpdater::class)->update($sandbox, 'action', function ($action) use ($resave_ids) {
    +    /** @var \Drupal\system\ActionConfigEntityInterface $action */
    

    Nit, can use actual typehinting in the closure function ActionConfigEntityInterface $action)

  2. +++ b/core/modules/action/action.post_udate.php
    @@ -0,0 +1,26 @@
    +    if ($action->isConfigurable() && in_array($action->getPlugin()->getPluginId(), $resave_ids, TRUE)) {
    ...
    +      return TRUE;
    

    This can be return ($action->isConfigurable() ...
    instead of needing an if

andypost’s picture

Issue tags: +Needs change record
StatusFileSize
new1.21 KB
new2.81 KB

Now needs CR, guess upgrade tests not needed

msankhala’s picture

Status: Needs review » Reviewed & tested by the community

I can confirm the patch #9 applies cleanly.

❯ d8core 8.7.x* git apply -v --index 2815379-9.patch
Checking patch core/modules/action/src/Plugin/Action/EmailAction.php => core/lib/Drupal/Core/Action/Plugin/Action/EmailAction.php...
Checking patch core/modules/action/src/Plugin/Action/GotoAction.php => core/lib/Drupal/Core/Action/Plugin/Action/GotoAction.php...
Checking patch core/modules/action/src/Plugin/Action/MessageAction.php => core/lib/Drupal/Core/Action/Plugin/Action/MessageAction.php...
Checking patch core/modules/action/action.post_udate.php...
Applied patch core/modules/action/src/Plugin/Action/EmailAction.php => core/lib/Drupal/Core/Action/Plugin/Action/EmailAction.php cleanly.
Applied patch core/modules/action/src/Plugin/Action/GotoAction.php => core/lib/Drupal/Core/Action/Plugin/Action/GotoAction.php cleanly.
Applied patch core/modules/action/src/Plugin/Action/MessageAction.php => core/lib/Drupal/Core/Action/Plugin/Action/MessageAction.php cleanly.
Applied patch core/modules/action/action.post_udate.php cleanly.
jibran’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs upgrade path tests, +@deprecated

We need the upgrade path tests. We also need to deprectate the existing classes and tests for the deprecations. Just read https://www.drupal.org/core/d8-bc-policy#plugins.

jibran’s picture

guess upgrade tests not needed

Why do you think that?

jibran’s picture

Issue tags: -@deprecated
andypost’s picture

Status: Needs work » Needs review
Issue tags: -Needs change record
StatusFileSize
new2.76 KB
new5.76 KB

Patch moves config schema & test to core as well

Filed CR https://www.drupal.org/node/3018300

@jibran which kind of upgrade tests you can suggest? I can imagine only ones that configured actions did change their dependencies

andypost’s picture

Issue tags: -Needs upgrade path tests
StatusFileSize
new5.27 KB
new11.03 KB

I bet this should be enough, test and fixture added to system module where other action updates live

jibran’s picture

Something like \Drupal\Tests\system\Functional\Update\UpdateActionsWithEntityPluginsTest

andypost’s picture

@jibran Anything left here?

jibran’s picture

Status: Needs review » Reviewed & tested by the community

Thanks, this is good to go.

catch’s picture

The patch looks fine but it would be good to have a test-only patch here.

I think it's OK to just move these since plugins are @internal.

andypost’s picture

StatusFileSize
new5.27 KB

@catch do you mean this kind of patch?

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 20: 2815379-test-only.patch, failed testing. View results

andypost’s picture

Status: Needs work » Reviewed & tested by the community

Back to rtbc

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed 281c6f0 and pushed to 8.7.x. Thanks!

  • catch committed 281c6f0 on 8.7.x
    Issue #2815379 by andypost, jibran, naveenvalecha, tim.plunkett: Move...
andypost’s picture

published CR

andypost’s picture

The test is too strict should check only for dependencies, fixing in #2677116-26: Allow setting message type for message action plugin

Status: Fixed » Closed (fixed)

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