Closed MaxArt2501 closed 8 years ago
Hi @MaxArt2501!
You can have a look at the composer.json
of the CMF sandbox during the 1.3.0 release. This is a fully working set of dependencies using CMF 1.3 and Sonata packages.
Sonata before 3.0 has always been very hard to integrate in the project, because they add backwards compatibility breaks in almost every release. This is the reason you get these small version constraints. I'm not sure we can do anything about it. IIRC, this is also the reason we can't support BlockBundle 3.0 in a CMfBlockBundle 1.3 release (they changed argument typehints of methods we have to overwrite).
Btw, you don't have to be worried about the generator-bundle regrading. This bundle is only used when you use the generator commands. So it wouldn't hurt your application at all.
Thank you for the quick response!
Good suggestion about the sandbox, it seems it is possible to use a more recent, up-to-date admin-bundle
. So, as an alternative, I could have required an older version of sonata-project/block-bundle
(like 2.2.x) and get admin-bundle:2.3.10
.
I look forward for CMF v2.0 when all this will be solved.
I look forward for CMF v2.0 when all this will be solved.
Please note that in CMF 2.0, Sonata stuff will all be moved to a new SonataIntegration bundle. I'm not sure if we can make a release of that bundle at the same time as the 2.0 release of other CMF bundles (as we're hold up by Sonata on that bundle, while we really want to have stable versions that support Sf 3.0).
I assume this issue is now solved and it can be closed?
Well it doesn't actually solve the issue but if there's nothing that can be done I guess this can be closed. This can be as good as a guide for newcomers.
Not out of the box, at least.
As soon as I installed v1.3 as specified in the official docs (with
compose create-project
, that is), I tried to install Sonata's PHPCR admin bundle with justcomposer require sonata-project/doctrine-phpcr-admin-bundle
. But the requested packages conflicted with the ones installed by the created project.The problematic package was
sonata-project/block-bundle
, which was locked to 2.3.9. Butsonata-project/admin-bundle
3.x, which is required bydoctrine-phpcr-admin-bundle
, requires it to be ^3.0.What I had to do was:
sensio/generator-bundle
to version ~2.5 (as it was necessary for theadmin-bundle
I had to use);sonata-project/admin-bundle:2.3.1
(because from 2.3.2 it limitedsonata-project/block-bundle
to the very tiny range ~2.2,>=2.2.7,<2.3);sonata-project/doctrine-phpcr-admin-bundle
.This is clearly sub-optimal and tiresome for developers who just want to start already. I don't even know if I could have made a better choice (any suggestions?). In particular I'm worried about regrading
generator-bundle
and providing a version ofsonata-project/block-bundle
that has been excluded byadmin-bundle
a bugfix-version later.I understand the development of this package is focused on v2.0, but is there a chance to overcome this issue? Could
symfony-cmf/block-bundle:1.3
be compatible withsonata-project/block-bundle:3.x
? That would solve basically everything, if I'm not mistaken.