symfony-cmf / media-bundle

UNMAINTAINED - Minimalistic interfaces to handle media in the context of the CMF
http://cmf.symfony.com/
30 stars 40 forks source link

rename setParent() to setParentDocument()? #102

Closed lsmith77 closed 10 years ago

lsmith77 commented 10 years ago

https://github.com/symfony-cmf/MediaBundle/blob/master/Doctrine/Phpcr/File.php#L66

dbu commented 10 years ago

i guess i missed this here https://github.com/symfony-cmf/symfony-cmf/issues/188 because we have no sonata admin and i was looking for the sonata admin parent hack we had before the ChildExtension.

+1 to implement ChildInterface and deprecate setParent in favor of setParentDocument.

rmsint commented 10 years ago

I remember some discussion about this, the phpcr file also uses parent instead of parentDocument. https://github.com/doctrine/phpcr-odm/blob/master/lib/Doctrine/ODM/PHPCR/Document/AbstractFile.php#L97

Maybe that one also needs to be updated?

dbu commented 10 years ago

i think for phpcr-odm we do not want to depend on the CmfCoreBundle so i think we don't need to change there.

dbu commented 10 years ago

this is related to the discussion about the interface package. implementing the ChildInterface would create a dependency on the CoreBundle for our phpcr-odm models. we can consider that an optional dependency as not everybody will want to use the phpcr-odm models.

dbu commented 10 years ago

thought some more about this and did https://github.com/doctrine/phpcr-odm/pull/484 - the annotation is called ParentDocument and it just makes more sense.

lsmith77 commented 10 years ago

merged

dbu commented 10 years ago

if we support phpcr-odm HierarchyInterface in the admin extension, we can do all this a lot easier. see https://github.com/symfony-cmf/CoreBundle/issues/137