-
Notifications
You must be signed in to change notification settings - Fork 686
Closed
Description
Context: I'm trying to fix an error that does not happen in the CI of doctrine/orm, but does happen on my machine where I use PHP 7.4.
I tried fixing it with an assert
, but now I get the opposite situation: doctrine/orm#8917
I cannot reproduce the issue on psalm.dev, that presumably does not run PHP 8
https://psalm.dev/r/a8f882ff61
On a machine with PHP 8, as well as on the CI, I know get this:
ERROR: RedundantConditionGivenDocblockType - lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php:912:13 - Docblock-defined type SimpleXMLElement for $action is never null (see https://psalm.dev/156)
assert($action !== null);
ERROR: RedundantConditionGivenDocblockType - lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php:912:20 - Docblock-defined type SimpleXMLElement ca never contain null (see https://psalm.dev/156)
assert($action !== null);
Either way, there is a difference in results depending on the version of PHP, and hardcoding phpVersion
to 7.1
in psalm.xml does not help. I'm not sure what to try next.
See also: https://symfony-devs.slack.com/archives/C8SFXTD2M/p1628964600095200
Metadata
Metadata
Assignees
Labels
No labels