Browse Source

Merge pull request #14473 from cakephp/ADmad-patch-1

Fix class name.
Mark Sch 6 years ago
parent
commit
b8dd74163e
2 changed files with 4 additions and 3 deletions
  1. 1 0
      phpstan.neon
  2. 3 3
      src/Cache/Engine/ApcuEngine.php

+ 1 - 0
phpstan.neon

@@ -28,6 +28,7 @@ parameters:
         - '#Binary operation "\+" between array|false and array results in an error#'
         - '#Result of method Cake\\Auth\\BaseAuthenticate::unauthenticated\(\) \(void\) is used#'
         - '#Call to an undefined method DateTimeInterface::setTimezone\(\)#'
+        - '#Class APCuIterator referenced with incorrect case: APCUIterator#'
     earlyTerminatingMethodCalls:
         Cake\Console\Shell:
             - abort

+ 3 - 3
src/Cache/Engine/ApcuEngine.php

@@ -14,7 +14,7 @@
  */
 namespace Cake\Cache\Engine;
 
-use APCuIterator;
+use APCUIterator;
 use Cake\Cache\CacheEngine;
 
 /**
@@ -136,8 +136,8 @@ class ApcuEngine extends CacheEngine
         if ($check) {
             return true;
         }
-        if (class_exists('APCuIterator', false)) {
-            $iterator = new APCuIterator(
+        if (class_exists(APCUIterator::class, false)) {
+            $iterator = new APCUIterator(
                 '/^' . preg_quote($this->_config['prefix'], '/') . '/',
                 APC_ITER_NONE
             );