summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer-autoload.php24
-rw-r--r--composer-bootstrap.php3
-rw-r--r--composer-rpm.patch38
-rw-r--r--composer.json35
-rw-r--r--composer.spec134
5 files changed, 130 insertions, 104 deletions
diff --git a/composer-autoload.php b/composer-autoload.php
deleted file mode 100644
index 15e9c21..0000000
--- a/composer-autoload.php
+++ /dev/null
@@ -1,24 +0,0 @@
-<?php
-/* Autoloader for composer/composer and its dependencies */
-
-$vendorDir = '/usr/share/php';
-require_once $vendorDir . '/Fedora/Autoloader/autoload.php';
-
-\Fedora\Autoloader\Autoload::addPsr4('Composer\\', __DIR__);
-
-// Dependencies
-\Fedora\Autoloader\Dependencies::required([
- $vendorDir . '/Symfony/Component/Console/autoload.php',
- $vendorDir . '/Symfony/Component/Finder/autoload.php',
- $vendorDir . '/Symfony/Component/Process/autoload.php',
- $vendorDir . '/Symfony/Component/Filesystem/autoload.php',
- $vendorDir . '/Seld/JsonLint/autoload.php',
- $vendorDir . '/Seld/PharUtils/autoload.php',
- $vendorDir . '/Composer/CaBundle/autoload.php',
- $vendorDir . '/Composer/Spdx/autoload.php',
- $vendorDir . '/Composer/Semver/autoload.php',
- $vendorDir . '/Composer/XdebugHandler/autoload.php',
- $vendorDir . '/Psr/Log/autoload.php',
- $vendorDir . '/JsonSchema5/autoload.php',
-]);
-
diff --git a/composer-bootstrap.php b/composer-bootstrap.php
deleted file mode 100644
index 19d75b3..0000000
--- a/composer-bootstrap.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-require 'Composer/autoload.php';
-\Fedora\Autoloader\Autoload::addPsr0('Composer\\Test\\', __DIR__ . '/');
diff --git a/composer-rpm.patch b/composer-rpm.patch
index ec7ff9b..5572b1a 100644
--- a/composer-rpm.patch
+++ b/composer-rpm.patch
@@ -1,6 +1,6 @@
diff -up ./bin/composer.rpm ./bin/composer
---- ./bin/composer.rpm 2020-02-14 15:37:41.000000000 +0100
-+++ ./bin/composer 2020-02-14 15:37:43.336528140 +0100
+--- ./bin/composer.rpm 2020-06-03 15:05:42.000000000 +0200
++++ ./bin/composer 2020-06-03 15:13:38.063176316 +0200
@@ -6,7 +6,7 @@ if (PHP_SAPI !== 'cli' && PHP_SAPI !== '
}
@@ -11,21 +11,21 @@ diff -up ./bin/composer.rpm ./bin/composer
use Composer\Console\Application;
use Composer\XdebugHandler\XdebugHandler;
diff -up ./src/Composer/Autoload/AutoloadGenerator.php.rpm ./src/Composer/Autoload/AutoloadGenerator.php
---- ./src/Composer/Autoload/AutoloadGenerator.php.rpm 2020-02-14 15:37:43.336528140 +0100
-+++ ./src/Composer/Autoload/AutoloadGenerator.php 2020-02-14 15:38:56.710201606 +0100
-@@ -305,7 +305,7 @@ EOF;
- $this->filePutContentsIfModified($targetDir.'/autoload_real.php', $this->getAutoloadRealFile(true, (bool) $includePathFileContents, $targetDirLoader, (bool) $includeFilesFileContents, $vendorPathCode, $appBaseDirCode, $suffix, $useGlobalIncludePath, $prependAutoloader, $staticPhpVersion));
+--- ./src/Composer/Autoload/AutoloadGenerator.php.rpm 2020-06-03 15:13:38.063176316 +0200
++++ ./src/Composer/Autoload/AutoloadGenerator.php 2020-06-03 15:14:54.793961118 +0200
+@@ -357,7 +357,7 @@ EOF;
+ $filesystem->filePutContentsIfModified($targetDir.'/autoload_real.php', $this->getAutoloadRealFile(true, (bool) $includePathFileContents, $targetDirLoader, (bool) $includeFilesFileContents, $vendorPathCode, $appBaseDirCode, $suffix, $useGlobalIncludePath, $prependAutoloader, $staticPhpVersion, $checkPlatform));
- $this->safeCopy(__DIR__.'/ClassLoader.php', $targetDir.'/ClassLoader.php');
-- $this->safeCopy(__DIR__.'/../../../LICENSE', $targetDir.'/LICENSE');
-+ $this->safeCopy((getenv('BUILDROOT')?:'') . '/usr/share/composer/LICENSE', $targetDir.'/LICENSE');
+ $filesystem->safeCopy(__DIR__.'/ClassLoader.php', $targetDir.'/ClassLoader.php');
+- $filesystem->safeCopy(__DIR__.'/../../../LICENSE', $targetDir.'/LICENSE');
++ $filesystem->safeCopy((getenv('BUILDROOT')?:'') . '/usr/share/composer/LICENSE', $targetDir.'/LICENSE');
if ($this->runScripts) {
$this->eventDispatcher->dispatchScript(ScriptEvents::POST_AUTOLOAD_DUMP, $this->devMode, array(), array(
diff -up ./src/Composer/Compiler.php.rpm ./src/Composer/Compiler.php
---- ./src/Composer/Compiler.php.rpm 2020-02-14 15:37:41.000000000 +0100
-+++ ./src/Composer/Compiler.php 2020-02-14 15:37:43.336528140 +0100
-@@ -97,7 +97,7 @@ class Compiler
+--- ./src/Composer/Compiler.php.rpm 2020-06-03 15:05:42.000000000 +0200
++++ ./src/Composer/Compiler.php 2020-06-03 15:13:38.063176316 +0200
+@@ -98,7 +98,7 @@ class Compiler
$finder = new Finder();
$finder->files()
->name('*.json')
@@ -35,8 +35,8 @@ diff -up ./src/Composer/Compiler.php.rpm ./src/Composer/Compiler.php
->sort($finderSort)
;
diff -up ./src/Composer/Json/JsonFile.php.rpm ./src/Composer/Json/JsonFile.php
---- ./src/Composer/Json/JsonFile.php.rpm 2020-02-14 15:37:41.000000000 +0100
-+++ ./src/Composer/Json/JsonFile.php 2020-02-14 15:37:43.336528140 +0100
+--- ./src/Composer/Json/JsonFile.php.rpm 2020-06-03 15:05:42.000000000 +0200
++++ ./src/Composer/Json/JsonFile.php 2020-06-03 15:15:27.901868264 +0200
@@ -34,7 +34,7 @@ class JsonFile
const JSON_PRETTY_PRINT = 128;
const JSON_UNESCAPED_UNICODE = 256;
@@ -45,8 +45,8 @@ diff -up ./src/Composer/Json/JsonFile.php.rpm ./src/Composer/Json/JsonFile.php
+ const COMPOSER_SCHEMA_PATH = '/usr/share/composer/res/composer-schema.json';
private $path;
- private $rfs;
-@@ -173,7 +173,7 @@ class JsonFile
+ private $httpDownloader;
+@@ -179,7 +179,7 @@ class JsonFile
}
if (null === $schemaFile) {
@@ -56,9 +56,9 @@ diff -up ./src/Composer/Json/JsonFile.php.rpm ./src/Composer/Json/JsonFile.php
// Prepend with file:// only when not using a special schema already (e.g. in the phar)
diff -up ./tests/Composer/Test/Json/ComposerSchemaTest.php.rpm ./tests/Composer/Test/Json/ComposerSchemaTest.php
---- ./tests/Composer/Test/Json/ComposerSchemaTest.php.rpm 2020-02-14 15:37:41.000000000 +0100
-+++ ./tests/Composer/Test/Json/ComposerSchemaTest.php 2020-02-14 15:37:43.336528140 +0100
-@@ -97,7 +97,8 @@ class ComposerSchemaTest extends TestCas
+--- ./tests/Composer/Test/Json/ComposerSchemaTest.php.rpm 2020-06-03 15:05:42.000000000 +0200
++++ ./tests/Composer/Test/Json/ComposerSchemaTest.php 2020-06-03 15:13:38.063176316 +0200
+@@ -114,7 +114,8 @@ class ComposerSchemaTest extends TestCas
private function check($json)
{
$validator = new Validator();
diff --git a/composer.json b/composer.json
index 4fdbcb7..024dc45 100644
--- a/composer.json
+++ b/composer.json
@@ -13,35 +13,32 @@
{
"name": "Nils Adermann",
"email": "naderman@naderman.de",
- "homepage": "http://www.naderman.de"
+ "homepage": "https://www.naderman.de"
},
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
- "homepage": "http://seld.be"
+ "homepage": "https://seld.be"
}
],
"require": {
"php": "^5.3.2 || ^7.0",
"composer/ca-bundle": "^1.0",
- "composer/semver": "^1.0",
+ "composer/semver": "^3.0",
"composer/spdx-licenses": "^1.2",
"composer/xdebug-handler": "^1.1",
"justinrainbow/json-schema": "^5.2.10",
"psr/log": "^1.0",
"seld/jsonlint": "^1.4",
"seld/phar-utils": "^1.0",
- "symfony/console": "^2.7 || ^3.0 || ^4.0 || ^5.0",
- "symfony/filesystem": "^2.7 || ^3.0 || ^4.0 || ^5.0",
- "symfony/finder": "^2.7 || ^3.0 || ^4.0 || ^5.0",
- "symfony/process": "^2.7 || ^3.0 || ^4.0 || ^5.0"
- },
- "conflict": {
- "symfony/console": "2.8.38",
- "symfony/phpunit-bridge": "3.4.40"
+ "symfony/console": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0",
+ "symfony/filesystem": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0",
+ "symfony/finder": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0",
+ "symfony/process": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0",
+ "react/promise": "^1.2 || ^2.7"
},
"require-dev": {
- "symfony/phpunit-bridge": "^3.4",
+ "symfony/phpunit-bridge": "^4.2 || ^5.0",
"phpspec/prophecy": "^1.10"
},
"suggest": {
@@ -52,11 +49,12 @@
"config": {
"platform": {
"php": "5.3.9"
- }
+ },
+ "platform-check": false
},
"extra": {
"branch-alias": {
- "dev-master": "1.10-dev"
+ "dev-master": "2.0-dev"
}
},
"autoload": {
@@ -66,8 +64,13 @@
},
"autoload-dev": {
"psr-4": {
- "Composer\\Test\\": "tests/Composer/Test"
- }
+ "Composer\\Test\\": "tests/Composer/Test",
+ "Composer\\PHPStanRules\\": "phpstan/Rules/src",
+ "Composer\\PHPStanRulesTests\\": "phpstan/Rules/tests"
+ },
+ "classmap": [
+ "phpstan/Rules/tests/data"
+ ]
},
"bin": [
"bin/composer"
diff --git a/composer.spec b/composer.spec
index 4d788f6..3b12ae5 100644
--- a/composer.spec
+++ b/composer.spec
@@ -10,23 +10,37 @@
# For compatibility with SCL
%undefine __brp_mangle_shebangs
-%global gh_commit 956608ea4f7de9e58c53dfb019d85ae62b193c39
+%global gh_commit fa90c099e9c402bcf83fa83d3276d160cf9986fe
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
-%global gh_branch 1.0-dev
+%global gh_branch 2.0-dev
%global gh_owner composer
%global gh_project composer
%global with_tests %{?_without_tests:0}%{!?_without_tests:1}
-%global api_version 1.1.0
-%global run_version 1.0.0
+%global api_version 2.0.0
+%global run_version 2.0.0
-%global upstream_version 1.10.7
-#global upstream_prever RC
+%global upstream_version 2.0.0
+%global upstream_prever alpha1
-%if 0
-# see https://forum.remirepo.net/viewtopic.php?id=3677
-%global symfony_prefix php-symfony3
+%if 0%{?fedora} >= 32 || 0%{?rhel} >=8
+%global symfony_prefix php-symfony4
+%global symfony_path %{_datadir}/php/Symfony4
+%global symfony_min 4.4
+%global _phpunit %{_bindir}/phpunit7
%else
+# remirepo:1
+%if 0
%global symfony_prefix php-symfony
+%global symfony_path %{_datadir}/php/Symfony
+%global symfony_min 2.8
+%global _phpunit %{_bindir}/phpunit
+# remirepo:6
+%else
+%global symfony_prefix php-symfony3
+%global symfony_path %{_datadir}/php/Symfony3
+%global symfony_min 3.4
+%global _phpunit %{_bindir}/phpunit7
+%endif
%endif
Name: composer
@@ -37,8 +51,6 @@ Summary: Dependency Manager for PHP
License: MIT
URL: https://getcomposer.org/
Source0: %{gh_project}-%{upstream_version}%{?upstream_prever}-%{gh_short}.tgz
-Source1: %{name}-autoload.php
-Source2: %{name}-bootstrap.php
# Profile scripts
Source3: %{name}.sh
Source4: %{name}.csh
@@ -53,77 +65,82 @@ BuildRequires: php-cli
%if %{with_tests}
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
BuildRequires: (php-composer(composer/ca-bundle) >= 1.0 with php-composer(composer/ca-bundle) < 2)
-BuildRequires: (php-composer(composer/semver) >= 1.0 with php-composer(composer/semver) < 2)
+BuildRequires: (php-composer(composer/semver) >= 3.0 with php-composer(composer/semver) < 4)
BuildRequires: (php-composer(composer/spdx-licenses) >= 1.2 with php-composer(composer/spdx-licenses) < 2)
BuildRequires: (php-composer(composer/xdebug-handler) >= 1.1 with php-composer(composer/xdebug-handler) < 2)
BuildRequires: (php-composer(seld/jsonlint) >= 1.4 with php-composer(seld/jsonlint) < 2)
BuildRequires: (php-composer(seld/phar-utils) >= 1.0 with php-composer(seld/phar-utils) < 2)
BuildRequires: (php-composer(psr/log) >= 1.0 with php-composer(psr/log) < 2)
BuildRequires: (php-composer(justinrainbow/json-schema) >= 5.2.10 with php-composer(justinrainbow/json-schema) < 6)
+BuildRequires: (php-composer(react/promise) >= 2.7 with php-composer(react/promise) < 3)
%else
BuildRequires: php-composer-ca-bundle
-BuildRequires: php-composer-semver
+BuildRequires: php-composer-semver3
BuildRequires: php-composer-spdx-licenses >= 1.2
BuildRequires: php-composer-xdebug-handler >= 1.1
BuildRequires: php-jsonlint >= 1.4
BuildRequires: php-seld-phar-utils
BuildRequires: php-PsrLog
BuildRequires: php-justinrainbow-json-schema5 >= 5.2.10
+BuildRequires: php-react-promise >= 2.7
%endif
-BuildRequires: %{symfony_prefix}-console
-BuildRequires: %{symfony_prefix}-finder
-BuildRequires: %{symfony_prefix}-filesystem
-BuildRequires: %{symfony_prefix}-process
+BuildRequires: %{symfony_prefix}-console >= %{symfony_min}
+BuildRequires: %{symfony_prefix}-finder >= %{symfony_min}
+BuildRequires: %{symfony_prefix}-filesystem >= %{symfony_min}
+BuildRequires: %{symfony_prefix}-process >= %{symfony_min}
BuildRequires: php-zip
# From composer.json, "require-dev": {
-# "symfony/phpunit-bridge": "^3.4",
+# "symfony/phpunit-bridge": "^4.2 || ^5.0",
# "phpspec/prophecy": "^1.10"
-BuildRequires: phpunit
+BuildRequires: %{_phpunit}
# For autoloader
-BuildRequires: php-composer(fedora/autoloader) >= 0.1.2
-BuildRequires: php-seld-phar-utils >= 1.0.1
-BuildRequires: php-PsrLog >= 1.0.0-8
+BuildRequires: php-fedora-autoloader-devel
+BuildRequires: php-seld-phar-utils >= 1.1
+BuildRequires: php-PsrLog >= 1.1
%endif
# From composer.json, "require": {
# "php": "^5.3.2 || ^7.0",
# "composer/ca-bundle": "^1.0",
-# "composer/semver": "^1.0",
+# "composer/semver": "^3.0",
# "composer/spdx-licenses": "^1.2",
# "composer/xdebug-handler": "^1.1",
# "justinrainbow/json-schema": "^5.2.10",
# "psr/log": "^1.0"
# "seld/jsonlint": "~1.4",
# "seld/phar-utils": "^1.0",
-# "symfony/console": "^2.7 || ^3.0 || ^4.0 || ^5.0",
-# "symfony/filesystem": "^2.7 || ^3.0 || ^4.0 || ^5.0",
-# "symfony/finder": "^2.7 || ^3.0 || ^4.0 || ^5.0",
-# "symfony/process": "^2.7 || ^3.0 || ^4.0 || ^5.0",
+# "symfony/console": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0",
+# "symfony/filesystem": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0",
+# "symfony/finder": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0",
+# "symfony/process": "^^2.8.52 || ^3.4.35 || ^4.4 || ^5.0",
+# "react/promise": "^1.2 || ^2.7"
Requires: php(language) >= 5.3.2
Requires: php-cli
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
Requires: (php-composer(composer/ca-bundle) >= 1.0 with php-composer(composer/ca-bundle) < 2)
-Requires: (php-composer(composer/semver) >= 1.0 with php-composer(composer/semver) < 2)
+Requires: (php-composer(composer/semver) >= 3.0 with php-composer(composer/semver) < 4)
Requires: (php-composer(composer/spdx-licenses) >= 1.2 with php-composer(composer/spdx-licenses) < 2)
Requires: (php-composer(composer/xdebug-handler) >= 1.1 with php-composer(composer/xdebug-handler) < 2)
Requires: (php-composer(seld/jsonlint) >= 1.4 with php-composer(seld/jsonlint) < 2)
Requires: (php-composer(seld/phar-utils) >= 1.0 with php-composer(seld/phar-utils) < 2)
Requires: (php-composer(psr/log) >= 1.0 with php-composer(psr/log) < 2)
Requires: (php-composer(justinrainbow/json-schema) >= 5.2.10 with php-composer(justinrainbow/json-schema) < 6)
+Requires: (php-composer(react/promise) >= 2.7 with php-composer(react/promise) < 3)
%else
Requires: php-composer-ca-bundle
-Requires: php-composer-semver
+Requires: php-composer-semver3
Requires: php-composer-spdx-licenses >= 1.2
Requires: php-composer-xdebug-handler >= 1.1
Requires: php-jsonlint >= 1.4
Requires: php-seld-phar-utils
Requires: php-PsrLog
Requires: php-justinrainbow-json-schema5 >= 5.2.10
+Requires: php-react-promise >= 2.7
%endif
-Requires: %{symfony_prefix}-console
-Requires: %{symfony_prefix}-finder
-Requires: %{symfony_prefix}-process
-Requires: %{symfony_prefix}-filesystem
+Requires: %{symfony_prefix}-console >= %{symfony_min}
+Requires: %{symfony_prefix}-finder >= %{symfony_min}
+Requires: %{symfony_prefix}-process >= %{symfony_min}
+Requires: %{symfony_prefix}-filesystem >= %{symfony_min}
# From composer.json, suggest
# "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages",
# "ext-zip": "Enabling the zip extension allows you to unzip archives",
@@ -133,12 +150,12 @@ Requires: php-zip
Requires: php-zlib
# For our autoloader
Requires: php-composer(fedora/autoloader)
-Requires: php-seld-phar-utils >= 1.0.1
-Requires: php-PsrLog >= 1.0.0-8
-# From phpcompatinfo
+Requires: php-seld-phar-utils >= 1.1
+Requires: php-PsrLog >= 1.1
+# From phpcompatinfo for version 2.0.0
+Requires: php-ctype
Requires: php-curl
Requires: php-date
-Requires: php-dom
Requires: php-filter
Requires: php-hash
Requires: php-iconv
@@ -146,10 +163,11 @@ Requires: php-intl
Requires: php-json
Requires: php-libxml
Requires: php-mbstring
+Requires: php-pcntl
Requires: php-pcre
Requires: php-phar
+Requires: php-posix
Requires: php-reflection
-Requires: php-simplexml
Requires: php-spl
Requires: php-tokenizer
Requires: php-xsl
@@ -180,10 +198,35 @@ if grep -r '\.\./res'; then
exit 1
fi
-cp -p %{SOURCE1} src/Composer/autoload.php
-cp -p %{SOURCE2} tests/bootstrap.php
+phpab --template fedora --output src/Composer/autoload.php src/Composer
+cat << 'EOF' | tee -a src/Composer/autoload.php
+
+\Fedora\Autoloader\Dependencies::required([
+ '%{symfony_path}/Component/Console/autoload.php',
+ '%{symfony_path}/Component/Finder/autoload.php',
+ '%{symfony_path}/Component/Process/autoload.php',
+ '%{symfony_path}/Component/Filesystem/autoload.php',
+ '%{_datadir}/php/Seld/JsonLint/autoload.php',
+ '%{_datadir}/php/Seld/PharUtils/autoload.php',
+ '%{_datadir}/php/Composer/CaBundle/autoload.php',
+ '%{_datadir}/php/Composer/Spdx/autoload.php',
+ '%{_datadir}/php/Composer/Semver3/autoload.php',
+ '%{_datadir}/php/Composer/XdebugHandler/autoload.php',
+ '%{_datadir}/php/Psr/Log/autoload.php',
+ '%{_datadir}/php/JsonSchema5/autoload.php',
+ '%{_datadir}/php/React/Promise/autoload.php',
+]);
+EOF
+
+cat << 'EOF' | tee tests/bootstrap.php
+<?php
+require 'Composer/autoload.php';
+\Fedora\Autoloader\Autoload::addPsr0('Composer\\Test\\', __DIR__ . '/');
+EOF
+
rm src/bootstrap.php
+
: fix reported version
%if 0%{?gh_date}
DATE=%{gh_date}
@@ -206,7 +249,7 @@ if (version_compare(Plugin\PluginInterface::PLUGIN_API_VERSION, "%{api_version}"
exit(1);
}
if (version_compare(Composer::RUNTIME_API_VERSION, "%{run_version}")) {
- printf("Plugin API version is %s, expected %s\n", Composer::RUNTIME_API_VERSION, "%{run_version}");
+ printf("Runtime API version is %s, expected %s\n", Composer::RUNTIME_API_VERSION, "%{run_version}");
exit(1);
}'
@@ -254,7 +297,7 @@ export BUILDROOT=%{buildroot}
ret=0
for cmd in php php72 php73 php74; do
if which $cmd; then
- $cmd -d memory_limit=1G %{_bindir}/phpunit \
+ $cmd -d memory_limit=1G %{_phpunit} \
--filter '^((?!(testIntegration)).)*$' \
--include-path %{buildroot}%{_datadir}/php || ret=1
fi
@@ -277,6 +320,13 @@ exit $ret
%changelog
+* Wed Jun 3 2020 Remi Collet <remi@remirepo.net> - 2.0.0~alpha1-1
+- update to 2.0.0-alpha1
+- switch to Symfony 4
+- switch to phpunit7
+- raise dependency on composer/semver 3
+- add dependency on react/promise 2.7
+
* Wed Jun 3 2020 Remi Collet <remi@remirepo.net> - 1.10.7-1
- update to 1.10.7
- raise dependency on justinrainbow/json-schema 5.2.10