vimeo/psalm

Notice in php 8.1 autoloading causes psalm to fatal error

Open

#7691 aperta il 18 feb 2022

Vedi su GitHub
 (11 commenti) (2 reazioni) (0 assegnatari)PHP (668 fork)batch import
Help wantedenhancement

Metriche repository

Star
 (5369 star)
Metriche merge PR
 (Merge medio 3g 12h) (5 PR mergiate in 30 g)

Descrizione

If any autoloaded files (in libraries) fire the notice:

Return type of Class:method() should either be compatible with Class::method: OtherClass, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in FILE:LINE in /app/vendor/vimeo/psalm/src/Psalm/Internal/ErrorHandler.php:66

then psalm fails to run any analysis at all. Obviously, libraries should update their code, but psalm should still be usable.

Psalm is installed via composer at version 4.20.0

Guida contributor