Nyholm / psr7

A super lightweight PSR-7 implementation
MIT License
1.16k stars 75 forks source link

Resolve symfony/error-handler deprecations #197

Closed andrew-demb closed 2 years ago

andrew-demb commented 2 years ago

Alternative to https://github.com/Nyholm/psr7/pull/196

My suggestion about using #[\ReturnTypeWillChange] was wrong. This attribute is required only in the case of implementing SPL interfaces (like a \ArrayAccess, etc)

So these deprecations are triggered only from symfony/error-handler (with enabled debug). Also applied changes to tests (applied automatically with running patch-type-declarations https://symfony.com/doc/5.4/setup/upgrade_major.html#upgrading-to-symfony-6-add-native-return-types)