Skip to content

Conversation

schlndh
Copy link
Contributor

@schlndh schlndh commented May 16, 2025

Comment on lines +64 to +69
$scope->getType($node->left),
$scope->getType($node->right),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might cause some issues below level 7, but I'm not sure how to improve it. The operator type specifying extensions don't support union well anyway.

@ondrejmirtes
Copy link
Member

Please fix the conflicts. Meanwhile the way how rules are registered have changed. Instead of entries in config.neon, parameters are now autowired with an attribute like this: #[AutowiredParameter(ref: '%featureToggles.stricterFunctionMap%')]

@schlndh schlndh force-pushed the fix-bcMathComparisonOperators branch from fd98762 to 6e7aab4 Compare July 17, 2025 15:35
@schlndh
Copy link
Contributor Author

schlndh commented Jul 17, 2025

@ondrejmirtes Done. Thank you for the tip about AutowiredParameter (one more thing that took me a few minutes was that it's also necessary to run composer dump-autoload after adding it).

@ondrejmirtes ondrejmirtes merged commit df961a7 into phpstan:2.1.x Aug 30, 2025
414 of 419 checks passed
@ondrejmirtes
Copy link
Member

Thank you!

@schlndh schlndh deleted the fix-bcMathComparisonOperators branch August 30, 2025 13:58
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.

Allow comparisons between Number and int

2 participants