Doctrine Common
  1. Doctrine Common
  2. DCOM-179

Underscore at the end of a label is not working with annotations

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3
    • Component/s: Annotations
    • Labels:
      None
    • Environment:
      apache2, php 5.4, mysql

      Description

      use Zend\Form\Annotation;

      [...]

      works:

      * @Annotation\Options({"label":Namespace\Entity::LABEL})
      

      or

      * @Annotation\Options({"label":Namespace\Entity::_LABEL})
      

      or

      * @Annotation\Options({"label":Namespace\Entity::LA_BEL})
      

      works not:

      * @Annotation\Options({"label":Namespace\Entity::LABEL_})
      

      Error message:

      /vendor/doctrine/common/lib/Doctrine/Common/Annotations/AnnotationException.php:52

      [Semantical Error] Couldn't find constant Namespace\Entity\::LABEL, property ...
      

      The _ at the end is missing.

        Activity

        exoon created issue -
        exoon made changes -
        Field Original Value New Value
        Summary Underscore at the end of a label is not working with annotstions Underscore at the end of a label is not working with annotations
        exoon made changes -
        Description use Zend\Form\Annotation;

        [...]

        works:

        * @Annotation\Options({"label":Namespace\Entity::LABEL})
        or
        * @Annotation\Options({"label":Namespace\Entity::_LABEL})
        or
        * @Annotation\Options({"label":Namespace\Entity::LA_BEL})

        works not:

        * @Annotation\Options({"label":Namespace\Entity::LABEL_})

        Error message:

        /vendor/doctrine/common/lib/Doctrine/Common/Annotations/AnnotationException.php:52

        [Semantical Error] Couldn't find constant Namespace\Entity\::LABEL, property ...

        The _ at the end is missing.
        use Zend\Form\Annotation;

        [...]

        works:

        @Annotation\Options({"label":Namespace\Entity::LABEL})
        or
        @Annotation\Options({"label":Namespace\Entity::_LABEL})
        or
        @Annotation\Options({"label":Namespace\Entity::LA_BEL})

        works not:

        @Annotation\Options({"label":Namespace\Entity::LABEL_})

        Error message:

        /vendor/doctrine/common/lib/Doctrine/Common/Annotations/AnnotationException.php:52

        [Semantical Error] Couldn't find constant Namespace\Entity\::LABEL, property ...

        The _ at the end is missing.
        exoon made changes -
        Description use Zend\Form\Annotation;

        [...]

        works:

        @Annotation\Options({"label":Namespace\Entity::LABEL})
        or
        @Annotation\Options({"label":Namespace\Entity::_LABEL})
        or
        @Annotation\Options({"label":Namespace\Entity::LA_BEL})

        works not:

        @Annotation\Options({"label":Namespace\Entity::LABEL_})

        Error message:

        /vendor/doctrine/common/lib/Doctrine/Common/Annotations/AnnotationException.php:52

        [Semantical Error] Couldn't find constant Namespace\Entity\::LABEL, property ...

        The _ at the end is missing.
        use Zend\Form\Annotation;

        [...]

        works:

        * @Annotation\Options({"label":Namespace\Entity::LABEL})
        or
        * @Annotation\Options({"label":Namespace\Entity::_LABEL})
        or
        * @Annotation\Options({"label":Namespace\Entity::LA_BEL})

        works not:

        * @Annotation\Options({"label":Namespace\Entity::LABEL_})

        Error message:

        /vendor/doctrine/common/lib/Doctrine/Common/Annotations/AnnotationException.php:52

        [Semantical Error] Couldn't find constant Namespace\Entity\::LABEL, property ...

        The _ at the end is missing.
        Marco Pivetta made changes -
        Description use Zend\Form\Annotation;

        [...]

        works:

        * @Annotation\Options({"label":Namespace\Entity::LABEL})
        or
        * @Annotation\Options({"label":Namespace\Entity::_LABEL})
        or
        * @Annotation\Options({"label":Namespace\Entity::LA_BEL})

        works not:

        * @Annotation\Options({"label":Namespace\Entity::LABEL_})

        Error message:

        /vendor/doctrine/common/lib/Doctrine/Common/Annotations/AnnotationException.php:52

        [Semantical Error] Couldn't find constant Namespace\Entity\::LABEL, property ...

        The _ at the end is missing.
        use Zend\Form\Annotation;

        [...]

        works:

        {code}
        * @Annotation\Options({"label":Namespace\Entity::LABEL})
        {code}
        or
        {code}
        * @Annotation\Options({"label":Namespace\Entity::_LABEL})
        {code}
        or
        {code}
        * @Annotation\Options({"label":Namespace\Entity::LA_BEL})
        {code}

        works not:

        {code}
        * @Annotation\Options({"label":Namespace\Entity::LABEL_})
        {code}

        Error message:

        /vendor/doctrine/common/lib/Doctrine/Common/Annotations/AnnotationException.php:52

        [Semantical Error] Couldn't find constant Namespace\Entity\::LABEL, property ...

        The _ at the end is missing.
        Marco Pivetta made changes -
        Description use Zend\Form\Annotation;

        [...]

        works:

        {code}
        * @Annotation\Options({"label":Namespace\Entity::LABEL})
        {code}
        or
        {code}
        * @Annotation\Options({"label":Namespace\Entity::_LABEL})
        {code}
        or
        {code}
        * @Annotation\Options({"label":Namespace\Entity::LA_BEL})
        {code}

        works not:

        {code}
        * @Annotation\Options({"label":Namespace\Entity::LABEL_})
        {code}

        Error message:

        /vendor/doctrine/common/lib/Doctrine/Common/Annotations/AnnotationException.php:52

        [Semantical Error] Couldn't find constant Namespace\Entity\::LABEL, property ...

        The _ at the end is missing.
        use Zend\Form\Annotation;

        [...]

        works:

        {code}
        * @Annotation\Options({"label":Namespace\Entity::LABEL})
        {code}
        or
        {code}
        * @Annotation\Options({"label":Namespace\Entity::_LABEL})
        {code}
        or
        {code}
        * @Annotation\Options({"label":Namespace\Entity::LA_BEL})
        {code}

        works not:

        {code}
        * @Annotation\Options({"label":Namespace\Entity::LABEL_})
        {code}

        Error message:

        /vendor/doctrine/common/lib/Doctrine/Common/Annotations/AnnotationException.php:52

        {code}
        [Semantical Error] Couldn't find constant Namespace\Entity\::LABEL, property ...
        {code}

        The _ at the end is missing.
        Hide
        Marco Pivetta added a comment -
        Show
        Marco Pivetta added a comment - Provided a hotfix at https://github.com/doctrine/annotations/pull/19
        Show
        Guilherme Blanco added a comment - Implemented: https://github.com/doctrine/annotations/commit/0500074e2af1b3c9c6d6ea03d38fbd9f5ee7da71
        Guilherme Blanco made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Benjamin Eberlei [ beberlei ] Guilherme Blanco [ guilhermeblanco ]
        Resolution Fixed [ 1 ]

        This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

        • Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DCOM-179, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

          People

          • Assignee:
            Guilherme Blanco
            Reporter:
            exoon
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: