When visiting admin/config/development/generate/content or attempt to generate content using drush, the error
Fatal error: Declaration of Drupal\devel_generate\Plugin\DevelGenerate\ContentDevelGenerate::create() must be compatible with Drupal\Core\Plugin\ContainerFactoryPluginInterface::create(Symfony\Component\DependencyInjection\ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) in /~/modules/devel/devel_generate/lib/Drupal/devel_generate/Plugin/DevelGenerate/ContentDevelGenerate.php on line 35
Appears on 8.x-alpha10 or alpha11. Running on VM with Apache 2.4, php 5.5.
Comment | File | Size | Author |
---|---|---|---|
#2 | fix-for-container-interface.patch | 900 bytes | manuelbg |
Comments
Comment #1
dqdconfirmed. also appears on latest git clone 8.x by using
drush genc
(drush v.7.0).Plus: No devel nor devel generate appears in the admin area so drush is the only option but causes the same error.
Comment #2
manuelbg CreditAttribution: manuelbg commentedI change the create definition because the $plugin_definition param as array is not needed.
Comment #3
John_B CreditAttribution: John_B commentedThe patch works, thank you. Tested in browsers and with drush genc.
It did not apply using git: copy patch to modules/devel, run
git apply -v fix-for-container-interface.patch
returns no output and does not update the file concerned.
Applying the patch using patch command works.
I have also read the code, and have marked the issue RTBC on the assumption that once the change is committed the failure of 'git apply' will not be an issue.
Comment #4
pcambraThanks for the fix, pushed to 8.x!
Comment #8
pcambra