0
votes

Faced this problem today. Could not find the cause or even a solution online. I did a quick fix, not sure how this is going to affect me later. If anyone has a better solution, do share. Thanks.

Got this error while trying to list the users FatalErrorException: Error: Class 'Sonata\AdminBundle\Form\Type\BooleanType' not found in ..vendor\sonata-project\doctrine-orm-admin-bundle\Sonata\DoctrineORMAdminBundle\Filter\BooleanFilter.php

What I did to fix it was to change
{#vendor\sonata-project\doctrine-orm-admin-bundle\Sonata\DoctrineORMAdminBundle\Filter\BooleanFilter.php#}
use Sonata\AdminBundle\Form\Type\BooleanType;
use Sonata\CoreBundle\Form\Type\BooleanType;
use Sonata\AdminBundle\Datagrid\ProxyQueryInterface;

2

2 Answers

1
votes

Looks like you're using an old version of AdminBundle with a newer, incompatible version of the CoreBundle.

The BooleanType form-type among others has been moved from the AdminBundle to the CoreBundle.

This commit introduced them in the CoreBundle 15 days ago.

Update both bundles to the latest versions to resolve the issue.

1
votes

if you're using a dev-master version of the sonataadminbundle you should also use dev-master of all of sonata dependencies. the following commit address the issue in the same way as you did. Hopefully in a new future this will be marked as a stable version.