Repository navigation
fix(handler): initialiser nextRotation dans setFilenameFormat pour monolog 3.13 - #47
Merged
Merged
Conversation
…g 3.13 Monolog 3.13 sets nextRotation in setFilenameFormat() instead of the constructor. The trait overrides that method, so the property stayed uninitialized and the first log write threw an Error.
phpspreadsheet 1.30.7+ requires php <8.5, so the PHP 8.5 job could no longer resolve dependencies. ExcelLoader only uses IOFactory, the Csv writer and StringHelper, unchanged up to 5.x.
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.
Fixes #46
Correctif
RotatingFileHandlerTrait::setFilenameFormat()initialise maintenant$nextRotation:getNextRotation(), qui gère aussi les rotations à l'heure, au mois et à l'année ;new \DateTimeImmutable('tomorrow'), comme le faisait son constructeur.La contrainte
monolog/monolog: ^2.0|^3.0reste inchangée.CI
phpspreadsheet 1.30.7+ exige
php <8.5: le job PHP 8.5 ne résolvait plus les dépendances. La contrainte de dev passe à^1.19|^2.0|^3.0|^4.0|^5.0.ExcelLoadern'utilise queIOFactory, le writerCsvetStringHelper, inchangés jusqu'à la 5.x.Tests
Tests/Handler/RotatingFileHandlerTestécrit une ligne via le handler et vérifie qu'elle arrive dans le fichier daté. Avec monolog 3.13.0, il échoue sans le correctif (même erreur que dans l'issue) et passe avec.Tests/Load/ExcelLoaderTestcouvreExcelLoader, qui n'avait aucun test :supports(), puisload()sur un vrai fichier.xls(délimiteur;dans une valeur, accents, décimal), avec les fonctionspg_*simulées comme dansCsvLoaderTest. Il vérifie les lignes envoyées à PostgreSQL et la suppression du CSV temporaire.Vérifié en local, sans lock, sur PHP 8.5 (monolog 3.13, phpspreadsheet 5.11) et PHP 7.4 (phpspreadsheet 1.x) : validate, PHPStan et tests OK.