From e74ff18d9f6fc02de4d3007eabc2551ec8f9b4ff Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Tue, 18 Jun 2019 14:39:31 +0200 Subject: [PATCH] Require external php 7 polyfill --- src/polyfill.php | 3 --- tests/makephar.sh | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/polyfill.php b/src/polyfill.php index 1edebf86c..405e2bcb3 100644 --- a/src/polyfill.php +++ b/src/polyfill.php @@ -7,9 +7,6 @@ function callMe($allable, ...$args) function returnMe($res) { return $res; } -if (!class_exists('\Throwable')) { - class Throwable extends \Exception {} -} if (!function_exists('is_iterable')) { function is_iterable($var) { return is_array($var) || $var instanceof Traversable; diff --git a/tests/makephar.sh b/tests/makephar.sh index 2807cdbc0..08b3e23e7 100755 --- a/tests/makephar.sh +++ b/tests/makephar.sh @@ -49,6 +49,8 @@ echo '{ } ] }' > composer.json +composer config platform.php "7.4" +[ $PHP_MAJOR_VERSION -eq 5 ] && composer require dstuecken/php7ify composer clearcache composer update cp -a $madelinePath/src vendor/danog/madelineproto/