Skip to content

deprecate the phpcr_odm_reference_collection form type in favor of phpcr_document #102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 16, 2013

Conversation

dbu
Copy link
Member

@dbu dbu commented Dec 11, 2013

Q A
Bug fix? no
New feature? no
BC breaks? yes
Deprecations? yes
Tests pass? yes
Fixed tickets relates to symfony-cmf/symfony-cmf-docs#347
License MIT
Doc PR symfony-cmf/symfony-cmf-docs#351

afaict this form type does not even work (anymore?) and it seems the only thing it does that phpcr_document can not do better already is to allow to use the UUID instead of the path (as path is the primary id for phpcr-odm). not sure if that is worth anything - but if so we should port that into the phpcr_document type.

if we deprecate this now, would we drop it in version 1.2? i think this is not even usable, but i might be wrong so we could use the deprecation to hear from users.

@@ -21,6 +23,7 @@ class PHPCRODMReferenceCollectionType extends AbstractType
*/
function __construct(DocumentManager $dm)
{
trigger_error('This form type is deprecated in favor of phpcr_document. If you think this is an error, please contact us and explain. We where not able to figure out what this type is good for.', E_WARNING);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should triggering it in buildForm, i.e. when the type is used, rather than in __construct (which would trigger it if you register it non-lazily even without using it).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, was not aware of this. fixed now.

@dbu
Copy link
Member Author

dbu commented Dec 16, 2013

alright, merge this?

@dantleech
Copy link
Contributor

sounds good .. can we add UUID support to phpcr_document?

@dbu
Copy link
Member Author

dbu commented Dec 16, 2013

i would guess so - although i don't know how many classes we would need to extend for that. as i did not manage to get the reference_collection form type to work at all, i think we lose nothing be deprecating it here. but i created an issue for uuid support: #103.

dbu added a commit that referenced this pull request Dec 16, 2013
…type

deprecate the phpcr_odm_reference_collection form type in favor of phpcr_document
@dbu dbu merged commit 6461773 into master Dec 16, 2013
@dbu dbu deleted the deprecate-reference-collection-type branch December 16, 2013 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants