Reputation: 391
Compile Error: Declaration of Sonata\FormatterBundle\Block\FormatterBlockService::validateBlock() must be compatible with Sonata\BlockBundle\Block\BlockAdminServiceInterface::validateBlock(Sonata\CoreBundle\Validator\ErrorElement $errorElement, Sonata\BlockBundle\Model\BlockInterface $block)
At the same time:
PHP Fatal error: Declaration of Sonata\AdminBundle\Block\AdminListBlockService::validateBlock() must be compatible with Sonata\BlockBundle\Block\BlockServiceInterface::validateBlock(Sonata\AdminBundle\Validator\ErrorElement $errorElement, Sonata\BlockBundle\Model\BlockInterface $block) in /phpProjects/vendor/sonata-project/admin-bundle/Block/AdminListBlockService.php on line 105
Here is my composer.json
"php": ">=5.4",
"symfony/symfony": "2.6.*",
"doctrine/orm": "~2.2,>=2.2.3",
"doctrine/doctrine-bundle": "~1.2",
"twig/extensions": "~1.0",
"symfony/assetic-bundle": "~2.3",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~3.0",
"sensio/framework-extra-bundle": "~3.0",
"incenteev/composer-parameter-handler": "~2.0",
"friendsofsymfony/user-bundle": "~1.3@dev",
"knplabs/knp-menu-bundle": "1.1.*@dev",
"sonata-project/core-bundle": "~2.2@dev",
"sonata-project/intl-bundle": "~2.2",
"sonata-project/cache-bundle": "~2.2@dev",
"sonata-project/easy-extends-bundle": "~2.1",
"sonata-project/admin-bundle": "~2.3@dev",
"sonata-project/doctrine-orm-admin-bundle": "~2.3@dev",
"sonata-project/block-bundle": "~2.2",
"sonata-project/exporter": "1.*",
"sonata-project/user-bundle": "~2.3@dev",
"sonata-project/formatter-bundle": "~2.3",
"sonata-project/datagrid-bundle": "~2.2@dev",
"sonata-project/media-bundle": "~2.3@dev",
"jms/serializer-bundle": "~0.11",
"jms/security-extra-bundle": "~1.5@dev",
"jms/di-extra-bundle": "~1.4@dev",
"jms/translation-bundle": "1.1.*@dev",
"friendsofsymfony/jsrouting-bundle": "~1.1",
"genemu/form-bundle": "2.2.*@dev",
"wbx/file-bundle": "dev-master",
Upvotes: 0
Views: 3495
Reputation: 391
The best solution, add dependency only directly use
I write to below
"friendsofsymfony/user-bundle": "~1.3",
"sonata-project/user-bundle": "3.0.1",
"sonata-project/cache-bundle": "~2.2@dev",
"sonata-project/intl-bundle": "~2.2",
"sonata-project/doctrine-orm-admin-bundle": "3.0.1",
"sonata-project/doctrine-mongodb-admin-bundle": "3.0.0"
SonataAdminBundle is SonataUserBundle's dependency. Remove SonataAdminBundle and let SonataUserBundle install the bundle. The others the same...
This is the best solution.
Upvotes: 0
Reputation: 113
I also had the same problem, and This is the way I solved it.
"php": "^5.3.9|^7.0",
"symfony/symfony": "~2.8",
"doctrine/orm": "^2.4.8",
"doctrine/doctrine-bundle": "~1.4",
"doctrine/data-fixtures": "^1.1",
"doctrine/doctrine-cache-bundle": "~1.0",
"twig/extensions": "~1.0",
"sensio/framework-extra-bundle": "^3.0.2",
"symfony/assetic-bundle": "~2.3",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"symfony-cmf/symfony-cmf": "1.3.*",
"symfony-cmf/simple-cms-bundle": "^1.3",
"symfony-cmf/create-bundle": "1.2.*",
"jackalope/jackalope-doctrine-dbal": "~1.1",
"nelmio/alice": "~1.0",
"symfony-cmf/routing-auto-bundle": "^1.1",
"symfony/security-acl": "^3.0",
"sonata-project/admin-bundle": "~2.3@dev",
"sensio/generator-bundle": "~2.3",
"sonata-project/doctrine-phpcr-admin-bundle": "^1.2.6",
"symfony-cmf/menu-bundle": "^2.0"
For now, it is working.
Upvotes: 0
Reputation: 21
Yesterday I've experienced same problem, supposed to be related with yesterday morning updates, today I've changed my composer.json and this is my working configuration:
"sonata-project/core-bundle": "2.3.*@dev",
"sonata-project/admin-bundle": "2.4.*@dev",
"sonata-project/user-bundle": "2.3.*@dev",
"sonata-project/doctrine-mongodb-admin-bundle": "2.3.*@dev",
"sonata-project/easy-extends-bundle": "2.1.*@dev",
"sonata-project/block-bundle": "2.3.*@dev",
"sonata-project/doctrine-orm-admin-bundle": "2.3.*@dev",
"sonata-project/cache-bundle": "~2.2@dev",
"sonata-project/seo-bundle": "2.0.*@dev",
"sonata-project/notification-bundle": "~2.3@dev",
"symfony-cmf/routing-bundle": "~1.4@dev",
"sonata-project/page-bundle": "2.4.*@dev",
"sonata-project/datagrid-bundle": "2.2.*@dev"
Upvotes: 1
Reputation: 11
Same problem here. It seems that something has changed in "sonata-project/admin-bundle": "~2.3@dev" within last 2 days and now its failing (this setup worked 2 days ago). I rolled back to sonata 2.2 which is working. I suggest creating an issue on github.
"sonata-project/core-bundle": "dev-master", "sonata-project/block-bundle": "dev-master", "sonata-project/admin-bundle": "dev-master", "sonata-project/easy-extends-bundle": "dev-master", "sonata-project/jquery-bundle": "dev-master", "sonata-project/doctrine-orm-admin-bundle": "dev-master",
Upvotes: 1