diff --git a/composer.json b/composer.json index b46627b..6893866 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "license": "MIT", "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.", "require": { - "php": ">=7.0.0", + "php": ">=7.1.0", "ext-json": "*", "composer-plugin-api": "^1.0 || ^2.0", "composer-runtime-api": "^1.0 || ^2.0", diff --git a/phpcs.xml b/phpcs.xml index e96d1fe..f38b7f4 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -8,7 +8,7 @@ - + diff --git a/src/Config/Context.php b/src/Config/Context.php index 7fb5fad..1ead930 100644 --- a/src/Config/Context.php +++ b/src/Config/Context.php @@ -5,6 +5,12 @@ */ namespace Vaimo\ComposerPatches\Config; +if (!class_exists('loophp\phposinfo\OsInfo') && class_exists('drupol\phposinfo\OsInfo')) { + class_alias('drupol\phposinfo\OsInfo', 'loophp\phposinfo\OsInfo'); + class_alias('drupol\phposinfo\Enum\FamilyName', 'loophp\phposinfo\Enum\FamilyName'); + class_alias('drupol\phposinfo\Enum\OsName', 'loophp\phposinfo\Enum\OsName'); +} + use loophp\phposinfo\OsInfo; use loophp\phposinfo\Enum\OsName; use loophp\phposinfo\Enum\FamilyName; diff --git a/src/Utils/FileSystemUtils.php b/src/Utils/FileSystemUtils.php index 6f5eb2d..315dd4a 100644 --- a/src/Utils/FileSystemUtils.php +++ b/src/Utils/FileSystemUtils.php @@ -27,8 +27,8 @@ public function collectGlobs($rootPath, $pattern) $files = array(); foreach ($iterator as $info) { - if($info->isDir()) { - $files = [...$files, ...$this->collectPathsRecursively($info->getRealPath(), $pattern)]; + if ($info->isDir()) { + $files = array_merge($files, $this->collectPathsRecursively($info->getRealPath(), $pattern)); continue; }