diff --git a/CHANGELOG.md b/CHANGELOG.md index 83b02ff8..9ab524e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ Changelog ========= +* **2013-12-11**: [Form] Deprecated the form type "phpcr_odm_reference_collection". + It seems to not work and "phpcr_document" should cover everything we need. + * **2013-11-27**: [Initializer] Parameter "doctrine_phpcr.initialize.initializers" no longer defined * Initializers are now collected using a compiler pass and injected into the new InitializerManager * **2013-11-27**: [Initializer] `doctrine:phpcr:fixtures:load` now executes all of the initializers diff --git a/Form/DataTransformer/ReferenceManyCollectionToArrayTransformer.php b/Form/DataTransformer/ReferenceManyCollectionToArrayTransformer.php index 327306f5..b97f6c15 100644 --- a/Form/DataTransformer/ReferenceManyCollectionToArrayTransformer.php +++ b/Form/DataTransformer/ReferenceManyCollectionToArrayTransformer.php @@ -6,6 +6,10 @@ use Doctrine\ODM\PHPCR\ReferenceManyCollection; use Doctrine\ODM\PHPCR\DocumentManager; +/** + * @deprecated This is only used by the deprecated PHPCRODMReferenceCollectionType. + * Will be removed in 1.2. + */ class ReferenceManyCollectionToArrayTransformer implements DataTransformerInterface { const KEY_PATH = 'path'; @@ -34,6 +38,8 @@ class ReferenceManyCollectionToArrayTransformer implements DataTransformerInterf */ function __construct(DocumentManager $dm, $referencedClass, $key = self::KEY_UUID) { + trigger_error('This 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); + $this->dm = $dm; $this->referencedClass = $referencedClass; @@ -68,4 +74,4 @@ public function reverseTransform($array) { return new ReferenceManyCollection($this->dm, $array, $this->referencedClass); } -} \ No newline at end of file +} diff --git a/Form/Type/PHPCRODMReferenceCollectionType.php b/Form/Type/PHPCRODMReferenceCollectionType.php index a8116d4e..c4eba699 100644 --- a/Form/Type/PHPCRODMReferenceCollectionType.php +++ b/Form/Type/PHPCRODMReferenceCollectionType.php @@ -10,6 +10,9 @@ /** * A type to handle a list of references as simple choice. + * + * @deprecated This seems to do nothing more than the DocumentType. + * Will be removed in 1.2. */ class PHPCRODMReferenceCollectionType extends AbstractType { @@ -59,6 +62,8 @@ public function setDefaultOptions(OptionsResolverInterface $resolver) */ public function buildForm(FormBuilderInterface $builder, array $options) { + 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); + $transformer = new ReferenceManyCollectionToArrayTransformer($this->dm, $options['referenced_class'], $options['key']); $builder->addModelTransformer($transformer); }