Skip to content

DCOM-9: Annotation mapper tries to parse PHPDocblock annotations #691

Closed
doctrinebot opened this Issue Jun 16, 2010 · 4 comments

1 participant

@doctrinebot

Jira issue originally created by user mac_nibblet:

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
{quote}
Doctrine/ORM/Mapping/package.php
Doctrine/ORM/Mapping/subpackage.php
Doctrine/ORM/Mapping/pmg.php
{quote}

note pmg because its in the email of the author annotation

@doctrinebot

Comment created by romanb:

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

See also DCOM-8

@doctrinebot

Comment created by mac_nibblet:

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)
@doctrinebot

Comment created by romanb:

Fixed in the beta3 release that is already out now.

@doctrinebot

Issue was closed with resolution "Fixed"

@doctrinebot doctrinebot added the Bug label Dec 7, 2015
@doctrinebot doctrinebot added this to the 2.0.0-BETA3 milestone Dec 7, 2015
@doctrinebot doctrinebot closed this Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.