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.
        Guilherme Blanco made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Benjamin Eberlei [ beberlei ] Guilherme Blanco [ guilhermeblanco ]
        Resolution Fixed [ 1 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: