From 2f8f9bdbd9ec6c40fd8fe26e340da9279d74097f Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Mon, 17 Feb 2025 08:28:41 +0100 Subject: [PATCH] fix(deps): Do not ship psr/log It is provided by server's 3rdparty. Shipping another copy can lead to a dependency hell. Signed-off-by: Christoph Wurst --- .github/workflows/test.yml | 6 +-- REUSE.toml | 2 +- composer.json | 3 ++ composer.lock | 52 +-------------------- psalm.xml | 1 + vendor-bin/psalm-stubs/composer.json | 5 ++ vendor-bin/psalm-stubs/composer.lock | 69 ++++++++++++++++++++++++++++ 7 files changed, 83 insertions(+), 55 deletions(-) create mode 100644 vendor-bin/psalm-stubs/composer.json create mode 100644 vendor-bin/psalm-stubs/composer.lock diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 30bf38f7f1..15da6642a0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -63,16 +63,16 @@ jobs: strategy: matrix: php-versions: ['8.3'] - nextcloud-versions: ['master'] + nextcloud-versions: ['chore/mail-bisect-6e1d9a26209ec5524fbc2fb9c7cbb53315e64d72'] db: ['sqlite', 'mysql', 'pgsql'] cache: ['nocache'] include: - php-versions: 8.1 - nextcloud-versions: master + nextcloud-versions: 'chore/mail-bisect-6e1d9a26209ec5524fbc2fb9c7cbb53315e64d72' db: 'sqlite' cache: 'redis' - php-versions: 8.2 - nextcloud-versions: master + nextcloud-versions: 'chore/mail-bisect-6e1d9a26209ec5524fbc2fb9c7cbb53315e64d72' db: 'mysql' cache: 'redis' - php-versions: 8.2 diff --git a/REUSE.toml b/REUSE.toml index bc3ee28306..e1a2067326 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -78,7 +78,7 @@ SPDX-FileCopyrightText = "2021 Nextcloud GmbH and Nextcloud contributors" SPDX-License-Identifier = "AGPL-3.0-or-later" [[annotations]] -path = ["vendor-bin/cs-fixer/composer.json", "vendor-bin/cs-fixer/composer.lock", "vendor-bin/mozart/composer.json", "vendor-bin/mozart/composer.lock", "vendor-bin/openapi/composer.*", "vendor-bin/phpunit/composer.json", "vendor-bin/phpunit/composer.lock", "vendor-bin/rector/composer.json", "vendor-bin/rector/composer.lock"] +path = ["vendor-bin/*/composer.json", "vendor-bin/*/composer.lock"] precedence = "aggregate" SPDX-FileCopyrightText = "2021-2024 Nextcloud GmbH and Nextcloud contributors" SPDX-License-Identifier = "AGPL-3.0-or-later" diff --git a/composer.json b/composer.json index 5ffa0d8423..ad9efe706f 100644 --- a/composer.json +++ b/composer.json @@ -43,6 +43,9 @@ "sabberworm/php-css-parser": "^8.7.0", "youthweb/urllinker": "^2.0" }, + "provide": { + "psr/log": "^1.0.4|^2|^3" + }, "require-dev": { "fig/log-test": "^1.1", "psalm/phar": "^5.26.1", diff --git a/composer.lock b/composer.lock index 916be01dda..10b4541709 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": "1101c2dd1b2758767154826ada8b67b4", + "content-hash": "f572594051343873ed3ca3a55bc6d08d", "packages": [ { "name": "amphp/amp", @@ -2270,56 +2270,6 @@ }, "time": "2019-10-10T17:19:06+00:00" }, - { - "name": "psr/log", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", - "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "support": { - "source": "https://github.com/php-fig/log/tree/3.0.2" - }, - "time": "2024-09-11T13:17:53+00:00" - }, { "name": "rubix/ml", "version": "2.5.2", diff --git a/psalm.xml b/psalm.xml index cf4a238f12..0fc5f222d2 100644 --- a/psalm.xml +++ b/psalm.xml @@ -21,6 +21,7 @@ + diff --git a/vendor-bin/psalm-stubs/composer.json b/vendor-bin/psalm-stubs/composer.json new file mode 100644 index 0000000000..c5bb699936 --- /dev/null +++ b/vendor-bin/psalm-stubs/composer.json @@ -0,0 +1,5 @@ +{ + "require": { + "psr/log": "^3.0" + } +} diff --git a/vendor-bin/psalm-stubs/composer.lock b/vendor-bin/psalm-stubs/composer.lock new file mode 100644 index 0000000000..f1e3489f61 --- /dev/null +++ b/vendor-bin/psalm-stubs/composer.lock @@ -0,0 +1,69 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "d49e4e9e1d7c0a257de1bdf135036473", + "packages": [ + { + "name": "psr/log", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/3.0.2" + }, + "time": "2024-09-11T13:17:53+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": {}, + "prefer-stable": false, + "prefer-lowest": false, + "platform": {}, + "platform-dev": {}, + "plugin-api-version": "2.6.0" +}