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
if ( ! ($this->_lexer->lookahead['type'] === $token)) {
$this->syntaxError($this->_lexer->getLiteral($token));
}
$this->_lexer->moveNext();
}
......@@ -254,8 +253,7 @@ class Parser
(! $this->_isNestedAnnotation && $this->_lexer->lookahead != null &&
! $this->_lexer->isNextToken(Lexer::T_OPEN_PARENTHESIS) &&
! $this->_lexer->isNextToken(Lexer::T_AT)) ||
! class_exists($name, false) ||
! is_subclass_of($name, 'Doctrine\Common\Annotations\Annotation')
! class_exists($name, false)
) {
$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