From 80a94727ee7e392bb1fc65ba23d851461f5061f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Sun, 17 Dec 2017 00:54:12 +0100 Subject: [PATCH 1/2] Run tests also with the stable version of dependencies --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 12a247654..9f7def4da 100644 --- a/.travis.yml +++ b/.travis.yml @@ -55,6 +55,10 @@ jobs: env: DB=sqlite DEPENDENCIES=low install: travis_retry composer update --prefer-dist --prefer-lowest + - stage: Test + env: DB=sqlite DEPENDENCIES=stable + install: travis_retry composer update --prefer-dist --prefer-stable + - stage: Test env: DB=sqlite COVERAGE before_script: From 74ce8913fc484339c65ad991acef69c13001d211 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Sun, 17 Dec 2017 00:55:50 +0100 Subject: [PATCH 2/2] Upgrade phpstan to 0.9 Applying the necessary fixes. --- .travis.yml | 3 ++- lib/Doctrine/ORM/Internal/CommitOrderCalculator.php | 2 +- lib/Doctrine/ORM/Query/Parser.php | 4 +++- lib/Doctrine/ORM/Tools/Export/Driver/YamlExporter.php | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9f7def4da..5399c90ac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -72,9 +72,10 @@ jobs: - stage: Code Quality env: DB=none STATIC_ANALYSIS + install: travis_retry composer update --prefer-dist --prefer-stable before_script: - echo "extension=redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - - travis_retry composer require --dev --prefer-dist --prefer-stable phpstan/phpstan:^0.8 symfony/console:^3.0 + - travis_retry composer require --dev --prefer-dist --prefer-stable phpstan/phpstan:^0.9 script: vendor/bin/phpstan analyse -l 1 -c phpstan.neon lib - stage: Code Quality diff --git a/lib/Doctrine/ORM/Internal/CommitOrderCalculator.php b/lib/Doctrine/ORM/Internal/CommitOrderCalculator.php index 067a8c577..34703c6d2 100644 --- a/lib/Doctrine/ORM/Internal/CommitOrderCalculator.php +++ b/lib/Doctrine/ORM/Internal/CommitOrderCalculator.php @@ -52,7 +52,7 @@ class CommitOrderCalculator * - dependencyList (array) * Map of node dependencies defined as hashes. * - * @var array + * @var array<\stdClass> */ private $nodeList = []; diff --git a/lib/Doctrine/ORM/Query/Parser.php b/lib/Doctrine/ORM/Query/Parser.php index c21b2de96..e726aa062 100644 --- a/lib/Doctrine/ORM/Query/Parser.php +++ b/lib/Doctrine/ORM/Query/Parser.php @@ -834,6 +834,8 @@ class Parser */ public function QueryLanguage() { + $statement = null; + $this->lexer->moveNext(); switch ($this->lexer->lookahead['type']) { @@ -3357,7 +3359,7 @@ class Parser switch (true) { case $customFunctionDeclaration !== null: return $customFunctionDeclaration; - + case (isset(self::$_STRING_FUNCTIONS[$funcName])): return $this->FunctionsReturningStrings(); diff --git a/lib/Doctrine/ORM/Tools/Export/Driver/YamlExporter.php b/lib/Doctrine/ORM/Tools/Export/Driver/YamlExporter.php index 8fa1a7ffc..c685cd41d 100644 --- a/lib/Doctrine/ORM/Tools/Export/Driver/YamlExporter.php +++ b/lib/Doctrine/ORM/Tools/Export/Driver/YamlExporter.php @@ -158,7 +158,7 @@ class YamlExporter extends AbstractExporter $associationMappingArray['fetch'] = $this->_getFetchModeString($associationMapping['fetch']); } - if (isset($mapping['id']) && $mapping['id'] === true) { + if (isset($associationMapping['id']) && $associationMapping['id'] === true) { $array['id'][$name]['associationKey'] = true; }