diff --git a/.travis.yml b/.travis.yml index c907e9cb74cc4fc1506455214a11efc098f161ae..c7c55038633d7f706c45ce395fdc4281262e4ab5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,6 @@ php: - 7.1 - 7.2 - 7.3 - - 7.4snapshot - nightly cache: @@ -24,10 +23,13 @@ script: jobs: allow_failures: - - php: 7.4snapshot - php: nightly include: + - stage: Test + php: 7.4snapshot + install: travis_retry composer require --dev phpunit/phpunit:^7.5@dev + - stage: Lint before_script: - travis_retry composer require --dev --prefer-dist --prefer-stable phpstan/phpstan:^0.7 diff --git a/composer.json b/composer.json index ababa730aa3317500aadb7c833e18018f9388ce4..4b24c46e15e321a1ef9e6d5a77475c88136f3481 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ }, "require-dev": { "doctrine/cache": "1.*", - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^7.5@dev" }, "config": { "sort-packages": true diff --git a/lib/Doctrine/Common/Annotations/DocParser.php b/lib/Doctrine/Common/Annotations/DocParser.php index 65e0036fcaf89e998e23cb2d6524696e7b12b269..f076f36a427fe41b792ca71434281f7216958f0f 100644 --- a/lib/Doctrine/Common/Annotations/DocParser.php +++ b/lib/Doctrine/Common/Annotations/DocParser.php @@ -997,9 +997,11 @@ final class DocParser $className = $this->lexer->token['value']; - while ($this->lexer->lookahead['position'] === ($this->lexer->token['position'] + strlen($this->lexer->token['value'])) - && $this->lexer->isNextToken(DocLexer::T_NAMESPACE_SEPARATOR)) { - + while ( + null !== $this->lexer->lookahead && + $this->lexer->lookahead['position'] === ($this->lexer->token['position'] + strlen($this->lexer->token['value'])) && + $this->lexer->isNextToken(DocLexer::T_NAMESPACE_SEPARATOR) + ) { $this->match(DocLexer::T_NAMESPACE_SEPARATOR); $this->matchAny(self::$classIdentifiers);