Doctrine Common
  1. Doctrine Common
  2. DCOM-9

Annotation mapper tries to parse PHPDocblock annotations

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-BETA2
    • Fix Version/s: 2.0.0-BETA3
    • Component/s: None
    • Labels:
      None
    • Environment:
      OS: Ubuntu, PHP version: 5.3.2

      Description

      In the upgrade from DC2 beta1 to beta2 the annonation mapper now starts to try and parse a some of the PHPDocblock annotations such as @package @subpackage but also the email adress in @author

      Example of docblock

      /**
       * @author Antoine Hedgecock <antoine@pmg.se>
       * @version 1.0.0
       */
      
      
      /**
       * @package Models
       * @subpackage Default
       * 
       * @Entity(repositoryClass="Default_Model_Mapper_Category")
       * @Table(name="categories")
       * @InheritanceType("SINGLE_TABLE")
       * @DiscriminatorColumn(name="type", type="smallint")
       * @DiscriminatorMap({
       *  "0" = "Project_Model_Category"
       * })
       */
      

      will cause it to try and load

      Doctrine/ORM/Mapping/package.php
      Doctrine/ORM/Mapping/subpackage.php
      Doctrine/ORM/Mapping/pmg.php

      note pmg because its in the email of the author annotation

        Activity

        Hide
        Roman S. Borschel added a comment -

        Please try with the latest version of Doctrine Common http://github.com/doctrine/common

        See also DCOM-8

        Show
        Roman S. Borschel added a comment - Please try with the latest version of Doctrine Common http://github.com/doctrine/common See also DCOM-8
        Hide
        Antoine Hedgecock added a comment -

        After comparing the source code version i found the following changes that could cause the issue

        Line 249 in Beta2

        $this->lexer->lookahead != null && ! $this->lexer->isNextToken(Lexer::T_OPEN_PARENTHESIS) && ! ClassLoader::classExists($name)
        
        Show
        Antoine Hedgecock added a comment - After comparing the source code version i found the following changes that could cause the issue Line 249 in Beta2 $ this ->lexer->lookahead != null && ! $ this ->lexer->isNextToken(Lexer::T_OPEN_PARENTHESIS) && ! ClassLoader ::classExists($name)
        Hide
        Roman S. Borschel added a comment -

        Fixed in the beta3 release that is already out now.

        Show
        Roman S. Borschel added a comment - Fixed in the beta3 release that is already out now.

          People

          • Assignee:
            Roman S. Borschel
            Reporter:
            Antoine Hedgecock
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: