From 10ca14afbc866d3b452c7dbed51fe8a7034029b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20B=C3=B6sing?= <2189546+boesing@users.noreply.github.com> Date: Thu, 7 Apr 2022 17:32:23 +0200 Subject: [PATCH 1/2] bugfix: conflict with `ext-psr` since it is not possible to `class_alias` to a non-user interface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is a PHP extension around which provides all (most?) PSR interfaces without the need of installing them via composer. Since we do not support this extension and since that extension does not make sense anyways (more details later), we explicitly adding a `conflict` to the `composer.json` so that there are no surprises for projects which do have the `psr` extension installed. closes #124 Now to the problem with the extension: There are multiple PSR standards around. Many of them do have multiple major versions around. The extension has to follow semver to avoid breaks in upstream projects. So as of now (v1.2.0), it only provides the interfaces for the v1 versions of the PSR standards. There is no way to provide multiple major versions of the same PSR interface from within one version of the extension. Therefore, at some point, an upstream project is either stuck with the v1 versions of the PSR standards or the extension needs to create a hilarious amount of major versions to reflect all possible combinations of all major versions (cartesian product). Lets just take the PSR-11 + PSR-6 example, we already would have 6 major versions around because PSR-11 has 2 major versions and PSR-6 has 3 major versions: - psr/cache 1.x + psr/container 1.x - psr/cache 1.x + psr/container 2.x - psr/cache 2.x + psr/container 1.x - psr/cache 2.x + psr/container 2.x - psr/cache 3.x + psr/container 1.x - psr/cache 3.x + psr/container 2.x And these are only 2 packages. I lost track on the current progress, but there will be more major versions in the future and thus the amount of major versions for the extension will grow (and with that, the confusion for upstream projects, maintainers, etc.). We highly recommend to use composer to install the PSR standards per package in the version the upstream project can work with. **Do not use the `psr` extension** Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 42ca68b0..e53eecce 100644 --- a/composer.json +++ b/composer.json @@ -53,6 +53,7 @@ "psr/container-implementation": "^1.0" }, "conflict": { + "ext-psr": "*", "laminas/laminas-code": "<3.3.1", "zendframework/zend-code": "<3.3.1", "zendframework/zend-servicemanager": "*" From 40767fabeb304527cd567c8f4c7c444df5cf10a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20B=C3=B6sing?= <2189546+boesing@users.noreply.github.com> Date: Thu, 7 Apr 2022 18:52:10 +0200 Subject: [PATCH 2/2] bugfix: update `composer.lock` to contain latest hash MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> --- composer.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.lock b/composer.lock index 25c155b1..f62e1e43 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": "e238a4c88ecd1972f68bc95830a9f920", + "content-hash": "aa071135de48212d7c9eba1a27bcbe1c", "packages": [ { "name": "laminas/laminas-stdlib", @@ -5431,5 +5431,5 @@ "platform-overrides": { "php": "7.4.99" }, - "plugin-api-version": "2.2.0" + "plugin-api-version": "2.3.0" }