Prepare 2.0: PHP 8.2+, PHPUnit 11.5+, PHPStan 2 at max level - #3
Merged
Merged
Conversation
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.
Cleanup for the 2.0 major, after #2.
^2.4|^3is unchanged: apps on Monolog 2 (e.g. Symfony 5.4) keep working.^11.5|^12|^13(11.5 is the first to require PHP 8.2), PHPStan^2.max(was 5). Monolog 2 records (arrays) and Monolog 3 records (LogRecord) are now read in one place,fields(), with a typed shape, instead of$record['level_name'] ?? $record['level']['name']everywhere.formatBatch()declared its parameter as a single record rather than an array of records.--prefer-loweston 8.2 (which tests Monolog 2.4 and PHPUnit 11.5),phpcsnow runs (the "Coding standards" job only ran PHPStan, which is how an unused import landed onmain),actions/checkout@v7andactions/cache@v6, no more deprecated--no-suggest, cache key oncomposer.jsonsince there is no lock file.phpstan.neonis excluded from the package archive.bref.cloudwatch_formatterservice registered byBrefBundle(the class name only works if the app registers it as a service) and logs tophp://stderrrather than to a file.Behavior: unchanged, except that closed resources in the context are now normalized by Monolog (
[unknown(resource (closed))]) instead of being passed as-is tojson_encode(). Level names were already uppercase in Monolog 2 and 3, sostrtoupper()is gone.Tested locally with the latest dependencies (Monolog 3.12, PHPUnit 13) and the lowest ones (Monolog 2.4, PHPUnit 11.5).