Fixed PHP and Symfony support across full version range#18
Merged
mSprunskas merged 35 commits intopaysera:masterfrom Oct 24, 2025
Merged
Fixed PHP and Symfony support across full version range#18mSprunskas merged 35 commits intopaysera:masterfrom
mSprunskas merged 35 commits intopaysera:masterfrom
Conversation
The previous fix used method_exists(Utils::class, 'jsonEncode') to detect Monolog 2.x, but this method exists in both Monolog 1.x and 2.x. Changed to use Logger::API constant which correctly identifies: - Monolog 1.x: API = 1 - Monolog 2.x: API = 2 - Monolog 3.x: API = 3 This ensures the correct depth threshold is used for each version: - Monolog 1.x: depth <= 3 for expansion - Monolog 2.x+: depth <= 2 for expansion
Symfony 6.* requires PHP >= 8.1, so exclude: - PHP 7.4 + Symfony 6.* - PHP 8.0 + Symfony 6.* This prevents CI failures due to dependency resolution errors.
This script allows developers to test different Symfony versions and dependency levels locally before pushing to CI, matching the CI environment configuration.
Changes: - Added Symfony 7.* to test matrix (as it's supported in composer.json) - Added exclusions for Symfony 7.* with PHP < 8.2 - Complete coverage: 19 valid combinations × 2 dependency levels = 38 CI jobs - Prevents 10 invalid combination failures Valid combinations now tested: - PHP 7.4-8.0: Symfony 4.*, 5.* - PHP 8.1: Symfony 4.*, 5.*, 6.* - PHP 8.2-8.4: Symfony 4.*, 5.*, 6.*, 7.*
Add composer/package-versions-deprecated to allow-plugins to fix OutOfBoundsException from jean85/pretty-package-versions when running tests with --prefer-lowest dependencies. The plugin needs to be explicitly allowed in Composer 2+ to generate the package versions file that jean85/pretty-package-versions requires. Tested with PHP 8.0 + Symfony 4.* + lowest dependencies using Docker. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Add composer/package-versions-deprecated to allow-plugins to fix OutOfBoundsException from jean85/pretty-package-versions when running tests with --prefer-lowest dependencies. The plugin needs to be explicitly allowed in Composer 2+ to generate the package versions file that jean85/pretty-package-versions requires. Tested with PHP 8.0 + Symfony 4.* + lowest dependencies using Docker. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…PHP version
The trait was incorrectly checking PHP_VERSION_ID >= 80000 to decide
whether to use 'mixed' type hints in the normalize() method. This caused
fatal errors on PHP 8.0 with Symfony 4.* (which uses Monolog v1).
The correct approach is to check for Monolog version using
class_exists('Monolog\LogRecord'):
- Monolog v3+ has LogRecord class and requires mixed type hints
- Monolog v1/v2 don't have LogRecord class and use no type hints
This ensures proper compatibility:
- PHP 7.4-8.x with Monolog v1/v2: no type hints
- PHP 8.1+ with Monolog v3: mixed type hints
Also adds Docker-based testing infrastructure (Dockerfile.test, .dockerignore)
to enable local testing across different PHP and Symfony versions.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
vitalii-kostetskyi-paysera-net
approved these changes
Oct 17, 2025
added 2 commits
October 20, 2025 10:44
added 2 commits
October 20, 2025 10:57
scruoge
approved these changes
Oct 23, 2025
added 3 commits
October 24, 2025 14:09
This was referenced Oct 24, 2025
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.