From 19ceeb98b5732ebef6fac7237f0425c4f8754a57 Mon Sep 17 00:00:00 2001 From: Nicolas Joubert Date: Wed, 14 Oct 2026 16:01:51 +0200 Subject: [PATCH] #274 - CI: test the lowest dependencies, fix the lower bounds of psr/log and monolog/monolog - New CI job: PHP 8.2 with dependency-versions: lowest (composer update --prefer-lowest --prefer-stable). - psr/log ^2|^3: Logger\AbstractLogger (and the test loggers) implement the typed LoggerInterface signatures, a fatal error with psr/log 1, which was allowed through the Symfony components. - monolog/monolog ^3: the Logger\*Processor classes use Monolog\LogRecord (Monolog 3 only); with Monolog 2 (allowed by symfony/monolog-bundle 3.11), every log of the cleverage_process* channels would fail with a TypeError. Co-Authored-By: Claude Opus 5.5 (1M context) --- .github/workflows/test.yml | 6 ++++++ CHANGELOG.md | 1 + composer.json | 2 ++ 3 files changed, 9 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b49e0ce1..90a11b6f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -29,6 +29,12 @@ jobs: symfony-require: [''] variant: [normal] include: + # Lowest versions allowed by composer.json, on the lowest supported PHP version + - php-version: '8.2' + dependencies: lowest + allowed-to-fail: false + symfony-require: '' + variant: normal - php-version: '8.2' dependencies: highest allowed-to-fail: false diff --git a/CHANGELOG.md b/CHANGELOG.md index 55757f06..18f194c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ Latest ------ ## Changes +* [#274](https://github.com/cleverage/process-bundle/issues/274) CI: test the lowest versions allowed by `composer.json` (`--prefer-lowest`, PHP 8.2). Fix the lower bounds it revealed: require `psr/log` `^2|^3` (`Logger\AbstractLogger` and the loggers of the tests use the typed `LoggerInterface` signatures, a fatal error with `psr/log` 1) and `monolog/monolog` `^3` (the `Logger\*Processor` classes use `Monolog\LogRecord`, Monolog 3 only: a `TypeError` on every log of the `cleverage_process*` channels with Monolog 2). * [#273](https://github.com/cleverage/process-bundle/issues/273) Trigger the deprecations with `trigger_deprecation()` (`symfony/deprecation-contracts`, now required) instead of `@trigger_error(..., E_USER_DEPRECATED)`: the messages are prefixed with the package and the version that introduced the deprecation (e.g. `Since cleverage/process-bundle 5.1: ...`), as for the Symfony packages. Same `E_USER_DEPRECATED` level. Add tests. * [#270](https://github.com/cleverage/process-bundle/issues/270) Add a `.gitattributes`: the development files (`.docker/`, `.github/`, `tests/`, quality tools and PHPUnit configurations, `Makefile`…) are no longer part of the archive installed by Composer (`dist`). Remove the obsolete test fixtures of `src/Resources/tests/` (not used since the tests rewrite). * [#271](https://github.com/cleverage/process-bundle/issues/271) DependencyInjection: `CleverAgeProcessExtension::findServices()` loads the service definition files with a glob pattern instead of a `Finder` (same files), `Configuration` uses `arrayPrototype()` / `variablePrototype()` / `scalarPrototype()` instead of `prototype()` (same configuration tree). Add tests. diff --git a/composer.json b/composer.json index 27d981f0..ccca5e17 100644 --- a/composer.json +++ b/composer.json @@ -60,8 +60,10 @@ "ext-libxml": "*", "ext-mbstring": "*", "ext-xmlreader": "*", + "monolog/monolog": "^3", "psr/cache": "^1|^2|^3", "psr/container": "^1.1|^2", + "psr/log": "^2|^3", "symfony/config": "^6.4|^7.4|^8", "symfony/console": "^6.4|^7.4|^8", "symfony/deprecation-contracts": "^2.5|^3",