Skip to content

Allow GMP in increment/decrement operations#5530

Open
Firehed wants to merge 2 commits intophpstan:2.1.xfrom
Firehed:gmp-inc-dec-fix
Open

Allow GMP in increment/decrement operations#5530
Firehed wants to merge 2 commits intophpstan:2.1.xfrom
Firehed:gmp-inc-dec-fix

Conversation

@Firehed
Copy link
Copy Markdown
Contributor

@Firehed Firehed commented Apr 24, 2026

Summary

  • Add GMP to allowed types in InvalidIncDecOperationRule
  • GMP supports ++ and -- via operator overloading (since PHP 5.6)

Relates to phpstan/phpstan#13965 (partially - addresses inc/dec for GMP; unary +/- still need UnaryOperatorTypeSpecifyingExtension)

Test plan

  • Added test for GMP increment/decrement operations
  • All existing tests pass

🤖 Generated with Claude Code

Firehed and others added 2 commits April 24, 2026 12:54
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Firehed
Copy link
Copy Markdown
Contributor Author

Firehed commented Apr 24, 2026

@VincentLanglet based on your comment in phpstan/phpstan-strict-rules#311

@VincentLanglet VincentLanglet requested a review from staabm April 24, 2026 22:53
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.

2 participants