-
Notifications
You must be signed in to change notification settings - Fork 130
Fixes #216 remove \Exception type hint #217
Conversation
@samsonasik can you verify it with a test? Doing something like following should suffice: try {
(new \stdClass)->iDoNotExist();
} catch (\Throwable $exception) {
$serializable = new SerializableException($exception);
// assert here
}
// fail if no $exception thrown |
@Ocramius |
It will be a throwable instance |
@Ocramius I got this error: ...PHP Fatal error: Uncaught TypeError: Argument 1 passed to ZendDeveloperTools\Exception\SerializableException::__construct() must be an instance of Exception, instance of Error given, |
@Ocramius done ;), tests added, should be ok now ;) |
} | ||
} | ||
|
||
public function testStdClassCallNotExistMethod() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test requires PHP 7 - you can use the PHPUnit annotation for that
@Ocramius tests updated. Travis now green \m/ |
Anyone can merge it? It fail on my php7 dev machine ;( |
I would also like this to be merged. |
+1 please merge |
@samsonasik Is there any reason you removed the type hinting? Exception and Error are instances of Throwable. In my mind it should have been enough to replace \Exception with \Throwable. |
\Throwable only works with php7, we use it in php ^5.6 |
@vladas \Throwable is only availible from PHP7. It would break any compatibility with 5.X |
Ok, fair enough. |
Any news on this PR? |
Fixes #216 remove \Exception type hint
Thanks, @samsonasik |
No description provided.