Hi All:
I am use php 5.4.15, MS windows Pro 64bits, apache 2.4 and Symfony 2.2.
Did any one noticed ReflectionProperty::getDocComment() function some time
return false without any reason?
I have an Symfony project and use annotation, some time annotation just not
working. And I have found out that
Symfony uses ReflectionProperty::getDocComment() to grab comment for
annotation purpose.
For example:
/**
*
* @ORM\Entity
* @ORM\Table(name="orders")
*
*/
class Order
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
@ORM\OneToOne(targetEntity="JMS\Payment\CoreBundle\Entity\PaymentInstruction
") */
protected $paymentInstruction;
/** @ORM\Column(type="decimal", precision = 2) */
protected $amount;
}
When ReflectionProperty::getDocComment() processing "$amount" field, it not
returning the field's comment but false.
If I move that field to top of class then "$paymentInstruction" is not been
processed.
Only way to get annotation work is to move around class fields, in one
particular order (permutation), the ReflectionProperty::getDocComment() will
not returning false.
Searched the google, found nothing similar to this problem.
Regards,
anru
--
--
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]
---
You received this message because you are subscribed to the Google Groups "NZ
PHP Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.