You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @weirdan@muglug -- this actually had a breaking change for me! Granted, I have a probably uncommon use case.
I have legacy code in which all warnings are silenced -- as a result, we have lots of these problems ignored in our baseline file.
Upon upgrading to psalm 4 which has this change in it, there are runtime exceptions thrown by psalm that are surfacing these warnings. This problem is surfaced when referencing a class in the universalObjectCrates config area, which subsequently autoloads the class
[root@docker local]# ./vendor/bin/psalm.phar --debug
Uncaught RuntimeException: PHP Error: Declaration of {redacted method} should be compatible with {redacted method with different params} in /var/www/{redacted} phar:///var/www/{redacted}/vendor/psalm/phar/psalm.phar/src/Psalm/Internal/ErrorHandler.php:53
Stack trace:
#0 {redacted} Psalm\Internal\ErrorHandler::Psalm\Internal\{closure}(2, 'Declaration of ...', '{redacted}', 127, Array)
#1 phar:///var/www/{redacted}vendor/psalm/phar/psalm.phar/.box/vendor/composer/ClassLoader.php(444): include('/var/www/{redacted}...')
#2 phar:///var/www/{redacted}vendor/psalm/phar/psalm.phar/.box/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile('/var/www/{redacted}...')
#3 [internal function]: Composer\Autoload\ClassLoader->loadClass({redacted}\\...')
#4 [internal function]: spl_autoload_call('{redacted}...')
#5 phar:///var/www/{redacted}vendor/psalm/phar/psalm.phar/src/Psalm/Config.php(1558): class_exists('{redacted}...', true)
#6 phar:///var/www/{redacted}/vendor/psalm/phar/psalm.phar/src/Psalm/Config.php(677): Psalm\Config->addUniversalObjectCrate('{redacted}...')
#7 phar:///var/www/{redacted}/vendor/psalm/phar/psalm.phar/src/Psalm/Config.php(507):
...
I think that's a great idea! Normally a notice pre-empts a fatal error anyway.
Originally posted by @muglug in #5255 (comment)
The text was updated successfully, but these errors were encountered: