Skip to content

Commit 55eb5a5

Browse files
authored
Merge pull request #127 from vaimo/fix/php-backwards-compatibility
Fix/php backwards compatibility
2 parents f674021 + 1c39b93 commit 55eb5a5

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"license": "MIT",
55
"description": "Applies a patch from a local or remote file to any package that is part of a given composer project. Patches can be defined both on project and on package level. Optional support for patch versioning, sequencing, custom patch applier configuration and patch command for testing/troubleshooting added patches.",
66
"require": {
7-
"php": ">=7.0.0",
7+
"php": ">=7.1.0",
88
"ext-json": "*",
99
"composer-plugin-api": "^1.0 || ^2.0",
1010
"composer-runtime-api": "^1.0 || ^2.0",

phpcs.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<rule ref="PHPCompatibility" />
1010

11-
<config name="testVersion" value="5.3-"/>
11+
<config name="testVersion" value="7.1-"/>
1212

1313
<rule ref="PSR1"/>
1414
<rule ref="PSR2"/>

src/Config/Context.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
*/
66
namespace Vaimo\ComposerPatches\Config;
77

8+
if (!class_exists('loophp\phposinfo\OsInfo') && class_exists('drupol\phposinfo\OsInfo')) {
9+
class_alias('drupol\phposinfo\OsInfo', 'loophp\phposinfo\OsInfo');
10+
class_alias('drupol\phposinfo\Enum\FamilyName', 'loophp\phposinfo\Enum\FamilyName');
11+
class_alias('drupol\phposinfo\Enum\OsName', 'loophp\phposinfo\Enum\OsName');
12+
}
13+
814
use loophp\phposinfo\OsInfo;
915
use loophp\phposinfo\Enum\OsName;
1016
use loophp\phposinfo\Enum\FamilyName;

src/Utils/FileSystemUtils.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ public function collectGlobs($rootPath, $pattern)
2727
$files = array();
2828

2929
foreach ($iterator as $info) {
30-
if($info->isDir()) {
31-
$files = [...$files, ...$this->collectPathsRecursively($info->getRealPath(), $pattern)];
30+
if ($info->isDir()) {
31+
$files = array_merge($files, $this->collectPathsRecursively($info->getRealPath(), $pattern));
3232
continue;
3333
}
3434

0 commit comments

Comments
 (0)