Closed antonintouron closed 2 years ago
The issue is that sonata-project/exporter": "^2.0
was not in the dependencies so you're installing 3.0 in which the class was removed.
I'll do a fix. But you can require sonata-project/exporter": "^2.0"
to fix your issue temporary.
thanks it's work with exporter 2.11 !
Environment
Sonata packages
show
``` $ composer show --latest 'sonata-project/*' - patch or minor release available - update recommended - major release available - update possible - up to date version sonata-project/admin-bundle 4.16.0 4.16.0 The missing Symfony Admin Generator sonata-project/block-bundle 4.16.0 4.16.0 Symfony SonataBlockBundle sonata-project/cache 2.2.0 2.2.0 Cache library Package sonata-project/cache is abandoned, you should avoid using it. No replacement was suggested. sonata-project/doctrine-extensions 2.0.0 2.0.0 Doctrine2 behavioral extensions sonata-project/doctrine-mongodb-admin-bundle 4.3.3 4.3.3 Symfony Sonata / Integrate Doctrine MongoDB ODM into the SonataAdminBundle sonata-project/exporter 3.0.0 3.0.0 Lightweight Exporter library sonata-project/form-extensions 1.18.0 1.18.0 Symfony form extensions sonata-project/twig-extensions 2.0.0 2.0.0 Sonata twig extensions ```
PHP version
Subject
When your install bundle with
composer require sonata-project/doctrine-mongodb-admin-bundle
you have an PHP fatal error :Fatal error: During inheritance of Sonata\DoctrineMongoDBAdminBundle\Exporter\DataSource, while autoloading Sonata\Exporter\Source\SourceIteratorInterface: Uncaught ReflectionException: Cl ass "Sonata\Exporter\Source\SourceIteratorInterface" not found while loading "Sonata\DoctrineMongoDBAdminBundle\Exporter\DataSource". in /var/www/html/vendor/symfony/error-handler/DebugClassLo ader.php:285
Minimal repository with the bug
Steps to reproduce
Expected results
This error on sonataDoctrineMongoDBAdminBundle installation :
Fatal error: During inheritance of Sonata\DoctrineMongoDBAdminBundle\Exporter\DataSource, while autoloading Sonata\Exporter\Source\SourceIteratorInterface: Uncaught ReflectionException: Cl ass "Sonata\Exporter\Source\SourceIteratorInterface" not found while loading "Sonata\DoctrineMongoDBAdminBundle\Exporter\DataSource". in /var/www/html/vendor/symfony/error-handler/DebugClassLo ader.php:285
Solution
SourceIteratorInterface
used on return function ofcreateIterator
not exist, replace byDoctrineODMQuerySourceIterator
work, but it's fine ?