Problem/Motivation

PHP Fatal error: Uncaught Error: Class "Symfony\Cmf\Component\Routing\RouteObjectInterface" not found in /home/xxx/smartbuild/web/modules/contrib/conditional_fields/src/Routing/RouteEnhancer.php:40

Proposed resolution

Class Drupal\conditional_fields\Routing\RouteEnhancer:

  • Remove use statement: use Symfony\Cmf\Component\Routing\RouteObjectInterface;
  • Replace with: use Drupal\Core\Routing\RouteObjectInterface;

Refer to #3323987: Wrong RouteObjectInterface for Drupal 10

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

jlscott created an issue. See original summary.

sarwan_verma’s picture

Assigned: Unassigned » sarwan_verma
jayelless’s picture

Not sure what is going on here.

The class Drupal\conditional_fields\Routing\RouteEnhancer id present in my codebase after Composer has loaded the relase "drupal/conditional_fields:4.0.0-alpha5", but is not present in the git repository of the module on branch 4.x after cloning as per version history?

This makes generation of a patch or pull request very difficult???

sarwan_verma’s picture

Assigned: sarwan_verma » Unassigned

Hi @jlscott,
This module is not present given directory /home/xxx/smartbuild/web/modules/contrib/conditional_fields/src/Routing/RouteEnhancer.php.

jayelless’s picture

Status: Active » Closed (works as designed)

This issue is my mistake, and I have found the problem, which is the patch in #2995827: Other entities work but without the additional manage display path like on node types that had been applied, was creating the Class referred to, so needs to be updated. I will fix that.