Skip to content

Commit

Permalink
Merge branch 'general-bumps' into 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean85 committed Nov 18, 2024
2 parents 284713b + 1cc1917 commit 3c4e5f6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 23 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
16 changes: 0 additions & 16 deletions src/PrettyVersions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 3c4e5f6

Please sign in to comment.