Problem/Motivation

When install new version 2.1.6 and use the command vendor/bin/drush config:inspect --filter-keys=olivero.settings --detail --list-constraints y get this error:

➜  🤖 Analyzing…

Error: Class "Drupal\config_inspector\Commands\Yaml" not found in /var/www/html/modules/contrib/config_inspector/src/Commands/InspectorCommands.php on line 365 #0 [internal function]: Drupal\config_inspector\Commands\InspectorCommands::Drupal\config_inspector\Commands\{closure}('ValidKeys', '<infer>')
#1 /var/www/html/modules/contrib/config_inspector/src/Commands/InspectorCommands.php(364): array_map(Object(Closure), Array, Array)
#2 /var/www/html/modules/contrib/config_inspector/src/Commands/InspectorCommands.php(219): Drupal\config_inspector\Commands\InspectorCommands::getPrintableConstraints(Object(Drupal\config_inspector\ConfigSchemaValidatability), 'olivero.setting...')
#3 [internal function]: Drupal\config_inspector\Commands\InspectorCommands->inspect('olivero.setting...', Array)
#4 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(276): call_user_func_array(Array, Array)
#5 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
#6 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(175): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#7 /var/www/html/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(387): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#8 /var/www/html/vendor/symfony/console/Command/Command.php(326): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /var/www/html/vendor/symfony/console/Application.php(1081): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /var/www/html/vendor/symfony/console/Application.php(320): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /var/www/html/vendor/symfony/console/Application.php(174): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(110): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(40): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /var/www/html/vendor/drush/drush/drush.php(139): Drush\Runtime\Runtime->run(Array)
#15 /var/www/html/vendor/drush/drush/drush(4): require('/var/www/html/v...')
#16 /var/www/html/vendor/bin/drush(120): include('/var/www/html/v...')
#17 {main}
Error: Class "Drupal\config_inspector\Commands\Yaml" not found in Drupal\config_inspector\Commands\InspectorCommands::Drupal\config_inspector\Commands\{closure}() (line 365 of /var/www/html/modules/contrib/config_inspector/src/Commands/InspectorCommands.php).
 [warning] Drush command terminated abnormally.
Failed to execute command vendor/bin/drush config:inspect --filter-keys=olivero.settings --detail --list-constraints: exit status 1

Steps to reproduce

  1. Get a local git clone of Drupal core 11.x.
  2. composer require drupal/config_inspector:^2.1.6
  3. composer require drush/drush
  4. vendor/bin/drush config:inspect --filter-keys=olivero.settings --detail --list-constraints

With these steps it fails, if you come back to 2.1.5 version it works.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

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

cesarmsfelipe created an issue. See original summary.

cesarmsfelipe’s picture

Issue summary: View changes

nireneko made their first commit to this issue’s fork.

nireneko’s picture

Status: Active » Needs review
wim leers’s picture

Version: 2.1.6 » 2.1.x-dev
Status: Needs review » Reviewed & tested by the community

I'm flabbergasted that this hasn't caused problems for anyone so far 😮

wim leers’s picture

  • Wim Leers committed 10c71c99 on 2.1.x authored by nireneko
    Issue #3396399 by nireneko, cesarmsfelipe, Wim Leers: Error: Class "...
wim leers’s picture

Status: Reviewed & tested by the community » Fixed
wim leers’s picture

Status: Fixed » Closed (fixed)

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