Doctrine Common
  1. Doctrine Common
  2. DCOM-6

Non existant namespace alias throws a PHP Notice

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-BETA2
    • Fix Version/s: 2.0.0-RC1
    • Component/s: None
    • Labels:
      None

      Description

      @nonalias:Annot results in a php notice.

        Activity

        Hide
        Benjamin Eberlei added a comment -

        Fixed to skip the unknown alias annotation.

        Show
        Benjamin Eberlei added a comment - Fixed to skip the unknown alias annotation.
        Hide
        Guilherme Blanco added a comment -

        Yes, you're right...

        I think we'll have to silently bypass unknown aliases... this makes debug harder, but we don't have any other option. =(

        Reopening it

        Show
        Guilherme Blanco added a comment - Yes, you're right... I think we'll have to silently bypass unknown aliases... this makes debug harder, but we don't have any other option. =( Reopening it
        Hide
        Tim Nagel added a comment -

        What will your change do if there are multiple implementations of the Reader working on entities that dont have common namespaces, but still use namespaces?

        Would it not make more sense to skip something that the Reader doesnt understand, rather than throwing an error?

        (For example, Symfony2's validator system might have namespaced validators, which would then cause the 'Doctrine' reader to throw an exception)

        Show
        Tim Nagel added a comment - What will your change do if there are multiple implementations of the Reader working on entities that dont have common namespaces, but still use namespaces? Would it not make more sense to skip something that the Reader doesnt understand, rather than throwing an error? (For example, Symfony2's validator system might have namespaced validators, which would then cause the 'Doctrine' reader to throw an exception)
        Hide
        Guilherme Blanco added a comment -

        In commit: http://github.com/doctrine/common/commit/ad49a676269af368563bd9a848c904b81a825622

        I fixed this issue.
        The validation on unexistent classes cannot be done correctly, otherwise it'd conflict with phpDoc tags.

        Show
        Guilherme Blanco added a comment - In commit: http://github.com/doctrine/common/commit/ad49a676269af368563bd9a848c904b81a825622 I fixed this issue. The validation on unexistent classes cannot be done correctly, otherwise it'd conflict with phpDoc tags.
        Show
        Tim Nagel added a comment - Proposed tests and fix http://github.com/merk/common/commit/65e8c10b74201c39dbe291c36230205d9b08ed65

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Tim Nagel
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: