[PR #8841] Enable strict mode #11203

Closed
opened 2026-01-22 16:10:01 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/8841

State: closed
Merged: Yes


#8836 was not enough to catch all the needed changes, I only fixed things I detected in my local setup, but there were more casts need with PHP 8. It also seems that Psalm and PHPStan detect more things in strict mode.

If you want me to split this into 2 PRs, let me know.

Closes #8819

Note that I'm targeting 2.x here, let me explain why:

  • I don't want too much divergence between both branches, especially when they touch that many files
  • there is no BC break AFAIK: strict mode is about function we call, not about our public API (and yes, the AFAIK is important, but if there is one, we can fix it with a cast IMO)
  • 3.x should be about removing deprecated stuff IMO: I think risky stuff that can be fixed quickly should be diluted in minors rather than piled up in 3.x, because having risky stuff always go to 3.x will make the migration to 3.0.0 very hard for everyone. In my vision, 3.0.0 should be very boring for somebody having addressed all deprecations, and not a big deal to upgrade to.
**Original Pull Request:** https://github.com/doctrine/orm/pull/8841 **State:** closed **Merged:** Yes --- #8836 was not enough to catch all the needed changes, I only fixed things I detected in my local setup, but there were more casts need with PHP 8. It also seems that Psalm and PHPStan detect more things in strict mode. If you want me to split this into 2 PRs, let me know. Closes #8819 Note that I'm targeting 2.x here, let me explain why: - I don't want too much divergence between both branches, especially when they touch that many files - there is no BC break AFAIK: strict mode is about function we call, not about our public API (and yes, the AFAIK is important, but if there is one, we can fix it with a cast IMO) - 3.x should be about removing deprecated stuff IMO: I think risky stuff that can be fixed quickly should be diluted in minors rather than piled up in 3.x, because having risky stuff always go to 3.x will make the migration to 3.0.0 very hard for everyone. In my vision, 3.0.0 should be very boring for somebody having addressed all deprecations, and not a big deal to upgrade to.
admin added the pull-request label 2026-01-22 16:10:01 +01:00
admin closed this issue 2026-01-22 16:10:01 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#11203