1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-30 10:38:59 +01:00

Use php 7 with 7to5

This commit is contained in:
Daniil Gentili 2019-06-18 15:04:13 +02:00
parent e74ff18d9f
commit 13fb3e61a9

View File

@ -57,11 +57,15 @@ cp -a $madelinePath/src vendor/danog/madelineproto/
cd ..
[ $PHP_MAJOR_VERSION -eq 5 ] && {
$php7to5 convert --copy-all phar7 phar5 >/dev/null
phpenv install 7.3.6
~/.phpenv/versions/7.3.6/bin/php $php7to5 convert --copy-all phar7 phar5 >/dev/null
sed 's/^Loop::set.*;//g' -i phar5/vendor/amphp/amp/lib/Loop.php
echo 'Loop::set((new DriverFactory())->create());' >> phar5/vendor/amphp/amp/lib/Loop.php
cp $madelinePath/tests/random.php vendor/paragonie/random_compat/lib/random.php
php -v
php=5
}
[ $PHP_MAJOR_VERSION -eq 7 ] && {