Allow Symfony 8 and fix PHP 8.4+ nullable deprecations - #9
Merged
Conversation
symfony/finder was capped at ^7, which blocks installing the library in any Symfony 8 project. Widen it to ^8 (and var-dumper/phpunit for dev). Also declare the two implicitly-nullable parameters explicitly — PHP 8.4 deprecates `Type $x = null`: - CnbRates::getRates() - NameDaysAbstract::getNameDay() Tested on PHP 8.5.6 with symfony/finder 8.1.1: CnbRatesTest and NameDayTest pass. OpenWeatherTest still needs a WEATHER_API key and fails without one, unchanged by this PR.
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.
Balík nejde nainstalovat do Symfony 8 projektu —
symfony/finderje zastropovaný na^7.symfony/finder→^4|^5|^6|^7|^8symfony/var-dumper→^8,phpunit/phpunit→^11|^12|^13Type $x = null:CnbRates::getRates(?DateTime $date = null)NameDaysAbstract::getNameDay(?\DateTime $date = null)Ověřeno na PHP 8.5.6 + symfony/finder 8.1.1 —
CnbRatesTestaNameDayTestzelené, bez deprecations.OpenWeatherTestvyžadujeWEATHER_APIklíč a padá i bez téhle změny.Mimo rozsah:
OpenWeatherneošetřuje neúspěšnou odpověď API —$json->sys->sunsetje paknulla padá to doDateTime::setTimestamp(null)amb_strtolower(null), což je na PHP 9 užTypeError.