Doctrine Common
  1. Doctrine Common
  2. DCOM-14

Exclude @throws annotation from parsing.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Description

      CLI doctrine tool fails when parsing entity sources (for example: doctrine orm:validate-schema) by following error:
      Fatal error: Class 'throws\MemberAccessException' not found in /usr/share/php/Doctrine/Common/Annotations/Parser.php on line 272
      exception 'FatalErrorException' with message 'Class 'throws\MemberAccessException' not found' in /usr/share/php/Doctrine/Common/Annotations/Parser.php:272

      This error appears when @HasLifecycleCallbacks annotation is added into entity.

      The solution is adding "@throws" annotation into strippedTags into Doctrine/Common/Annotations/Parser.php

        Activity

        Hide
        Roman S. Borschel added a comment -

        Can you confirm that this is still a problem with the latest code?

        Show
        Roman S. Borschel added a comment - Can you confirm that this is still a problem with the latest code?
        Hide
        Jan Obrátil added a comment -

        I'm using the latest Doctrine2 available thru pear:

        Installed packages, channel pear.doctrine-project.org:
        ======================================================
        Package Version State
        DoctrineCommon 2.0.0BETA4 beta
        DoctrineDBAL 2.0.0BETA3 beta
        DoctrineORM 2.0.0BETA3 beta

        I still have to alter Parser.php

        Show
        Jan Obrátil added a comment - I'm using the latest Doctrine2 available thru pear: Installed packages, channel pear.doctrine-project.org: ====================================================== Package Version State DoctrineCommon 2.0.0BETA4 beta DoctrineDBAL 2.0.0BETA3 beta DoctrineORM 2.0.0BETA3 beta I still have to alter Parser.php
        Hide
        Guilherme Blanco added a comment -

        This ticket is invalid. I added coverage to it on commit:

        http://github.com/doctrine/common/commit/7e7a06e9878a1a41a72a062fa18d71d6c64a600a

        Seems you have a @throws definition that is connected to the returned class, and this is then considered an annotation.

        Show
        Guilherme Blanco added a comment - This ticket is invalid. I added coverage to it on commit: http://github.com/doctrine/common/commit/7e7a06e9878a1a41a72a062fa18d71d6c64a600a Seems you have a @throws definition that is connected to the returned class, and this is then considered an annotation.

          People

          • Assignee:
            Roman S. Borschel
            Reporter:
            Jan Obrátil
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: