zendframework / zend-coding-standard

Zend Framework Coding Standard
BSD 3-Clause "New" or "Revised" License
35 stars 8 forks source link

[v2] Must not replace Exception with Throwable #17

Open Xerkus opened 5 years ago

Xerkus commented 5 years ago

\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();
weierophinney commented 4 years ago

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.