ChildInterface should not talk about documents ...
dantleech opened this issue · 4 comments
https://github.com/symfony-cmf/CoreBundle/pull/128/files
The child interface should not be talking about Documents as it is in the Model
folder, which applies equally to all types of objects.
Also I think that interfaces should all be put into a lightweight repository, i.e. https://github.com/dantleech/cmf-standard-lib to make them more accessible to other vendors..
agree on the naming, no need for discussion there. can you do a quick PR for that?
for the library: yeah i start to see your point. the standard lib would just contain all the interfaces that we currently dump into CoreBundle, and many bundles could depend on that library instead of CoreBundle. i suggest we start doing that, but as we need to keep empty BC interfaces extending the base interface in CoreBundle anyways, i would prefer to release 1.1 without this. we are really close, and we can release 1.2 in 2 months.
ouch, its not just the doc comments, but also the method name itself. i start to wonder if we want to remove ChildInterface alltogether and go with https://github.com/doctrine/phpcr-odm/blob/master/lib/Doctrine/ODM/PHPCR/HierarchyInterface.php instead. we could additionally support other interfaces that are more neutral for the orm, but the phpcr-odm documents would have no problem at all to implement that interface. note that i propose to change the methods to getParentDocument setParentDocument there as well: doctrine/phpcr-odm#484
the admin extension could basically just use duck typing or handle both phpcr-odm documents with the HiearchyInterface and for example the https://github.com/Atlantic18/DoctrineExtensions/blob/master/lib/Gedmo/Tree/Entity/MappedSuperclass/AbstractClosure.php with its weird ancestor instead of parent in getter and setter.