Closed ibasaw closed 7 years ago
fix by #963 PR
How I can fix this error:
Catchable Fatal Error: Argument 1 passed to Sonata\MediaBundle\Provider\Pool::validate() must be an instance of Sonata\AdminBundle\Validator\ErrorElement, instance of Sonata\CoreBundle\Validator\ErrorElement given
I am using this:-
"php": ">=5.3.3", "symfony/symfony": "2.6.*", "sonata-project/admin-bundle": "^2.3", "sonata-project/media-bundle": "^2.3.x-dev",
You should upgrade to SonataAdminBundle 3.x, 2.3. isn't supported anymore.
Shouldn't be that hard, check our UPGRADE.md
Sonata Admin3.x is compatible with Symfony2.6 ?? Because I am working on going project .
By the way same error is coming with SonataAdminBundle 3.x
search for Sonata\CoreBundle\Validator\ErrorElement
in your custom code and replace it with the class noticed in the error message
Thanks for reply. I am not using any custom class. Just Use default Sonata Media Bundle.
This is my whole composer.json
"php": ">=5.3.3",
"symfony/symfony": "2.6.*",
"doctrine/orm": "~2.2,>=2.2.3,<2.5",
"doctrine/dbal": "<2.5",
"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,>=3.0.12",
"sensio/framework-extra-bundle": "~3.0,>=3.0.2",
"incenteev/composer-parameter-handler": "~2.0",
"sonata-project/admin-bundle": "3.x",
"sonata-project/doctrine-orm-admin-bundle": "^2.3",
"gedmo/doctrine-extensions": "^2.4",
"sonata-project/user-bundle": "^2.2",
"friendsofsymfony/user-bundle": "^1.3",
"sonata-project/easy-extends-bundle": "^2.1",
"knplabs/knp-menu": "~1.1",
"knplabs/knp-menu-bundle": "~1.1",
"sonata-project/media-bundle": "^3.6",
"sonata-project/intl-bundle": "^2.2",
"jms/serializer-bundle": "~0.13",
"stof/doctrine-extensions-bundle": "^1.2",
"ob/highcharts-bundle": "^1.2",
"egeloen/ckeditor-bundle": "^3.0",
"friendsofsymfony/rest-bundle": "^1.7",
"friendsofsymfony/elastica-bundle": "^3.1",
"knplabs/knp-paginator-bundle": "^2.5",
"aws/aws-sdk-php": "2.8.22",
"amazonwebservices/aws-sdk-for-php": "dev-master",
"KnpLabs/Gaufrette": "dev-master",
"knplabs/knp-gaufrette-bundle": "dev-master",
"vich/uploader-bundle": "0.14.*",
When I am running this command sudo php composer.phar then showing old version and in composer.json all admin and media are new bundle version ???
Off topic, but you should not need sudo
SF2.8.4dev
got this error after a composer update