Uh oh!
There was an error while loading. Please reload this page.
Enforce Throwable rejection reason and require PHP 7+ as a consequence - #138
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
clue
left a comment
There was a problem hiding this comment.
Changes LGTM 👍 I'll await @jsor's review first, but I don't see any major blockers.
I wonder if it makes sense to add test cases for incorrect usage, i.e. how an automatic TypeError for invalid arguments will bubble through common promise handlers etc.?
WyriHaximus
commented
Apr 22, 2019
Makes sense, I'll add those 👍 |
@jsor now that everything must be a |
jsor
commented
Apr 23, 2019
Not sure what you mean? |
WyriHaximus
commented
Apr 23, 2019
If you look at this failed test cause for example, this exception shouldn't have been thrown not triggered as an error: https://travis-ci.org/reactphp/promise/jobs/523187495#L499 |
jsor
commented
Apr 23, 2019
@WyriHaximus In #97, we intentionally switched from throwing exceptions to aborting with a fatal error. Exceptions should (and after that patch actually do) never bubble out of the promise chain. You need to use the |
WyriHaximus
commented
Apr 23, 2019
@jsor ah awesome thanks 👍 |
WyriHaximus
commented
Apr 23, 2019
WyriHaximus
commented
Apr 26, 2019
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Bump minimum required and tested PHP version to 7.0 as a result of requiring Throwables. Renamed the nesecary exceptions, methods and properties to match the new Throwable naming.
WyriHaximus
commented
May 9, 2019
WyriHaximus
commented
May 9, 2019
🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 |
…consequence With reactphp#138 requiring PHP 7.0 as a minimum we can now add return type hints to all our public and private functions. To give all functions return type hints we need the `void` return type, which isn't available until PHP 7.1. So in order use that we also have to bump the the minimum required PHP version for this package to PHP 7.1.
…consequence With reactphp#138 requiring PHP 7.0 as a minimum we can now add return type hints to all our public and private functions. To give all functions return type hints we need the `void` return type, which isn't available until PHP 7.1. So in order use that we also have to bump the the minimum required PHP version for this package to PHP 7.1. The benefit of return type hints is the ensurance at language level of our return values. For ourselfs and our consumers.
…consequence With reactphp#138 requiring PHP 7.0 as a minimum we can now add return type hints to all our public and private functions. To give all functions return type hints we need the `void` return type, which isn't available until PHP 7.1. So in order use that we also have to bump the the minimum required PHP version for this package to PHP 7.1. The benefit of return type hints is the assurance at language level of our return values. For ourself and our consumers.
By enforcing
Throwableas a rejection reason:ThrowableandExceptionExceptionsupport (still supported throughThrowable)