ah, my bad. never know PHP doc should start with /**
anru On 22 May 2013 16:59, David Neilsen <[email protected]> wrote: > A doc comment must start with: /** > > That example uses: /* > > http://codepad.viper-7.com/bWhu2q > > David Neilsen | 07 834 3366 | PANmedia ® > > > On Wed, May 22, 2013 at 4:57 PM, anru chen <[email protected]> wrote: > >> http://codepad.viper-7.com/yxU9zL >> >> above one not working. >> >> regards, >> >> anru >> >> >> On 22 May 2013 16:33, David Neilsen <[email protected]> wrote: >> >>> Seems to work alright for me: http://codepad.viper-7.com/ZeuQlH >>> >>> Also tested on my Window machine (5.4.9 NTS, Windows 8 64bit) >>> >>> David Neilsen | 07 834 3366 | PANmedia ® >>> >>> >>> On Wed, May 22, 2013 at 4:20 PM, ctx2002 <[email protected]> wrote: >>> >>>> 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. >>>> >>>> >>>> >>> >>> -- >>> -- >>> 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. >>> >>> >>> >> >> -- >> -- >> 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. >> >> >> > > -- > -- > 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. > > > -- -- 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.
