Roave / psr-container-doctrine

Doctrine Factories for PSR-11 Containers
BSD 2-Clause "Simplified" License
95 stars 31 forks source link

Use a stricter range for PHP version in composer.json #57

Closed edigu closed 2 years ago

edigu commented 2 years ago

This PR restricts the php version range in composer.json to avoid potential mess as PHP introduces new BC breaks in minor releases.

Closes #56

Ocramius commented 2 years ago

Oh, the lockfile probably needs reverting: try composer update --lock on the original version

edigu commented 2 years ago

Okay this is a bit sneaky. When I do a composer update --lock on the original version, lock file contains following diff:

diff --git a/composer.lock b/composer.lock
index 577c7f2..523f432 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": "74cefb769ea346e7d63d8d9cb057be6b",
+    "content-hash": "6314d7ee1d696d2ee9b265f34f9b5d9f",
     "packages": [
         {
             "name": "doctrine/cache",
@@ -5552,7 +5552,7 @@
     "prefer-stable": false,
     "prefer-lowest": false,
     "platform": {
-        "php": "^7.4 || ~8.0.0 || ~8.1.0"
+        "php": "^7.4"
     },
     "platform-dev": [],
     "plugin-api-version": "2.2.0"

Are we trying to have ^7.4 in lock and ^7.4 || ~8.0.0 || ~8.1.0 in composer.json intentionally or am I missing something else?

Ocramius commented 2 years ago

In theory, composer update --lock should copy the current platform to the lock file :thinking:

You can also try composer update nothing

Ocramius commented 2 years ago

Fixed in #64