Browse Source

Merge pull request #16850 from cakephp/ci

Bump up phpstan and psalm.
ADmad 3 years ago
parent
commit
4b1f17c669
4 changed files with 3 additions and 11 deletions
  1. 1 1
      composer.json
  2. 0 10
      phpstan-baseline.neon
  3. 1 0
      src/Utility/Hash.php
  4. 1 0
      src/Utility/Text.php

+ 1 - 1
composer.json

@@ -115,7 +115,7 @@
         ],
         "stan-tests": "phpstan.phar analyze -c tests/phpstan.neon",
         "stan-baseline": "phpstan.phar --generate-baseline",
-        "stan-setup": "cp composer.json composer.backup && composer require --dev symfony/polyfill-php81 phpstan/phpstan:~1.8.0 psalm/phar:~4.28.0 && mv composer.backup composer.json",
+        "stan-setup": "cp composer.json composer.backup && composer require --dev symfony/polyfill-php81 phpstan/phpstan:~1.9.0 psalm/phar:~4.29.0 && mv composer.backup composer.json",
         "lowest": "validate-prefer-lowest",
         "lowest-setup": "composer update --prefer-lowest --prefer-stable --prefer-dist --no-interaction && cp composer.json composer.backup && composer require --dev dereuromark/composer-prefer-lowest && mv composer.backup composer.json",
         "test": "phpunit",

+ 0 - 10
phpstan-baseline.neon

@@ -16,16 +16,6 @@ parameters:
 			path: src/Auth/Storage/StorageInterface.php
 
 		-
-			message: "#^Access to undefined constant Memcached\\:\\:DYNAMIC_CLIENT_MODE\\.$#"
-			count: 1
-			path: src/Cache/Engine/MemcachedEngine.php
-
-		-
-			message: "#^Access to undefined constant Memcached\\:\\:OPT_CLIENT_MODE\\.$#"
-			count: 1
-			path: src/Cache/Engine/MemcachedEngine.php
-
-		-
 			message: "#^Strict comparison using \\=\\=\\= between class\\-string\\<ArrayObject\\> and 'ArrayIterator' will always evaluate to false\\.$#"
 			count: 1
 			path: src/Collection/Collection.php

+ 1 - 0
src/Utility/Hash.php

@@ -1119,6 +1119,7 @@ class Hash
             next($intersection);
         }
 
+        /** @phpstan-ignore-next-line */
         return $data + $compare;
     }
 

+ 1 - 0
src/Utility/Text.php

@@ -377,6 +377,7 @@ class Text
         }
         $options += ['width' => 72, 'wordWrap' => true, 'indent' => null, 'indentAt' => 0];
 
+        /** @phpstan-ignore-next-line */
         if (!empty($options['indentAt']) && $options['indentAt'] === 0) {
             $indentLength = !empty($options['indent']) ? strlen($options['indent']) : 0;
             $options['width'] -= $indentLength;