summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-09-14 15:48:32 +0200
committerRemi Collet <remi@remirepo.net>2021-09-14 15:48:32 +0200
commitb83c7737bb365257fe91f0dca62b119cffa69c36 (patch)
tree444fb6dbd24ff791103cae01d9a1f7365fbbb429
parenteba21085f0f8c7263772dcac90d855902caac9ee (diff)
update to 2.1.7
-rw-r--r--composer-rpm.patch72
-rw-r--r--composer.json13
-rw-r--r--composer.spec9
3 files changed, 53 insertions, 41 deletions
diff --git a/composer-rpm.patch b/composer-rpm.patch
index d63b69b..cbb4b3c 100644
--- a/composer-rpm.patch
+++ b/composer-rpm.patch
@@ -1,6 +1,6 @@
diff -up ./bin/composer.rpm ./bin/composer
---- ./bin/composer.rpm 2021-06-04 09:21:49.000000000 +0200
-+++ ./bin/composer 2021-06-04 09:21:53.808648766 +0200
+--- ./bin/composer.rpm 2021-09-14 15:45:17.000000000 +0200
++++ ./bin/composer 2021-09-14 15:45:33.025118009 +0200
@@ -6,7 +6,7 @@ if (PHP_SAPI !== 'cli' && PHP_SAPI !== '
}
@@ -11,8 +11,8 @@ 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 2021-06-04 09:21:49.000000000 +0200
-+++ ./src/Composer/Autoload/AutoloadGenerator.php 2021-06-04 09:21:53.808648766 +0200
+--- ./src/Composer/Autoload/AutoloadGenerator.php.rpm 2021-09-14 15:45:17.000000000 +0200
++++ ./src/Composer/Autoload/AutoloadGenerator.php 2021-09-14 15:45:33.025118009 +0200
@@ -395,7 +395,7 @@ EOF;
$filesystem->filePutContentsIfModified($targetDir.'/autoload_real.php', $this->getAutoloadRealFile(true, (bool) $includePathFileContents, $targetDirLoader, (bool) $includeFilesFileContents, $vendorPathCode, $appBaseDirCode, $suffix, $useGlobalIncludePath, $prependAutoloader, $staticPhpVersion, $checkPlatform));
@@ -23,9 +23,9 @@ diff -up ./src/Composer/Autoload/AutoloadGenerator.php.rpm ./src/Composer/Autolo
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 2021-06-04 09:21:49.000000000 +0200
-+++ ./src/Composer/Compiler.php 2021-06-04 09:21:53.808648766 +0200
-@@ -100,7 +100,7 @@ class Compiler
+--- ./src/Composer/Compiler.php.rpm 2021-09-14 15:45:17.000000000 +0200
++++ ./src/Composer/Compiler.php 2021-09-14 15:45:33.025118009 +0200
+@@ -118,7 +118,7 @@ class Compiler
// Add Composer resources
$finder = new Finder();
$finder->files()
@@ -34,9 +34,30 @@ diff -up ./src/Composer/Compiler.php.rpm ./src/Composer/Compiler.php
->sort($finderSort)
;
foreach ($finder as $file) {
+diff -up ./src/Composer/InstalledVersions.php.rpm ./src/Composer/InstalledVersions.php
+--- ./src/Composer/InstalledVersions.php.rpm 2021-09-14 15:45:17.000000000 +0200
++++ ./src/Composer/InstalledVersions.php 2021-09-14 15:45:33.026118007 +0200
+@@ -251,7 +251,7 @@ class InstalledVersions
+ if (null === self::$installed) {
+ // only require the installed.php file if this file is loaded from its dumped location,
+ // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
+- if (substr(__DIR__, -8, 1) !== 'C') {
++ if (substr(__DIR__, -8, 1) !== 'C' && is_file(__DIR__ . '/installed.php')) {
+ self::$installed = include __DIR__ . '/installed.php';
+ } else {
+ self::$installed = array();
+@@ -324,7 +324,7 @@ class InstalledVersions
+ if (null === self::$installed) {
+ // only require the installed.php file if this file is loaded from its dumped location,
+ // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
+- if (substr(__DIR__, -8, 1) !== 'C') {
++ if (substr(__DIR__, -8, 1) !== 'C' && is_file(__DIR__ . '/installed.php')) {
+ self::$installed = require __DIR__ . '/installed.php';
+ } else {
+ self::$installed = array();
diff -up ./src/Composer/Json/JsonFile.php.rpm ./src/Composer/Json/JsonFile.php
---- ./src/Composer/Json/JsonFile.php.rpm 2021-06-04 09:21:49.000000000 +0200
-+++ ./src/Composer/Json/JsonFile.php 2021-06-04 09:23:51.867361526 +0200
+--- ./src/Composer/Json/JsonFile.php.rpm 2021-09-14 15:45:17.000000000 +0200
++++ ./src/Composer/Json/JsonFile.php 2021-09-14 15:46:22.434026477 +0200
@@ -34,7 +34,7 @@ class JsonFile
const JSON_PRETTY_PRINT = 128;
const JSON_UNESCAPED_UNICODE = 256;
@@ -44,9 +65,9 @@ diff -up ./src/Composer/Json/JsonFile.php.rpm ./src/Composer/Json/JsonFile.php
- const COMPOSER_SCHEMA_PATH = '/../../../res/composer-schema.json';
+ const COMPOSER_SCHEMA_PATH = '/usr/share/composer/res/composer-schema.json';
+ /** @var string */
private $path;
- private $httpDownloader;
-@@ -188,7 +188,7 @@ class JsonFile
+@@ -191,7 +191,7 @@ class JsonFile
$isComposerSchemaFile = false;
if (null === $schemaFile) {
$isComposerSchemaFile = true;
@@ -56,8 +77,8 @@ 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 2021-06-04 09:21:49.000000000 +0200
-+++ ./tests/Composer/Test/Json/ComposerSchemaTest.php 2021-06-04 09:21:53.808648766 +0200
+--- ./tests/Composer/Test/Json/ComposerSchemaTest.php.rpm 2021-09-14 15:45:17.000000000 +0200
++++ ./tests/Composer/Test/Json/ComposerSchemaTest.php 2021-09-14 15:45:33.025118009 +0200
@@ -93,7 +93,8 @@ class ComposerSchemaTest extends TestCas
private function check($json)
{
@@ -69,8 +90,8 @@ diff -up ./tests/Composer/Test/Json/ComposerSchemaTest.php.rpm ./tests/Composer/
if (!$validator->isValid()) {
$errors = $validator->getErrors();
diff -up ./tests/Composer/Test/PolyfillTestCase.php.rpm ./tests/Composer/Test/PolyfillTestCase.php
---- ./tests/Composer/Test/PolyfillTestCase.php.rpm 2021-06-04 09:21:49.000000000 +0200
-+++ ./tests/Composer/Test/PolyfillTestCase.php 2021-06-04 09:21:53.808648766 +0200
+--- ./tests/Composer/Test/PolyfillTestCase.php.rpm 2021-09-14 15:45:17.000000000 +0200
++++ ./tests/Composer/Test/PolyfillTestCase.php 2021-09-14 15:45:33.026118007 +0200
@@ -15,10 +15,35 @@ namespace Composer\Test {
use PHPUnit\Framework\Constraint\LogicalNot;
use PHPUnit\Framework\Constraint\StringContains;
@@ -108,24 +129,3 @@ diff -up ./tests/Composer/Test/PolyfillTestCase.php.rpm ./tests/Composer/Test/Po
} else {
abstract class PolyfillTestCase extends TestCase
{
---- ./src/Composer/InstalledVersions.php.rpm 2021-06-07 08:18:59.326450774 +0200
-+++ ./src/Composer/InstalledVersions.php 2021-06-07 08:19:11.525413189 +0200
-@@ -251,7 +251,7 @@ class InstalledVersions
- if (null === self::$installed) {
- // only require the installed.php file if this file is loaded from its dumped location,
- // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
-- if (substr(__DIR__, -8, 1) !== 'C') {
-+ if (substr(__DIR__, -8, 1) !== 'C' && is_file(__DIR__ . '/installed.php')) {
- self::$installed = include __DIR__ . '/installed.php';
- } else {
- self::$installed = array();
-@@ -324,7 +324,7 @@ class InstalledVersions
- if (null === self::$installed) {
- // only require the installed.php file if this file is loaded from its dumped location,
- // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
-- if (substr(__DIR__, -8, 1) !== 'C') {
-+ if (substr(__DIR__, -8, 1) !== 'C' && is_file(__DIR__ . '/installed.php')) {
- self::$installed = require __DIR__ . '/installed.php';
- } else {
- self::$installed = array();
-
diff --git a/composer.json b/composer.json
index 2070495..9225f2e 100644
--- a/composer.json
+++ b/composer.json
@@ -78,11 +78,20 @@
],
"scripts": {
"compile": "@php -dphar.readonly=0 bin/compile",
- "test": "simple-phpunit"
+ "test": "simple-phpunit",
+ "phpstan-setup": [
+ "@composer config platform --unset",
+ "@php composer.phar update",
+ "@composer require --dev phpstan/phpstan:^0.12.93 phpstan/phpstan-phpunit:^0.12.17 phpunit/phpunit:^7.5.20 --with-all-dependencies",
+ "git checkout composer.json composer.lock"
+ ],
+ "phpstan": "@php vendor/bin/phpstan analyse --configuration=phpstan/config.neon"
},
"scripts-descriptions": {
"compile": "Compile composer.phar",
- "test": "Run all tests"
+ "test": "Run all tests",
+ "phpstan-setup": "Prepare environment to run PHPStan locally (must be run with PHP7.4)",
+ "phpstan": "Runs PHPStan (after phpstan-setup was executed, must be run with PHP7.4)"
},
"support": {
"issues": "https://github.com/composer/composer/issues",
diff --git a/composer.spec b/composer.spec
index 2a55a87..00d35c4 100644
--- a/composer.spec
+++ b/composer.spec
@@ -12,7 +12,7 @@
%bcond_without tests
-%global gh_commit e5cac5f9d2354d08b67f1d21c664ae70d748c603
+%global gh_commit f381e45f0b83a602a315613e08fffe0d8f2288c8
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_branch 2.0-dev
%global gh_owner composer
@@ -20,7 +20,7 @@
%global api_version 2.1.0
%global run_version 2.1.0
-%global upstream_version 2.1.6
+%global upstream_version 2.1.7
#global upstream_prever RC1
#global upstream_lower rc1
@@ -302,7 +302,7 @@ find tests \
# testIntegration may hang on local build
ret=0
-for cmd in php php73 php74 php80; do
+for cmd in php php73 php74 php80 php81; do
if which $cmd; then
$cmd -d memory_limit=1G %{_phpunit} \
$FILTER \
@@ -327,6 +327,9 @@ exit $ret
%changelog
+* Tue Sep 14 2021 Remi Collet <remi@remirepo.net> - 2.1.7-1
+- update to 2.1.7
+
* Mon Aug 23 2021 Remi Collet <remi@remirepo.net> - 2.1.6-1
- update to 2.1.6