1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-27 01:14:39 +01:00

Backwards compatibility

This commit is contained in:
Daniil Gentili 2019-12-26 00:08:20 +01:00
parent f8b1bd270d
commit 89fed994ad

View File

@ -66,6 +66,8 @@ cd ..
sed 's/public static function echo/public static function echo_/g' -i phar5/vendor/danog/madelineproto/src/danog/MadelineProto/Tools.php
find phar5/vendor/amphp -type f -name '*.php' -exec sed "s/extension_loaded[(]'zlib'[)]/false/g;s/new[(]/new_(/g;s/clone[(]/clone_(/g" -i {} +
find phar5/vendor/league/uri -type f -name '*.php' -exec sed 's/withScheme[(]\$scheme[)]: UriInterface/withScheme(?string $scheme): UriInterface/g' -i {} +
find phar5/vendor/danog/madelineproto -type f -name '*.php' -exec sed 's/: EncryptableSocket/: \\Amp\\Socket\\Socket/g' -i {} +
@ -80,6 +82,8 @@ cd ..
[ -f $HOME/.config/composer/vendor/bin/php7to70 ] && php7to70=$HOME/.config/composer/vendor/bin/php7to70
$php7to70 convert --copy-all phar7 phar5 >/dev/null
find phar5/vendor/league/uri -type f -name '*.php' -exec sed 's/withScheme[(]\$scheme[)]: UriInterface/withScheme(?string $scheme): UriInterface/g' -i {} +
find phar5/vendor/danog/madelineproto -type f -name '*.php' -exec sed 's/: EncryptableSocket/: \\Amp\\Socket\\Socket/g' -i {} +
php=70