Kunstmaan / KunstmaanBundlesCMS

An advanced yet user-friendly content management system, based on the full stack Symfony framework combined with a whole host of community bundles. It provides a full featured, multi-language CMS system with an innovative page and form assembling process, versioning, workflow, translation and media managers and much more.
https://kunstmaancms.be
MIT License
402 stars 186 forks source link

Attempted to call an undefined method named "validateTargetDir" #810

Closed nochecksum closed 8 years ago

nochecksum commented 8 years ago

SensioGeneratorBundle Validator's support for validateTargetDir() was removed but called from GenerateBundleCommand

Steps to repeat: $ composer create-project kunstmaan/bundles-standard-edition myproject with defaults $ app/console kuma:gen:bun Namespace Nochecksum/WebsiteBundle with defaults

PHP Fatal error:  Call to undefined method Sensio\Bundle\GeneratorBundle\Command\Validators::validateTargetDir() in /screencasts/myproject/vendor/kunstmaan/bundles-cms/src/Kunstmaan/GeneratorBundle/Command/GenerateBundleCommand.php on line 165
PHP Stack trace:
PHP   1. {main}() /screencasts/myproject/app/console:0
PHP   2. Symfony\Component\Console\Application->run() /screencasts/myproject/app/console:27
PHP   3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() /screencasts/myproject/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:120
PHP   4. Symfony\Component\Console\Application->doRun() /screencasts/myproject/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:96
PHP   5. Symfony\Component\Console\Application->doRunCommand() /screencasts/myproject/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:189
PHP   6. Symfony\Component\Console\Command\Command->run() /screencasts/myproject/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:846
PHP   7. Kunstmaan\GeneratorBundle\Command\GenerateBundleCommand->interact() /screencasts/myproject/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:241
PHP   8. Symfony\Component\Console\Helper\QuestionHelper->ask() /screencasts/myproject/vendor/kunstmaan/bundles-cms/src/Kunstmaan/GeneratorBundle/Command/GenerateBundleCommand.php:167
PHP   9. Symfony\Component\Console\Helper\QuestionHelper->validateAttempts() /screencasts/myproject/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/QuestionHelper.php:63
PHP  10. call_user_func:{/screencasts/myproject/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/QuestionHelper.php:396}() /screencasts/myproject/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/QuestionHelper.php:396
PHP  11. Kunstmaan\GeneratorBundle\Command\GenerateBundleCommand->Kunstmaan\GeneratorBundle\Command\{closure}() /screencasts/myproject/vendor/symfony/symfony/src/Symfony/Component/Console/Helper/QuestionHelper.php:396

Fatal error: Call to undefined method Sensio\Bundle\GeneratorBundle\Command\Validators::validateTargetDir() in /screencasts/myproject/vendor/kunstmaan/bundles-cms/src/Kunstmaan/GeneratorBundle/Command/GenerateBundleCommand.php on line 165```
ghost commented 8 years ago

I got this error as well. To work around it, I've added:

"sensio/generator-bundle": "2.5.3"

to my composer.json file.

jockri commented 8 years ago

I think we should remove/replace the validateTargetDir function calls, so that the CMS will be compatible with new SensioGeneratorBundle versions.

jockri commented 8 years ago

Fixed with https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/815