PHP 7.4 fixes
This commit is contained in:
parent
0eadfe2131
commit
172d708e0e
@ -63,7 +63,11 @@ cd ..
|
||||
cp phar5/vendor/danog/madelineproto/src/danog/MadelineProto/Coroutine.php phar5/vendor/amphp/amp/lib/Coroutine.php
|
||||
sed 's/namespace danog\\MadelineProto;/namespace Amp;/g' -i phar5/vendor/amphp/amp/lib/Coroutine.php
|
||||
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" -i {} +
|
||||
|
||||
find phar5/vendor/danog/madelineproto -type f -name '*.php' -exec sed 's/: EncryptableSocket/: \\Amp\\Socket\\Socket/g' -i {}
|
||||
|
||||
php -v
|
||||
|
||||
php=5
|
||||
@ -75,6 +79,7 @@ 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/danog/madelineproto -type f -name '*.php' -exec sed 's/: EncryptableSocket/: \\Amp\\Socket\\Socket/g' -i {}
|
||||
|
||||
php=70
|
||||
} || {
|
||||
@ -146,9 +151,9 @@ echo "$TRAVIS_COMMIT_MESSAGE" | grep "Apply fixes from StyleCI" && exit
|
||||
|
||||
[ -d JSON.sh ] || git clone https://github.com/dominictarr/JSON.sh
|
||||
for chat_id in $destinations;do
|
||||
ID=$(curl -s https://api.telegram.org/bot$BOT_TOKEN/sendMessage -F disable_web_page_preview=1 -F text=" <b>Recent Commits to MadelineProto:$TRAVIS_BRANCH</b>
|
||||
<a href=\"https://github.com/danog/MadelineProto/commit/$TRAVIS_COMMIT\">$TRAVIS_COMMIT_MESSAGE (PHP $PHP_MAJOR_VERSION.$PHP_MINOR_VERSION)</a>
|
||||
ID=$(curl -s https://api.telegram.org/bot$BOT_TOKEN/sendMessage -F disable_web_page_preview=1 -F text=" <b>Recent Commits to MadelineProto:$TRAVIS_BRANCH</b>
|
||||
<a href=\"https://github.com/danog/MadelineProto/commit/$TRAVIS_COMMIT\">$TRAVIS_COMMIT_MESSAGE (PHP $PHP_MAJOR_VERSION.$PHP_MINOR_VERSION)</a>
|
||||
|
||||
$TRAVIS_COMMIT_MESSAGE" -F parse_mode="HTML" -F chat_id=$chat_id | JSON.sh/JSON.sh -s | egrep '\["result","message_id"\]' | cut -f 2 | cut -d '"' -f 2)
|
||||
$TRAVIS_COMMIT_MESSAGE" -F parse_mode="HTML" -F chat_id=$chat_id | JSON.sh/JSON.sh -s | egrep '\["result","message_id"\]' | cut -f 2 | cut -d '"' -f 2)
|
||||
|
||||
done
|
||||
|
@ -61,15 +61,11 @@ function ___install_madeline()
|
||||
$release_branch = '';
|
||||
}
|
||||
$release_fallback_branch = '';
|
||||
/*if (isset($_SERVER['SERVER_ADMIN']) && strpos($_SERVER['SERVER_ADMIN'], '000webhost.io') && $custom_branch === null) {
|
||||
$release_branch = '-deprecated';
|
||||
$release_fallback_branch = '-deprecated';
|
||||
}*/
|
||||
|
||||
if (PHP_MAJOR_VERSION <= 5) {
|
||||
$release_branch = '5'.$release_branch;
|
||||
$release_fallback_branch = '5'.$release_fallback_branch;
|
||||
} elseif (PHP_MAJOR_VERSION === 7 && PHP_MINOR_VERSION === 0) {
|
||||
} elseif (PHP_MAJOR_VERSION === 7 && PHP_MINOR_VERSION < 4) {
|
||||
$release_branch = '70'.$release_branch;
|
||||
$release_fallback_branch = '70'.$release_fallback_branch;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user