diff options
-rw-r--r-- | 550c01b471c0deecf95647b7b48e7712623208da.patch | 27 | ||||
-rw-r--r-- | composer.spec | 7 |
2 files changed, 33 insertions, 1 deletions
diff --git a/550c01b471c0deecf95647b7b48e7712623208da.patch b/550c01b471c0deecf95647b7b48e7712623208da.patch new file mode 100644 index 0000000..f5dd971 --- /dev/null +++ b/550c01b471c0deecf95647b7b48e7712623208da.patch @@ -0,0 +1,27 @@ +From 550c01b471c0deecf95647b7b48e7712623208da Mon Sep 17 00:00:00 2001 +From: rbairwell <rbairwell@users.noreply.github.com> +Date: Tue, 27 Aug 2019 20:53:57 +0100 +Subject: [PATCH] Fixes a problem with path based repositories on PHP7.4 where + an attempt is made to access null as an array + +--- + src/Composer/Repository/PathRepository.php | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/Composer/Repository/PathRepository.php b/src/Composer/Repository/PathRepository.php +index 61ebc8d8cd3c..20dcbcd6faa0 100644 +--- a/src/Composer/Repository/PathRepository.php ++++ b/src/Composer/Repository/PathRepository.php +@@ -155,7 +155,11 @@ protected function initialize() + + if (!isset($package['version'])) { + $versionData = $this->versionGuesser->guessVersion($package, $path); +- $package['version'] = $versionData['pretty_version'] ?: 'dev-master'; ++ if (is_array($versionData)) { ++ $package['version'] = $versionData['pretty_version'] ?: 'dev-master'; ++ } else { ++ $package['version'] = 'dev-master'; ++ } + } + + $output = ''; diff --git a/composer.spec b/composer.spec index 752ff1b..33d9faf 100644 --- a/composer.spec +++ b/composer.spec @@ -30,7 +30,7 @@ Name: composer Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Dependency Manager for PHP License: MIT @@ -46,6 +46,7 @@ Source5: makesrc.sh # Use our autoloader, resources path, fix for tests Patch0: %{name}-rpm.patch +Patch1: https://github.com/composer/composer/commit/550c01b471c0deecf95647b7b48e7712623208da.patch BuildArch: noarch BuildRequires: php-cli @@ -184,6 +185,7 @@ Documentation: https://getcomposer.org/doc/ %patch0 -p1 -b .rpm find . -name \*.rpm -exec rm {} \; -print +%patch1 -p1 if grep -r '\.\./res'; then : Patch need to fixed @@ -283,6 +285,9 @@ exit $ret %changelog +* Wed Oct 9 2019 Remi Collet <remi@remirepo.net> - 1.9.0-2 +- add upstream patch for PHP 7.4 + * Sat Aug 3 2019 Remi Collet <remi@remirepo.net> - 1.9.0-1 - update to 1.9.0 |