Commit ed94a34f authored by romanb's avatar romanb

[2.0] Removed requirement to extend the Annotation base class, allowing any...

[2.0] Removed requirement to extend the Annotation base class, allowing any PHP class with an appropriate constructor to be used as an annotation.
parent bc6714c2
...@@ -149,7 +149,6 @@ class Parser ...@@ -149,7 +149,6 @@ class Parser
if ( ! ($this->_lexer->lookahead['type'] === $token)) { if ( ! ($this->_lexer->lookahead['type'] === $token)) {
$this->syntaxError($this->_lexer->getLiteral($token)); $this->syntaxError($this->_lexer->getLiteral($token));
} }
$this->_lexer->moveNext(); $this->_lexer->moveNext();
} }
...@@ -254,8 +253,7 @@ class Parser ...@@ -254,8 +253,7 @@ class Parser
(! $this->_isNestedAnnotation && $this->_lexer->lookahead != null && (! $this->_isNestedAnnotation && $this->_lexer->lookahead != null &&
! $this->_lexer->isNextToken(Lexer::T_OPEN_PARENTHESIS) && ! $this->_lexer->isNextToken(Lexer::T_OPEN_PARENTHESIS) &&
! $this->_lexer->isNextToken(Lexer::T_AT)) || ! $this->_lexer->isNextToken(Lexer::T_AT)) ||
! class_exists($name, false) || ! class_exists($name, false)
! is_subclass_of($name, 'Doctrine\Common\Annotations\Annotation')
) { ) {
$this->_lexer->skipUntil(Lexer::T_AT); $this->_lexer->skipUntil(Lexer::T_AT);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment