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

Export doesn't work anymore #7134

Closed VincentLanglet closed 3 years ago

VincentLanglet commented 3 years ago

Environment

Sonata packages

$ composer show --latest 'sonata-project/*'
sonata-project/admin-bundle              3.98.1 3.98.1 The missing Symfony Admin Generator
sonata-project/block-bundle              4.5.3  4.5.3  Symfony SonataBlockBundle
sonata-project/cache                     2.1.1  2.1.1  Cache library
sonata-project/doctrine-extensions       1.12.0 1.12.0 Doctrine2 behavioral extensions
sonata-project/doctrine-orm-admin-bundle 3.33.0 3.33.0 Integrate Doctrine ORM into the SonataAdminBundle
sonata-project/exporter                  2.6.2  2.6.2  Lightweight Exporter library
sonata-project/form-extensions           1.9.0  1.9.0  Symfony form extensions
sonata-project/twig-extensions           1.5.1  1.5.1  Sonata twig extensions

Actual results

You have requested a non-existent service "sonata.exporter.exporter.do-not-use". Did you mean this: "sonata.exporter.exporter"
/vendor/sonata-project/admin-bundle/src/Controller/CRUDController.php in Sonata\AdminBundle\Controller\CRUDController::exportAction at line 962

cc @eerison

eerison commented 3 years ago

Ok, I'll take a look on this bug ;)

eerison commented 3 years ago

I'll confirm that later, But I guess need to add an alias here: https://github.com/sonata-project/exporter/blob/2.x/src/Bridge/Symfony/Resources/config/services.xml#L25

franmomu commented 3 years ago

In this case I would just remove the .do-not-use since it is not a service from this bundle.

It would be strange to create an alias with .do-not-use and actually use it in another bundle.

jordisala1991 commented 3 years ago

This line is wrong: https://github.com/sonata-project/SonataAdminBundle/blob/d471f78383af57902d54547223291cba8169ac7d/src/Controller/CRUDController.php#L962