Skip to content

Allow Symfony 8 and fix PHP 8.4+ nullable deprecations - #9

Merged
dfridrich merged 1 commit into
masterfrom
symfony-8-support
Jul 24, 2026
Merged

Allow Symfony 8 and fix PHP 8.4+ nullable deprecations#9
dfridrich merged 1 commit into
masterfrom
symfony-8-support

Conversation

@dfridrich

@dfridrich dfridrich commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Balík nejde nainstalovat do Symfony 8 projektu — symfony/finder je zastropovaný na ^7.

  • symfony/finder^4|^5|^6|^7|^8
  • dev: symfony/var-dumper^8, phpunit/phpunit^11|^12|^13
  • explicitní nullable typy tam, kde PHP 8.4 deprecuje Type $x = null:
    • CnbRates::getRates(?DateTime $date = null)
    • NameDaysAbstract::getNameDay(?\DateTime $date = null)

Ověřeno na PHP 8.5.6 + symfony/finder 8.1.1 — CnbRatesTest a NameDayTest zelené, bez deprecations. OpenWeatherTest vyžaduje WEATHER_API klíč a padá i bez téhle změny.

Mimo rozsah: OpenWeather neošetřuje neúspěšnou odpověď API — $json->sys->sunset je pak null a padá to do DateTime::setTimestamp(null) a mb_strtolower(null), což je na PHP 9 už TypeError.

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.
@dfridrich
dfridrich merged commit 14138d8 into master Jul 24, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant