Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit b5d9009

Browse files
michalbundyraweierophinney
authored andcommitted
🔥 Polyfill PatternPluginManager - to allow work with Zend SMv2 and v3
Fixes issue with PHP 7.2 signature compatibility. Conflicts: composer.json composer.lock
1 parent f1b68bb commit b5d9009

6 files changed

+701
-413
lines changed
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
/**
3+
* @see https://github.com/zendframework/zend-cache for the canonical source repository
4+
* @copyright Copyright (c) 2017 Zend Technologies USA Inc. (http://www.zend.com)
5+
* @license https://github.com/zendframework/zend-cache/blob/master/LICENSE.md New BSD License
6+
*/
7+
8+
use Zend\Cache\PatternPluginManager;
9+
use Zend\ServiceManager\ServiceManager;
10+
11+
call_user_func(function () {
12+
$target = method_exists(ServiceManager::class, 'configure')
13+
? PatternPluginManager\PatternPluginManagerV3Polyfill::class
14+
: PatternPluginManager\PatternPluginManagerV2Polyfill::class;
15+
16+
class_alias($target, PatternPluginManager::class);
17+
});

composer.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
"require": {
1919
"php": "^5.6 || ^7.0",
2020
"psr/cache": "^1.0",
21-
"zendframework/zend-eventmanager": "^2.6.2 || ^3.0",
22-
"zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3",
23-
"zendframework/zend-stdlib": "^2.7 || ^3.0"
21+
"zendframework/zend-eventmanager": "^2.6.3 || ^3.2",
22+
"zendframework/zend-servicemanager": "^2.7.8 || ^3.3",
23+
"zendframework/zend-stdlib": "^2.7.7 || ^3.1"
2424
},
2525
"require-dev": {
2626
"cache/integration-tests": "^0.10.0",
@@ -45,6 +45,9 @@
4545
"mongofill/mongofill": "Alternative to ext-mongo - a pure PHP implementation designed as a drop in replacement"
4646
},
4747
"autoload": {
48+
"files": [
49+
"autoload/patternPluginManagerPolyfill.php"
50+
],
4851
"psr-4": {
4952
"Zend\\Cache\\": "src/"
5053
}

0 commit comments

Comments
 (0)