sonata-project / SonataAdminBundle

The missing Symfony Admin Generator
https://docs.sonata-project.org/projects/SonataAdminBundle
MIT License
2.11k stars 1.26k forks source link

URGENT - FatalErrorException in Admin.php line 48 #2797

Closed webdevilopers closed 9 years ago

webdevilopers commented 9 years ago

After my recent composer update to dev-master I get: FatalErrorException in Admin.php line 48: Compile Error: Declaration of Sonata\AdminBundle\Admin\Admin::validate() must be compatible with Sonata\AdminBundle\Admin\AdminInterface::validate(Sonata\CoreBundle\Validator\ErrorElement $errorElement, $object)

Any help?

rande commented 9 years ago

The issue is fixed

webdevilopers commented 9 years ago

Thanks! That was the shortest living issue ever. :)

webdevilopers commented 9 years ago

@rande Can you give me a short hint how to force Composer use the current commit?

It still uses the old one not the 325b7b91c2

Updating dependencies (including require-dev)
  - Installing sonata-project/admin-bundle (dev-master 325b7b9)
webdevilopers commented 9 years ago

I removed my vendors sonata-project folder, my composer cache, installed 2.3.1. and switched back to: "sonata-project/admin-bundle": "dev-master".

But still composer is not installing the latest commit you merged @rande to fix this issue. :(

webdevilopers commented 9 years ago

I now tried "sonata-project/admin-bundle": "@dev" but that will give me a similar error: PHP Fatal error: Declaration of Sonata\MediaBundle\Block\GalleryBlockService::validateBlock() must be compatible with Sonata\BlockBundle\Block\BlockAdminServiceInterface::validateBlock(Sonata\CoreBundle\Validator\ErrorElement $errorElement, Sonata\BlockBundle\Model\BlockInterface $block) in /.../vendor/sonata-project/media-bundle/Block/GalleryBlockService.php on line 248 for "sonata-project/media-bundle": "2.3.*"

rande commented 9 years ago

we are migrating some lib to CoreBundle. Please we do know there is something broken, just use stable version or please be patient

webdevilopers commented 9 years ago

Good to know, thanks @rande . I see the admin commit now works. Any schedule when the migration will be done? I will wait then...

rande commented 9 years ago

This should be fixed

webdevilopers commented 9 years ago

I still get a PHP Fatal error: Declaration of Sonata\MediaBundle\Block\GalleryBlockService::validateBlock() must be compatible with Sonata\BlockBundle\Block\BlockAdminServiceInterface::validateBlock(Sonata\CoreBundle\Validator\ErrorElement $errorElement, Sonata\BlockBundle\Model\BlockInterface $block) in /.../vendor/sonata-project/media-bundle/Block/GalleryBlockService.php on line 248

I'm using:

        "sonata-project/block-bundle": "dev-master",
        "sonata-project/cache-bundle": "dev-master",
        "sonata-project/core-bundle": "dev-master",
        "sonata-project/media-bundle": "2.3.*"

Should I use dev-master by now @rande ? Because that give me: symfony/framework-standard-edition 2.5.x-dev requires sonata-project/media-bundle dev-master -> no matching package found.

webdevilopers commented 9 years ago

I finally managed to get the dev-master. But I had to include the ClassificationBundle too. Now I'm stucked with an older issue I had before:

Class 'Sonata\ClassificationBundle\Document\BaseContext' does not exist