diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 9bcabbf..bef8f7b 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -14,19 +14,17 @@ jobs: strategy: matrix: php: - - '7.1' - - '7.2' - - '7.3' - '7.4' - '8.0' - '8.1' - '8.2' - '8.3' + - '8.4' composer_version: ['v2'] include: - description: '(prefer lowest)' - php: '7.1' - composer_version: '2.0.0' + php: '7.4' + composer_version: '2.1.0' dependencies: 'lowest' name: PHP ${{ matrix.php }} tests ${{ matrix.description }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 887c4b8..572aa5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ All notable changes of the `jean85/pretty-package-versions` package are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. +## [2.1.0] - 2024-11-18 +### Added +* Add CI tests for PHP 8.4 +### Changed +* Bump minimum PHP version to 7.4 +* Bump minimum Composer version to 2.1.0 + ## [2.0.6] - 2024-03-08 ### Added * PHP 8.2 and 8.3 support verified diff --git a/composer.json b/composer.json index 4c73537..7bf7037 100644 --- a/composer.json +++ b/composer.json @@ -3,8 +3,8 @@ "description": "A library to get pretty versions strings of installed dependencies", "type": "library", "require": { - "php": "^7.1|^8.0", - "composer-runtime-api": "^2.0.0" + "php": "^7.4|^8.0", + "composer-runtime-api": "^2.1.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.2", diff --git a/src/PrettyVersions.php b/src/PrettyVersions.php index 2155d9e..17b33b8 100644 --- a/src/PrettyVersions.php +++ b/src/PrettyVersions.php @@ -43,14 +43,6 @@ public static function getRootPackageVersion(): Version protected static function checkProvidedPackages(string $packageName): void { - if (! method_exists(InstalledVersions::class, 'getAllRawData')) { - if (isset(InstalledVersions::getRawData()['versions'][$packageName]['provided'])) { - throw ProvidedPackageException::create($packageName); - } - - return; - } - foreach (InstalledVersions::getAllRawData() as $installed) { if (isset($installed['versions'][$packageName]['provided'])) { throw ProvidedPackageException::create($packageName); @@ -60,14 +52,6 @@ protected static function checkProvidedPackages(string $packageName): void protected static function checkReplacedPackages(string $packageName): void { - if (! method_exists(InstalledVersions::class, 'getAllRawData')) { - if (isset(InstalledVersions::getRawData()['versions'][$packageName]['replaced'])) { - throw ReplacedPackageException::create($packageName); - } - - return; - } - foreach (InstalledVersions::getAllRawData() as $installed) { if (isset($installed['versions'][$packageName]['replaced'])) { throw ReplacedPackageException::create($packageName);