Review assert() usage #8749
Replies: 3 comments 2 replies
-
Agreed, we're swapping out assertions for exceptions as a general practice. But is this issue filed for a general case, or for the specific assertion in the quoted log snippet? |
Beta Was this translation helpful? Give feedback.
-
As the |
Beta Was this translation helpful? Give feedback.
-
I'll close this as wontfix. If you want to make a general recommendation, try the discussions. If you have a specific part of the code that is causing a bug or needs to be chnaged, you can file an issue with that. |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
Given that an
assert()
may stop the script execution or not depending on thephp.ini
setup (e.g.assert.exception
), it shouldn't be used for control-flow nor as a way to generate useful warnings.Beta Was this translation helpful? Give feedback.
All reactions