Problem/Motivation

\Drupal\views_bulk_operations\Action\ViewsBulkOperationsActionBase implements \Drupal\Component\Plugin\ConfigurablePluginInterface which was deprecated in Drupal 8.7.0.

------ ------------------------------------------------------------------------------------
  Line   src/Action/ViewsBulkOperationsActionBase.php                                                                                                                  
------ ------------------------------------------------------------------------------------
  17     Class Drupal\views_bulk_operations\Action\ViewsBulkOperationsActionBase implements 
         deprecated interface Drupal\Component\Plugin\ConfigurablePluginInterface:  
         Drupal\Component\Plugin\ConfigurablePluginInterface is deprecated                                                                                             
         in Drupal 8.7.0 and will be removed before Drupal 9.0.0. You should implement                                                                                 
         ConfigurableInterface and/or DependentPluginInterface directly as needed. If                                                                                  
         you implement ConfigurableInterface you may choose to implement                                                                                               
         ConfigurablePluginInterface in Drupal 8 as well for maximum compatibility,                                                                                    
         however this must be removed prior to Drupal 9.                                                                                                               
------ ------------------------------------------------------------------------------------

To put this in some context, ConfigurablePluginInterface extends DependentPluginInterface, which contains the single method calculateDependencies(), and adds to it methods getConfiguration(), setConfiguration() and defaultConfiguration(). The new ConfigurableInterface, that deprecates ConfigurablePluginInterface, does not extend DependentPluginInterface, but only contains said configuration methods.

Proposed resolution

Replace ConfigurablePluginInterface with ConfigurableInterface in the implemens list of ViewsBulkOperationsActionBase.

Remaining tasks

  1. Reach concencus about solution
  2. Implement
  3. Review
  4. Commit

User interface changes

None.

API changes

Instead of ConfigurablePluginInterface, plugins extending ViewsBulkOperationsActionBase will now implement ConfigurableInterface. If they implement calculateDependencies, they should themselves declare to implement DependentPluginInterface.

Data model changes

None.

Original report by Graber

As in title. The ConfigurableInterface was introduced in Drupal core 8.7 so we'll have to wait with this until earlier core versions are no longer supported.

Comments

Graber created an issue. See original summary.

eelkeblok’s picture

Status: Postponed » Active

With the release 8.8 versions prior to 8.7 are not supported anymore.

eelkeblok’s picture

Issue summary: View changes

Fleshed out summary.

eelkeblok’s picture

Issue summary: View changes

Because of the mentioned API changes, I guess this constitutes a reason to introduce a 4.0?

eelkeblok’s picture

Issue summary: View changes
eelkeblok’s picture

Issue summary: View changes
eelkeblok’s picture

Issue summary: View changes
eelkeblok’s picture

Issue summary: View changes
eelkeblok’s picture

Status: Active » Needs review
StatusFileSize
new1.01 KB

That's all there is to it (well... let's see).

graber’s picture

Status: Needs review » Needs work

@eelkeblok, looks good! I don't think we need to bump the version of the module, action plugins will be implemented the same way if using the base class and if not - they can implement anything really and the ViewsBulkOperationsActionInterface stays the same.

We'll need to bump the required core version in the .info.yml file though.

mustafa_ab’s picture

There is a reference to calculateDependencies which depends on DependentPluginInterface interface, it can be removed since it is not used. Included a patch that removes that block of code.

avpaderno’s picture

Status: Needs work » Needs review
graber’s picture

Status: Needs review » Fixed

Both patches are included in one single patch that works fine in the parent issue. Closing this. Thanks!

Status: Fixed » Closed (fixed)

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