Problem/Motivation
This is a two part problem.
Unable to install module due to error:
You have requested a non-existent service "Drupal\state_machine_ui\Hook\Sta
teMachineUiHooks". Fixed by verifying the install hook only fires in the runtime phase, otherwise the service is not yet loaded from the module.
After the module is installed, this error appears on cache clear:
Error: Class "Symfony\Component\Config\Loader\FileLoader" not found in /var/www/html/vendor/symfony/dependency-injection/Loader/FileLoader.php on line 37 #0 /var/www/html/vendor/composer/ClassLoader.php(576): include()
#1 /var/www/html/vendor/composer/ClassLoader.php(427): {closure:Composer\Autoload\ClassLoader::initializeIncludeClosure():575}()
#2 /var/www/html/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php(41): Composer\Autoload\ClassLoader->loadClass()The FileLoader class is provided by symfony/config, which is a dev dependency of symfony/dependency-injection.
I'll try adding it to this module's composer.json. I'm not sure if that's the right fix, but after adding it to my project's composer.json, cache clear is working.
Test by adding this to your root composer.json, above packages.drupal.org:
"repositories": [
{
"type": "vcs",
"url": "git@git.drupal.org:issue/state_machine_ui-3608746.git"
},
]
Then require it with:
composer require drupal/state_machine_ui:dev-3608746-fix_error -W
Issue fork state_machine_ui-3608746
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
Comment #2
mortona2k commentedComment #3
mortona2k commentedComment #4
mortona2k commented