PHP Fatal error: Declaration of Drupal\\workbench_moderation\\Plugin\\Menu\\EditTab::getTitle() must be compatible with Drupal\\Core\\Menu\\LocalTaskDefault::getTitle(?Symfony\\Component\\HttpFoundation\\Request $request = NULL) in /code/web/modules/contrib/workbench_moderation/src/Plugin/Menu/EditTab.php on line 16, referer: http://localhost/admin/content

Using PHP 7.2 & Drupal core 8.5.0.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pingers created an issue. See original summary.

pingers’s picture

syammohanmp’s picture

Status: Active » Reviewed & tested by the community

It's working fine.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 2: workbench_moderation_incompatible-declaration_2952717_2.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

NickDickinsonWilde’s picture

Status: Needs work » Reviewed & tested by the community

As soon as those two land, this is functional and will resolve some issues.

Peter Majmesku’s picture

Please add this patch to a stable release.

darvanen’s picture

Submitted for re-testing.

Peter Majmesku’s picture

Just as a hint: I was seeing this error on my entire Drupal site, when I was switching from PHP 7.1 to PHP 7.2. After switching back to PHP 7.1, the error was gone.

darvanen’s picture

It might be difficult to get maintainer support for this until the tests are passing and that's a whole 'nother problem right now with this module.

armyguyinfl’s picture

I also confirm this bug on PHP 7.2 with 8.5.3. PHP 7.1 works as a temporary solution until this is merged into core.

Lanoxx’s picture

I also had to change `core/lib/Drupal/Core/Menu/LocalTaskInterface.php` and add the Request parameter there.

hassebasse’s picture

When upgrading to PHP7.2 I had this problem. As I can't downgrade to 7.1 I tried the patch workbench_moderation_incompatible-declaration_2952717_4.patch on Drupal 8.6.3 and installed it with Composer. It seem to work perfectly well.

darvanen’s picture

Looks like module tests are passing again, re-queueing for testing.

mcdeltat’s picture

Can confirm that the patch in #5 helped fixed this issue on a PHP7.2 Drupal 8.6.3 Workbench 1.4 installation. Thanks to #14 for also pointing out that you can do that directly in composer with the cweagans/composer-patches plugin. That is a much nicer way of deploying.

darvanen’s picture

Looks like I was wrong, branch is still failing.
BTW - if you haven't tried content moderation in core as an alternative to workbench, now is a good time, it's looking nice :)

vinlaurens’s picture

Can confirm the method above works for my Drupal 8.6.3 installation with workbench_moderation 1.4.

pritam.tiwari’s picture

Patch #5 working for me with PHP 7.2 and Drupal 8.6.7

chandu7929’s picture

Patch #5 working fine with Drupal (8.6.7) and workbench_moderation (1.4.0) on PHP7.2

larowlan’s picture

Status: Reviewed & tested by the community » Fixed

Fixed, thanks

Status: Fixed » Closed (fixed)

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

sam-elayyoub’s picture

Here's patch to fix all bugs included this bug, with drupal code standards

larowlan’s picture

Status: Closed (fixed) » Fixed
larowlan’s picture

Status: Fixed » Closed (fixed)
larowlan’s picture

larowlan’s picture

Status: Closed (fixed) » Fixed
larowlan’s picture

larowlan’s picture

Status: Fixed » Closed (fixed)
larowlan’s picture