Closed VincentLanglet closed 3 years ago
What good will it do exactly, not to have to require the admin bundle or the exporter?
What good will it do exactly, not to have to require the admin bundle or the exporter?
For example, if the sonata-project/exporter
is not a requirement, someone could develop his own exporter. Actually it makes less sens to do it, since you still need to download the sonata-project/exporter
.
And I mainly had this idea when I discovered the SonataDatagridBundle
. Actually, the adminBundle requires the coreBundle which requires the datagridBundle. Almost all this classes have been duplicated in both adminBundle and datagridBundle. Do you know the reason ?
The same way we could have both the adminBundle and the datagridBundle to require SonataContract
in order to avoid the duplicates. Then you could either install the adminBundle and datagridBundle or just install the adminBundle and implements your own datagridBundle.
Do you know the reason ?
Maybe someone planned to deprecate one in favor of the other? I'd have a look at the git history if I were you, but I think the datagrid bundle is probably more recent than the admin bundle.
I think this might be a good idea, not sure if we can really have base classes in something called contracts though.
I think this might be a good idea, not sure if we can really have base classes in something called contracts though.
Yeah, I'm not sure either for the base classes.
I was thinking that if someone wanted to use the BaseFieldDescription, BaseManager, BasePager, etc... to help the implementation of the Interface, he would prefer avoid to install the whole bundle with the sonata implementation. Maybe others repository would be needed, but we can just start with one repository with Interfaces and Exceptions.
A question would be, should we try doing this for the 4.0 (does it help ?), or wait for the 5.0 release.
Maybe someone planned to deprecate one in favor of the other? I'd have a look at the git history if I were you, but I think the datagrid bundle is probably more recent than the admin bundle.
I found my answer here: https://github.com/sonata-project/SonataDatagridBundle/issues/19#issuecomment-219032393
@greg0ire I'd like to try a POC for Sonata contracts. How does it work to create a new repository ? Should the team vote about this idea ?
In order to create a PoC, I guess you could use your own VCS repository: https://getcomposer.org/doc/05-repositories.md#loading-a-package-from-a-vcs-repository Then, if the proposal is accepted, the new repository could be created under sonata-project organization.
Symfony create https://github.com/symfony/contracts
I think we should do something similar.
IMHO, the
SonataDoctrineORMBundle
shouldn't require theSonataAdminBundle
orSonataExporterBundle
but only aSonataContract
because it only use the Interface and some BaseThings abstract classes.This would maybe also help to avoid having the same classes in
SonataDatagridBundle
andSonataAdminBundle
.WDYT @sonata-project/contributors ?