zend-coding-standard icon indicating copy to clipboard operation
zend-coding-standard copied to clipboard

[v2] Must not replace Exception with Throwable

Open Xerkus opened this issue 6 years ago • 1 comments

\Exception and \Throwable are not equal and must not be swapped. \Throwable includes php errors, some of which are not really recoverable.

On top of that it actually breaks code in some instances:

         $exception = $this->prophesize(NotFoundExceptionInterface::class)
-            ->willExtend(Exception::class)
+            ->willExtend(Throwable::class)
             ->reveal();

Xerkus avatar Feb 07 '19 20:02 Xerkus

This repository has been closed and moved to laminas/laminas-coding-standard; a new issue has been opened at https://github.com/laminas/laminas-coding-standard/issues/5.

weierophinney avatar Dec 31 '19 21:12 weierophinney