diff --git a/composer.json b/composer.json index e39db7052..fc2100761 100644 --- a/composer.json +++ b/composer.json @@ -51,7 +51,6 @@ "src/Xml/bootstrap.php" ], "classmap": [ - "src/Apcu/Resources/stubs", "src/Intl/Normalizer/Resources/stubs", "src/Php70/Resources/stubs", "src/Php54/Resources/stubs" diff --git a/src/Apcu/Resources/stubs/APCUIterator.php b/src/Apcu/Resources/stubs/APCUIterator.php deleted file mode 100644 index b6f65dcde..000000000 --- a/src/Apcu/Resources/stubs/APCUIterator.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -class APCUIterator extends APCIterator -{ - public function __construct($search = null, $format = APC_ITER_ALL, $chunk_size = 100, $list = APC_LIST_ACTIVE) - { - parent::__construct('user', $search, $format, $chunk_size, $list); - } -} diff --git a/src/Apcu/bootstrap.php b/src/Apcu/bootstrap.php index 248cf35c5..9a373b666 100644 --- a/src/Apcu/bootstrap.php +++ b/src/Apcu/bootstrap.php @@ -26,3 +26,13 @@ function apcu_inc($key, $step = 1, &$success = false) { return apc_inc($key, $st function apcu_sma_info($limited = false) { return apc_sma_info($limited); } function apcu_store($key, $var = null, $ttl = 0) { return apc_store($key, $var, $ttl); } } + +if (!class_exists('APCUIterator', false)) { + class APCUIterator extends APCIterator + { + public function __construct($search = null, $format = APC_ITER_ALL, $chunk_size = 100, $list = APC_LIST_ACTIVE) + { + parent::__construct('user', $search, $format, $chunk_size, $list); + } + } +} diff --git a/src/Apcu/composer.json b/src/Apcu/composer.json index db1c6e8cf..38f0ebf67 100644 --- a/src/Apcu/composer.json +++ b/src/Apcu/composer.json @@ -19,8 +19,7 @@ "php": ">=5.3.3" }, "autoload": { - "files": [ "bootstrap.php" ], - "classmap": [ "Resources/stubs" ] + "files": [ "bootstrap.php" ] }, "minimum-stability": "dev", "extra": {