Problem/Motivation

Error message / site crash after upgrading Drupal Core from 10.3.10 to 10.4.1:

Fatal error: Declaration of Drupal\business_rules\BusinessRulesBreadcrumb::applies(Drupal\Core\Routing\RouteMatchInterface $route_match) must be compatible with Drupal\system\PathBasedBreadcrumbBuilder::applies(Drupal\Core\Routing\RouteMatchInterface $route_match, ?Drupal\Core\Cache\CacheableMetadata $cacheable_metadata = null) in /var/www/docroot/modules/contrib/business_rules/src/BusinessRulesBreadcrumb.php on line 19

Then tried to upgrade to 10.4.0 and got the same error so it seems to be imcompatible from that module on.

Steps to reproduce

  1. Have a site running with Drupal 10.3.10 with Business rules 3.0.0-beta1
  2. Upgrade Drupal Core to 10.4.0 or 10.4.1 (I use composer)
  3. Try to run a drush command (ex: drush cr or drush updb) or try to refresh the site (same error message)

Proposed resolution

n/a

Remaining tasks

n/a

User interface changes

n/a

API changes

n/a

Data model changes

n/a

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

aarantes created an issue. See original summary.

den tweed’s picture

eddylbs’s picture

Thanks, this patch works for me.

aarantes’s picture

The patch works for me too. Thanks!

aswathyajish’s picture

I also have the same issue when upgrading from 10.3.8 to 10.4.1. Applying the patch #2 saved my day. Thanks.

davidkp’s picture

Thanks for the patch :)

chhavi.sharma’s picture

Assigned: Unassigned » chhavi.sharma

chhavi.sharma’s picture

Assigned: chhavi.sharma » Unassigned
Status: Active » Needs review

Applied patch to ensure compatibility of module with Drupal 10.4 and above. It needs to be reviewed.

dhruv.mittal’s picture

Status: Needs review » Needs work

@chhavi.sharma Thanks for the MR. However, it seems the phpunit is failing due to this merge request. Please take a look.