sonata-project / SonataMediaBundle

Symfony SonataMediaBundle
https://docs.sonata-project.org/projects/SonataMediaBundle
MIT License
451 stars 495 forks source link

BooleanType not found #445

Closed sunviwo closed 10 years ago

sunviwo commented 10 years ago

I'm getting the following error when trying to get the list views of medias and galleries in the Admin: FatalErrorException: Error: Class 'Sonata\CoreBundle\Form\Type\BooleanType' not found in C:\wamp\www\Jjtossa\vendor\sonata-project\doctrine-orm-admin-bundle\Sonata\DoctrineORMAdminBundle\Filter\BooleanFilter.php line 45 No idea how to fix it. Thanks for any help

sunviwo commented 10 years ago

Fixed by installing SonataCoreBundle.

mikemeier commented 10 years ago

Installed the SonataCoreBundle, error still occurs.

Error: Class 'Sonata\AdminBundle\Form\Type\BooleanType' not found

Triggered by listview -> buildPager. Tries to use a boolean type in the DatagridMapper -> fails.

rande commented 10 years ago

please update your bundles.

mikemeier commented 10 years ago

"sonata-project/doctrine-orm-admin-bundle": "~2.2", "sonata-project/media-bundle": "~2.2",

AppKernel: SonataMediaBundle, SonataCacheBundle, SonataEasyExtendsBundle, ApplicationSonataMediaBundle, SonataBlockBundle, SonatajQueryBundle, SonataAdminBundle, SonataDoctrineORMAdminBundle, SonataIntlBundle, SonataCoreBundle

sonata-project/admin-bundle@2.2.9 orm-admin-bundle@2.2.5 media-bundle@2.2.5

mikemeier commented 10 years ago

Thats working:

"sonata-project/admin-bundle": "2.2.*@dev",
"sonata-project/media-bundle": "2.2.*@dev",
"sonata-project/doctrine-orm-admin-bundle": "2.2.*@dev",

In live projects, i'd like to use stable versions... Is there a stable combination?

rande commented 10 years ago

once the migration to the core bundle will be over, we will release stable version of each bundle

mikemeier commented 10 years ago

But you moved the BooleanType already from sonata admin bundle, and tagged it with 2.2.9 instead of 3.0.0? That was a BC, isnt it?

rande commented 10 years ago

@mikemeier in theory, you are right. However Sonata's versionning scheme does not respect this. 2.2 means the code is working with symfony2.2 and upper. Which of course, it is far from an ideal situation.

We cannot maintain too many branches, so just upgrade your code ...

mikemeier commented 10 years ago

Really far from an ideal situation.

So I only dont understand why you already tagged the sonata admin bundle, and not the doctrine-orm-admin-bundle?

rande commented 10 years ago

The "sonata-project/doctrine-orm-admin-bundle": "2.2.5" should work I guess

Glideh commented 10 years ago

I've also only been able to use

"sonata-project/admin-bundle": "2.2.*@dev",
"sonata-project/doctrine-orm-admin-bundle": "2.2.*@dev",