Problem/Motivation

After enabling `ds_devel`, I recieved the following error:

Fatal error: Declaration of Drupal\ds_devel\Routing\RouteSubscriber::getSubscribedEvents() must be compatible with Drupal\Core\Routing\RouteSubscriberBase::getSubscribedEvents(): array in /var/www/html/web/modules/contrib/ds/modules/ds_devel/src/Routing/RouteSubscriber.php on line 69

Steps to reproduce

- Install `drupal/ds`
- Visit `/admin/modules` and enable "Display Suite Devel" module
- After clicking save, the module caused the above error.

Issue fork ds-3338860

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

tyler36 created an issue. See original summary.

tyler36’s picture

Status: Active » Needs review
StatusFileSize
new1.16 KB

Status: Needs review » Needs work

The last submitted patch, 2: 3338860-2.patch, failed testing. View results

hyperlogos’s picture

Confirm this fixes the problem for me. This bug is site-breaking...

hemangi.gokhale’s picture

Status: Needs work » Needs review
StatusFileSize
new1.16 KB

Patch provided at #2 works as expected but as it is for version 5 cannot use this for version 3 of DS hence, providing backport patch.

hemangi.gokhale’s picture

StatusFileSize
new1.16 KB

The last submitted patch, 5: 3338860-5-d10-compatible.patch, failed testing. View results

pandaski’s picture

Status: Needs review » Reviewed & tested by the community

I came across this error in Drupal 10 and ds 3.15.0

The patch from #6 can fix the issue after local testing.

RTBC

tim-diels’s picture

Priority: Normal » Major

Experienced the same issue with Drupal 10.0.10 and DS 3.15.0. Patch #6 worked. So +1 RTBC.
Setting this to major as it breaks the site.

jan-e’s picture

RTBC +1

eigentor’s picture

Been also bitten by this after upgrading to Drupal 10 using Display Suite 3.15.
Can also confirm that Patch #6 works.
Shouldn't this be regarded even critical if it breaks the site?

swentel’s picture

Version: 5.0.x-dev » 8.x-3.x-dev

Moving to 8.x-3.x to double check

swentel’s picture

Status: Reviewed & tested by the community » Needs review

  • swentel committed dc4e5262 on 8.x-3.x
    Issue #3338860 by Hemangi Gokhale: Error using `ds_devel`
    
swentel’s picture

Status: Needs review » Fixed
swentel’s picture

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

After upgrading from 3.15 to 3.16, I started getting this error:

vendor/drush/drush/drush cr
PHP Fatal error:  Declaration of Drupal\ds_devel\Routing\RouteSubscriber::getSubscribedEvents() must be compatible with Drupal\Core\Routing\RouteSubscriberBase::getSubscribedEvents(): array in /var/www/html/mo2/web/modules/contrib/ds/modules/ds_devel/src/Routing/RouteSubscriber.php on line 69
 [warning] Drush command terminated abnormally.

Happy to test anything if you like.

swentel’s picture

Well, the patch is only dev, so you could always try upgrading to that, but I'm in middle of preparing a new release which should be out before holiday is over (so before january 7th somewhere).

bogdog400’s picture

Thx. I can wait for the full update.