Comments

TR created an issue. See original summary.

tr’s picture

Drupal 8.6.x will be supported until Drupal8.8.0 is released, which is scheduled for December 4, 2019

We can't make this change until Drupal 8.6.x becomes unsupported.

tr’s picture

Status: Postponed » Active

We're a month away from being able to commit this, thus I'm re-opening this so we can work on a patch and get it tested and ready to commit once 8.8.0 is released.

jonathan1055’s picture

Adding to parent meta issue

andreyjan’s picture

Assigned: Unassigned » andreyjan

Will work on this.

andreyjan’s picture

Assigned: andreyjan » Unassigned
Status: Active » Needs review
StatusFileSize
new1.94 KB

Here's the patch.

tr’s picture

Status: Needs review » Needs work

From the change record linked in the original post:

However, if your plugin is not used as part of a configuration entity, and does not need to provide dependencies, you no longer need to implement DependentPluginInterface or the calculateDependencies() method.

ConfigurablePluginInterface was split into two new interfaces because calculateDependencies() is frequently not needed, which resulted in many unnecessary dummy calculateDependency() functions. The patch should NOT just add in both new interfaces without examining whether they are both needed or not.

After the patch there are still dummy implementations of calculateDependencies(). This implies that DependentPluginInterface may not be needed at all (which is part of the point of the core change ... ). And we have at least one place where calculateDependencies() is defined but there is no "implements DependentPluginInterface" (see RulesComponent.php).

All of these things need to be looked at and fixed if necessary. If no change is needed, then an explanation of why is still important so we know that they have all been looked at and carefully considered. See for example #3092000: ConfigurablePluginInterface is deprecated in core 8.7.x

andreyjan’s picture

Status: Needs work » Needs review
StatusFileSize
new1.49 KB
new2.42 KB

@TR thanks for the review.

I have removed DependentPluginInterface from RulesConfigurableEventHandlerInterface and the calculateDependencies() method from the implementing class. But I am still not sure if it should also be removed ExpressionInterface.

RulesComponent.php uses DependencyTrait and does not implement any interface, but it has a property casted to ExpressionInterface.

  • TR committed 971fab1 on 8.x-3.x authored by andreyjan
    Issue #3030291 by andreyjan, TR: ConfigurablePluginInterface is...
tr’s picture

Status: Needs review » Fixed

Committed. Thanks!

Status: Fixed » Closed (fixed)

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