Closed BackEndTea closed 5 years ago
If the exception interface was a class then yes, but interfaces are allowed to extend \Throwable
. It just means that this interface can only be implemented by classes extending \Exception
, which is the intention anyways.
A non exception class implementing \Throwable
, (or another interace extending it), would cause a fatal error.
Ah, perfect. Thanks for clarifying, and for contributing. I've merged this now. Do you need a release making?
Thanks for the merge; I don't need a direct release, i just noticed it while looking at the code.
Good thinking, @BackEndTea. However, http://php.net/manual/en/class.throwable.php says:
Do you therefore need to change this to extend
\Exception
?