symfony-cmf/core-bundle

Resolve unexpected dependency from CoreBundle to SonataAdminBundle

aalexandrov opened this issue · 2 comments

Due to the recent addition of the PublishWorkflowExtension.php, the CoreBundle now depends on some classes from the SonataAdminBundle included explicitly in the extension.

This dependency should be reflected under "require" in composer.json, or the PublishWorkflowExtension.php execution in the post-install composer.phar hooks should be made optional by default.

I managed to fix this by adding "sonata-project/doctrine-phpcr-admin-bundle": "1.0.*" to my project's composer.json, but I guess this is not an ideal solution.

dbu commented

we are currently refactoring the publish workflow in #59 - including the service definition, so we could do things there. i was assuming that just having the service defined should not lead to a problem as when there is no sonata, it would never be requested. when and how exactly do you see the issue?

the intention is to keep sonata admin optional.

dbu commented

i just removed the sonata-project/admin-bundle and sonata-project/doctrine-phpcr-admin-bundle in the cmf sandbox and removed all sonata related configuration. then i just needed a dummy route for the "Admin" entry in the demo menu and could load the home page of the sandbox.

so i don't see where or how we would have the dependency. can you tell me how to produce the exception?