[DCOM-259] Doctrine Annotations with php-cs-fixer and traits Created: 26/Nov/14  Updated: 26/Nov/14  Resolved: 26/Nov/14

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Cliff Odijk Assignee: Marco Pivetta
Resolution: Invalid Votes: 0
Labels: None


 Description   

We are using the php-cs-fixer (version 1.1 from FriendsOfPHP) which removes unused use statements and I think that keeps our code clean. But when i'm trying to use the annotations from the Atlantic18/DoctrineExtensions Timestampable the annotation reader complains that it is never imported. And thats because the import is happening in the trait and not the class

The trait that we are trying to use.
https://github.com/Atlantic18/DoctrineExtensions/blob/master/lib/Gedmo/Timestampable/Traits/TimestampableEntity.php

And here it reads the use statements of the file but not the traits.
https://github.com/doctrine/annotations/blob/master/lib/Doctrine/Common/Annotations/PhpParser.php#L57



 Comments   
Comment by Cliff Odijk [ 26/Nov/14 ]

It happens when you try to use a trait inside a other trait

Comment by Marco Pivetta [ 26/Nov/14 ]

Not a doctrine-project issue





Generated at Fri Nov 28 17:15:49 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.