page_manager_ui/src/Wizard/RouteParameters.php causes the following PHP fatal error when interpreted:

Fatal error: Declaration of Drupal\page_manager_ui\Wizard\RouteParameters::getOperations() must be compatible with Drupal\ctools\Wizard\FormWizardInterface::getOperations($cached_values) in /var/www/docroot/modules/contrib/page_manager/page_manager_ui/src/Wizard/RouteParameters.php on line 86

Comments

TravisCarden created an issue. See original summary.

manuel.adan’s picture

Which version of ctools you have installed?

traviscarden’s picture

@manuel.adan 8.x-3.2.

manuel.adan’s picture

Please, could you check if with ctools 3.0 the bug is still reproducible? If not, this would be a duplicate of #3033057: Page Manager currently not working with CTools 3.1+

traviscarden’s picture

Status: Active » Needs review
StatusFileSize
new525 bytes

Yes, @manuel.adan, the bug is still reproducible with ctools 3.0.0. Here. This patch fixes the issue.

Status: Needs review » Needs work

The last submitted patch, 5: page_manager-3039249-5.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

traviscarden’s picture

Status: Needs work » Needs review
StatusFileSize
new2.07 KB

All right. I can fix the coding standards issues, too. ¯\_(ツ)_/¯

Status: Needs review » Needs work

The last submitted patch, 7: page_manager-3039249-6.patch, failed testing. View results

manuel.adan’s picture

Title: Fatal error: Declaration of RouteParameters::getOperations()... » Remove unused class RouteParameters
Version: 8.x-4.0-beta3 » 8.x-4.x-dev
Status: Needs work » Needs review
StatusFileSize
new2.69 KB

Well, there are two referenced classes in this class that doesn't exist:

16   use Drupal\page_manager_ui\Form\ParameterAssignContextForm;
17   use Drupal\page_manager_ui\Form\ParameterSettingsForm;

As far I can see, there are no references to this class (Drupal\page_manager_ui\Wizard\RouteParameters) in the rest of the module code. These three classes were added in the "wizard" branch but, according to the git graph, it was never merged into 8.x-4.x.

The RouteParameters was added alone in #2550879: Use CTools Wizard API to add/edit Pages (and move plugin UI using PluginWizardInterface) (commit 77871ad), without the ParameterAssignContextForm and ParameterSettingsForm.

In short, RouteParameters was added (by error) into 8.x-4.x branch, by it is not used at all, so I think we can safely simply remove it. The tests pass and everything seems to work well.

@TravisCarden, how did you found the reported issue? May be by static code checking?

traviscarden’s picture

  • manuel.adan committed 687a801 on 8.x-4.x
    Issue #3039249 by TravisCarden, manuel.adan: Remove unused class...
manuel.adan’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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