Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed \Exception for \Throwable to make it work on PHP7.1 #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ClemTar
Copy link

@ClemTar ClemTar commented Jun 8, 2017

Hi there,

I noticed, pushing my new project on SS 3.6 on a server with php7.1, it was returning me errors like that:

image

Changed the \Exception values for \Throwable values in different files to make it work again.
What do you reckon?

Cheers,
Clem.

@@ -13,5 +13,5 @@
* @param \Exception $exception
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot to change this one

@lars-lemon8
Copy link

This seems like a good suggestion?

@camspiers
Copy link
Owner

@ClemTar @bendubuisson would this break compatibility with php lower than 7?

@kinglozzer
Copy link
Contributor

kinglozzer commented Nov 24, 2017

would this break compatibility with php lower than 7?

Yep, looks like the simplest solution might be to just follow what Whoops did and remove the type hint entirely?

Failing that, we can typehint \Error in PHP 5 with something like https://github.com/paragonie/random_compat/blob/master/lib/error_polyfill.php

@kinglozzer
Copy link
Contributor

I’ve opened a new PR here which just removes the typehint: #14. Far easier than messing around with polyfills and stuff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants