Made all constant literal string equality checks use strict equality.#385
Made all constant literal string equality checks use strict equality.#385boenrobot wants to merge 1 commit intoShardj:masterfrom
Conversation
a0a6f96 to
2e9e5a8
Compare
|
Why exactly we need this, pls? I can see a lot o potential issues with this change. |
The hope was that it would be a trivial change to have less noise in IDEs and static analysis tools when further improving type safety (which in turn is important in ensuring cross version combability as PHP is moving into the direction of requiring more explicit things that were previously implicit). But then again, the unit test suite already confirms your suspicions, so back to the drawing board for me 🤣 |
|
I can see a lot of potential troubles with === '1' Potentially forcing me to disconnect from upstream, as strict typing is not the way I like to go with PHP. |
624aa82 to
5230746
Compare
…ks use strict equality. Implemented by search & replace. All other equality checks are left untouched, as changing them may result in different behavior, whereas these ones should behave the same, while reducing the surface area for type related bugs.
5230746 to
f5a847e
Compare
Implemented by literally searching for
' ==" ==== '== "and replacing the "==" with "===".
All other equality checks are left untouched, as changing them may result in different behavior, whereas these ones should behave the same, while reducing the surface area for type related bugs.