cakephp: [RFC] PHP 7 use assert() where we expect user errors to happen
An idea for the future, when we decide using PHP 7 features.
The more we maintain the code, the more defensive error we add, this improves the user experience as developers get informed of their errors before finding them in production. We should add more, but one of the reason I have not added a lot of them is that some are expensive to calculate.
The idea then is to migrate all developer error handling to use assert() instead of normal code + custom exceptions. This will help us add more and without negatively affecting performance in production.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 3
- Comments: 18 (17 by maintainers)
I think we can hold off for 4.0. I think we should see how folks react to the additional typehints and strict_types behavior that have been added in 4.0 before layering more on.
Luckily that’s something we won’t need to worry about for a couple of years :trollface: