symfony-cmf / symfony-cmf-docs

The documentation for the symfony content management framework
http://cmf.symfony.com
44 stars 157 forks source link

Is the @PHPCR\String() annotation deprecated? #735

Closed alexislefebvre closed 8 years ago

alexislefebvre commented 8 years ago

On http://symfony.com/doc/master/cmf/book/database_layer.html#add-mapping-information, we can see this code:

class Task
{
    /...

    /**
     * @PHPCR\String()
     */
    protected $description;

Isn't the @PHPCR\String() annotation deprecated? See https://github.com/doctrine/mongodb-odm/issues/1168 or https://github.com/doctrine/phpcr-odm/issues/678 for examples.

I can submit a PR with the annotations if you want.

wouterj commented 8 years ago

Yes, it is. When using PHPCR ODM 1.3, you should use @PHPCR\Field(type="string") instead. If you can fix the article, I would be more than happy to merge your PR :)