From 77abc83d1b27483c303aabe9a37b69f7f661f1a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Mon, 22 Nov 2021 10:45:03 +0100 Subject: [PATCH 1/3] Enhancement: Update composer/composer --- .github/workflows/integrate.yaml | 2 +- .github/workflows/release.yaml | 2 +- CHANGELOG.md | 2 + Makefile | 2 +- composer.json | 2 +- composer.lock | 124 ++++++++++++++++++------------- 6 files changed, 80 insertions(+), 54 deletions(-) diff --git a/.github/workflows/integrate.yaml b/.github/workflows/integrate.yaml index bd859088..0b395c22 100644 --- a/.github/workflows/integrate.yaml +++ b/.github/workflows/integrate.yaml @@ -9,7 +9,7 @@ on: # yamllint disable-line rule:truthy - "main" env: - COMPOSER_VERSION: "2.0.13" + COMPOSER_VERSION: "2.1.12" PHP_EXTENSIONS: "mbstring" PHP_INI_VALUES: "memory_limit=-1, phar.readonly=0" diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e45a58e1..4e667788 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -8,7 +8,7 @@ on: # yamllint disable-line rule:truthy - "**" env: - COMPOSER_VERSION: "2.0.13" + COMPOSER_VERSION: "2.1.12" PHP_EXTENSIONS: "mbstring" PHP_INI_VALUES: "memory_limit=-1, phar.readonly=0" diff --git a/CHANGELOG.md b/CHANGELOG.md index e453d29c..885a7835 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ For a full diff see [`2.15.0...main`][2.15.0...main]. ### Changed +* Required `composer/composer:2.1.12` for compiling `composer-normalize.phar` ([#804]), by [@localheinz] * Dropped support for `composer/composer:^1.0.0` ([#807]), by [@localheinz] ## [`2.15.0`][2.15.0] @@ -736,6 +737,7 @@ For a full diff see [`81bc3a8...0.1.0`][81bc3a8...0.1.0]. [#744]: https://github.com/ergebnis/composer-normalize/pull/744 [#750]: https://github.com/ergebnis/composer-normalize/pull/750 [#754]: https://github.com/ergebnis/composer-normalize/pull/754 +[#804]: https://github.com/ergebnis/composer-normalize/pull/804 [#807]: https://github.com/ergebnis/composer-normalize/pull/807 [@core23]: https://github.com/core23 diff --git a/Makefile b/Makefile index 6ca6bb36..867c4406 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -COMPOSER_VERSION:=2.0.13 +COMPOSER_VERSION:=2.1.12 .PHONY: it it: coding-standards static-code-analysis tests ## Runs the coding-standards, static-code-analysis, and tests targets diff --git a/composer.json b/composer.json index 90f946c7..d6c4da75 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ "localheinz/diff": "^1.1.1" }, "require-dev": { - "composer/composer": "^2.0.13", + "composer/composer": "^2.1.12", "ergebnis/license": "^1.1.0", "ergebnis/php-cs-fixer-config": "^2.14.0", "ergebnis/test-util": "^1.5.0", diff --git a/composer.lock b/composer.lock index 13ddaad0..30a71a96 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "707d3156e751d16c93753e12b2978919", + "content-hash": "e2456004d2968875eaec98439372b533", "packages": [ { "name": "ergebnis/json-normalizer", @@ -442,16 +442,16 @@ }, { "name": "composer/ca-bundle", - "version": "1.2.8", + "version": "1.3.1", "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "8a7ecad675253e4654ea05505233285377405215" + "reference": "4c679186f2aca4ab6a0f1b0b9cf9252decb44d0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/8a7ecad675253e4654ea05505233285377405215", - "reference": "8a7ecad675253e4654ea05505233285377405215", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/4c679186f2aca4ab6a0f1b0b9cf9252decb44d0b", + "reference": "4c679186f2aca4ab6a0f1b0b9cf9252decb44d0b", "shasum": "" }, "require": { @@ -460,14 +460,15 @@ "php": "^5.3.2 || ^7.0 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8", + "phpstan/phpstan": "^0.12.55", "psr/log": "^1.0", - "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0" + "symfony/phpunit-bridge": "^4.2 || ^5", + "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0 || ^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-main": "1.x-dev" } }, "autoload": { @@ -494,6 +495,11 @@ "ssl", "tls" ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/ca-bundle/issues", + "source": "https://github.com/composer/ca-bundle/tree/1.3.1" + }, "funding": [ { "url": "https://packagist.com", @@ -508,20 +514,20 @@ "type": "tidelift" } ], - "time": "2020-08-23T12:54:47+00:00" + "time": "2021-10-28T20:44:15+00:00" }, { "name": "composer/composer", - "version": "2.0.13", + "version": "2.1.12", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "986e8b86b7b570632ad0a905c3726c33dd4c0efb" + "reference": "6e3c2b122e0ec41a7e885fcaf19fa15e2e0819a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/986e8b86b7b570632ad0a905c3726c33dd4c0efb", - "reference": "986e8b86b7b570632ad0a905c3726c33dd4c0efb", + "url": "https://api.github.com/repos/composer/composer/zipball/6e3c2b122e0ec41a7e885fcaf19fa15e2e0819a0", + "reference": "6e3c2b122e0ec41a7e885fcaf19fa15e2e0819a0", "shasum": "" }, "require": { @@ -529,21 +535,21 @@ "composer/metadata-minifier": "^1.0", "composer/semver": "^3.0", "composer/spdx-licenses": "^1.2", - "composer/xdebug-handler": "^1.1", - "justinrainbow/json-schema": "^5.2.10", + "composer/xdebug-handler": "^2.0", + "justinrainbow/json-schema": "^5.2.11", "php": "^5.3.2 || ^7.0 || ^8.0", - "psr/log": "^1.0", + "psr/log": "^1.0 || ^2.0", "react/promise": "^1.2 || ^2.7", "seld/jsonlint": "^1.4", "seld/phar-utils": "^1.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" + "symfony/console": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", + "symfony/filesystem": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", + "symfony/finder": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", + "symfony/process": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0" }, "require-dev": { "phpspec/prophecy": "^1.10", - "symfony/phpunit-bridge": "^4.2 || ^5.0" + "symfony/phpunit-bridge": "^4.2 || ^5.0 || ^6.0" }, "suggest": { "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages", @@ -556,7 +562,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "2.1-dev" } }, "autoload": { @@ -588,9 +594,9 @@ "package" ], "support": { - "irc": "irc://irc.freenode.org/composer", + "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/composer/issues", - "source": "https://github.com/composer/composer/tree/2.0.13" + "source": "https://github.com/composer/composer/tree/2.1.12" }, "funding": [ { @@ -606,7 +612,7 @@ "type": "tidelift" } ], - "time": "2021-04-27T11:11:08+00:00" + "time": "2021-11-09T15:02:04+00:00" }, { "name": "composer/metadata-minifier", @@ -833,23 +839,24 @@ }, { "name": "composer/spdx-licenses", - "version": "1.5.5", + "version": "1.5.6", "source": { "type": "git", "url": "https://github.com/composer/spdx-licenses.git", - "reference": "de30328a7af8680efdc03e396aad24befd513200" + "reference": "a30d487169d799745ca7280bc90fdfa693536901" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/de30328a7af8680efdc03e396aad24befd513200", - "reference": "de30328a7af8680efdc03e396aad24befd513200", + "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/a30d487169d799745ca7280bc90fdfa693536901", + "reference": "a30d487169d799745ca7280bc90fdfa693536901", "shasum": "" }, "require": { "php": "^5.3.2 || ^7.0 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 7" + "phpstan/phpstan": "^0.12.55", + "symfony/phpunit-bridge": "^4.2 || ^5" }, "type": "library", "extra": { @@ -889,6 +896,11 @@ "spdx", "validator" ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/spdx-licenses/issues", + "source": "https://github.com/composer/spdx-licenses/tree/1.5.6" + }, "funding": [ { "url": "https://packagist.com", @@ -903,25 +915,25 @@ "type": "tidelift" } ], - "time": "2020-12-03T16:04:16+00:00" + "time": "2021-11-18T10:14:14+00:00" }, { "name": "composer/xdebug-handler", - "version": "1.4.6", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "f27e06cd9675801df441b3656569b328e04aa37c" + "reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/f27e06cd9675801df441b3656569b328e04aa37c", - "reference": "f27e06cd9675801df441b3656569b328e04aa37c", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/84674dd3a7575ba617f5a76d7e9e29a7d3891339", + "reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339", "shasum": "" }, "require": { "php": "^5.3.2 || ^7.0 || ^8.0", - "psr/log": "^1.0" + "psr/log": "^1 || ^2 || ^3" }, "require-dev": { "phpstan/phpstan": "^0.12.55", @@ -951,7 +963,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/1.4.6" + "source": "https://github.com/composer/xdebug-handler/tree/2.0.2" }, "funding": [ { @@ -967,7 +979,7 @@ "type": "tidelift" } ], - "time": "2021-03-25T17:01:18+00:00" + "time": "2021-07-31T17:03:58+00:00" }, { "name": "dnoegel/php-xdg-base-dir", @@ -3096,6 +3108,10 @@ "promise", "promises" ], + "support": { + "issues": "https://github.com/reactphp/promise/issues", + "source": "https://github.com/reactphp/promise/tree/v2.8.0" + }, "time": "2020-05-12T15:16:56+00:00" }, { @@ -3874,6 +3890,10 @@ "parser", "validator" ], + "support": { + "issues": "https://github.com/Seldaek/jsonlint/issues", + "source": "https://github.com/Seldaek/jsonlint/tree/1.8.3" + }, "funding": [ { "url": "https://github.com/Seldaek", @@ -3888,16 +3908,16 @@ }, { "name": "seld/phar-utils", - "version": "1.1.1", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/Seldaek/phar-utils.git", - "reference": "8674b1d84ffb47cc59a101f5d5a3b61e87d23796" + "reference": "749042a2315705d2dfbbc59234dd9ceb22bf3ff0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/8674b1d84ffb47cc59a101f5d5a3b61e87d23796", - "reference": "8674b1d84ffb47cc59a101f5d5a3b61e87d23796", + "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/749042a2315705d2dfbbc59234dd9ceb22bf3ff0", + "reference": "749042a2315705d2dfbbc59234dd9ceb22bf3ff0", "shasum": "" }, "require": { @@ -3928,7 +3948,11 @@ "keywords": [ "phar" ], - "time": "2020-07-07T18:42:57+00:00" + "support": { + "issues": "https://github.com/Seldaek/phar-utils/issues", + "source": "https://github.com/Seldaek/phar-utils/tree/1.1.2" + }, + "time": "2021-08-19T21:01:38+00:00" }, { "name": "symfony/console", @@ -5086,21 +5110,21 @@ }, { "name": "symfony/process", - "version": "v5.2.7", + "version": "v5.3.7", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "98cb8eeb72e55d4196dd1e36f1f16e7b3a9a088e" + "reference": "38f26c7d6ed535217ea393e05634cb0b244a1967" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/98cb8eeb72e55d4196dd1e36f1f16e7b3a9a088e", - "reference": "98cb8eeb72e55d4196dd1e36f1f16e7b3a9a088e", + "url": "https://api.github.com/repos/symfony/process/zipball/38f26c7d6ed535217ea393e05634cb0b244a1967", + "reference": "38f26c7d6ed535217ea393e05634cb0b244a1967", "shasum": "" }, "require": { "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.15" + "symfony/polyfill-php80": "^1.16" }, "type": "library", "autoload": { @@ -5128,7 +5152,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.3.0-BETA1" + "source": "https://github.com/symfony/process/tree/v5.3.7" }, "funding": [ { @@ -5144,7 +5168,7 @@ "type": "tidelift" } ], - "time": "2021-04-08T10:27:02+00:00" + "time": "2021-08-04T21:20:46+00:00" }, { "name": "symfony/service-contracts", From ce24f6b3622de7c8183a89268d512425c4425430 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Mon, 22 Nov 2021 11:13:59 +0100 Subject: [PATCH 2/3] Fix: Remove unnecessary DocBlock --- src/Command/NormalizeCommand.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Command/NormalizeCommand.php b/src/Command/NormalizeCommand.php index 00061d54..6ef4e618 100644 --- a/src/Command/NormalizeCommand.php +++ b/src/Command/NormalizeCommand.php @@ -135,7 +135,6 @@ protected function execute( $composerFile = $input->getArgument('file'); if (null === $composerFile) { - /** @var string $composerFile */ $composerFile = Factory::getComposerFile(); } From 72af70bb0640b5a66b8d109be21aaca323b6e9d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Mon, 22 Nov 2021 11:16:02 +0100 Subject: [PATCH 3/3] Fix: Verify that locker is an instance of Locker --- composer-require-checker.json | 1 + src/Command/NormalizeCommand.php | 3 +++ 2 files changed, 4 insertions(+) diff --git a/composer-require-checker.json b/composer-require-checker.json index a11ecf3b..b1208fb7 100644 --- a/composer-require-checker.json +++ b/composer-require-checker.json @@ -22,6 +22,7 @@ "Composer\\IO\\IOInterface", "Composer\\Json\\JsonFile", "Composer\\Json\\JsonValidationException", + "Composer\\Package\\Locker", "Composer\\Plugin\\Capability\\CommandProvider", "Composer\\Plugin\\Capable", "Composer\\Plugin\\PluginInterface", diff --git a/src/Command/NormalizeCommand.php b/src/Command/NormalizeCommand.php index 6ef4e618..57bdbfbe 100644 --- a/src/Command/NormalizeCommand.php +++ b/src/Command/NormalizeCommand.php @@ -17,6 +17,7 @@ use Composer\Console\Application; use Composer\Factory; use Composer\IO; +use Composer\Package; use Ergebnis\Composer\Normalize\Exception; use Ergebnis\Composer\Normalize\Version; use Ergebnis\Json\Normalizer; @@ -181,6 +182,7 @@ protected function execute( if ( false === $input->getOption('no-check-lock') + && $locker instanceof Package\Locker && $locker->isLocked() && !$locker->isFresh() ) { @@ -279,6 +281,7 @@ protected function execute( if ( true === $input->getOption('no-update-lock') + || !$locker instanceof Package\Locker || false === $locker->isLocked() ) { return 0;