From 56291a3c1deede52732681cc5afc06c30d969b5c Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Tue, 22 Mar 2022 12:40:54 +0100 Subject: [PATCH] Removed support for PHP 7.2, 7.3, 7.4, required ext-ctype to be installed TL;DR: polyfills are to be installed by downstream consumers, and not provided by libraries In order to support PHP 7.2, 7.3 and 7.4, the `symfony/polyfill-php80` library was dragged in. Symfony now has a long track record of bad stability ranges (see https://github.com/symfony/polyfill-php80/blob/f4386d7f6f66346254ed4e6bfa4354d2d16b83f8/composer.json#L22-L24), so it is best to get rid of it, and instead declare API compatibility with a stable API version (in this case PHP 8.0). In addition to that, to avoid introducing an explicit `ext-ctype` requirement, `symfony/polyfill-ctype` was dragged in too, perhaps in an attempt to retain more popularity. Same as above: symfony has a bad track record of SemVer compliance, so it should not be introduced until strictly necessary. `ext-ctype` is generally available to most target installation systems, and downstream consumers are still free to pull out their foot-gun by doing a `composer require symfony/polyfill-ctype` on their own. This mean that systems having `ext-ctype` installed will get an installation as expected: otherwise, any system that requires `ramsey/uuid` automatically becomes a system capable of providing `ext-ctype` API, which is just not true (before this change). --- .github/workflows/continuous-integration.yml | 6 ------ composer.json | 7 +++---- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 6c06aa6..6102ae4 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -60,9 +60,6 @@ jobs: fail-fast: false matrix: php-version: - - "7.2" - - "7.3" - - "7.4" - "8.0" - "8.1" @@ -128,9 +125,6 @@ jobs: fail-fast: false matrix: php-version: - - "7.2" - - "7.3" - - "7.4" - "8.0" - "8.1" operating-system: diff --git a/composer.json b/composer.json index 3f3b5ac..ca50d1c 100644 --- a/composer.json +++ b/composer.json @@ -9,12 +9,11 @@ ], "license": "MIT", "require": { - "php": "^7.2 || ^8.0", + "php": "^8.0", + "ext-ctype": "*", "ext-json": "*", "brick/math": "^0.8 || ^0.9", - "ramsey/collection": "^1.0", - "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-php80": "^1.14" + "ramsey/collection": "^1.0" }, "replace": { "rhumsaa/uuid": "self.version"