Closed sagikazarmark closed 9 years ago
our rule with symfony and symfony cmf is: make it restricted (private methods and properties) until somebody has a valid use case to lessen the restriction. in that spirit, final sounds good. there is no BC break in removing final if there is a good use case and the people needing to extend can then depend on the lowest version where the exceptions are not final anymore.
Sounds reasonable.
Should we make out SPL exceptions final?
The case came up: I created an UnexpectedValueException which extends the original SPL exception, which extends RuntimeException. However it does not extend our RuntimeException, which is a bit of inconsistency.
This is why I think making our SPL extensions final. They should be used as is. Other exceptions can extend the SPL exceptions and implement our interface.