mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-30 10:19:00 +01:00
Merge branch 'master' of github.com:danog/MadelineProto
This commit is contained in:
commit
bc17422418
@ -53,7 +53,7 @@ class MyTelegramOrgWrapper
|
||||
if ($this->settings === null) {
|
||||
$this->settings = [];
|
||||
}
|
||||
if (!$this->jar) {
|
||||
if (!$this->jar || !($this->jar instanceof InMemoryCookieJar)) {
|
||||
$this->jar = new InMemoryCookieJar;
|
||||
}
|
||||
$this->settings = MTProto::getSettings($this->settings);
|
||||
|
@ -191,6 +191,8 @@ class ADNLConnection
|
||||
''
|
||||
);
|
||||
(yield $this->stream->getWriteBuffer(\strlen($data)))->bufferWrite($data);
|
||||
return ($this->requests[$id] = new Deferred)->promise();
|
||||
$this->requests[$id] = new Deferred;
|
||||
|
||||
return $this->requests[$id]->promise();
|
||||
}
|
||||
}
|
||||
|
@ -55,6 +55,9 @@ cd ..
|
||||
[ -f $HOME/.composer/vendor/bin/php7to5 ] && php7to5=$HOME/.composer/vendor/bin/php7to5
|
||||
[ -f $HOME/.config/composer/vendor/bin/php7to5 ] && php7to5=$HOME/.config/composer/vendor/bin/php7to5
|
||||
|
||||
find phar7/vendor/league/uri -type f -name '*.php' -exec sed 's/withScheme[(]\$scheme[)]: UriInterface/withScheme(?string $scheme): UriInterface/g' -i {} +
|
||||
|
||||
|
||||
php7.3 $php7to5 convert --copy-all phar7 phar5 >/dev/null
|
||||
|
||||
sed 's/^Loop::set.*;//g' -i phar5/vendor/amphp/amp/lib/Loop.php
|
||||
@ -64,7 +67,7 @@ cd ..
|
||||
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/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/danog/madelineproto -type f -name '*.php' -exec sed 's/: EncryptableSocket/: \\Amp\\Socket\\Socket/g' -i {} +
|
||||
|
||||
@ -78,7 +81,10 @@ cd ..
|
||||
[ -f $HOME/.composer/vendor/bin/php7to70 ] && php7to70=$HOME/.composer/vendor/bin/php7to70
|
||||
[ -f $HOME/.config/composer/vendor/bin/php7to70 ] && php7to70=$HOME/.config/composer/vendor/bin/php7to70
|
||||
|
||||
find phar7/vendor/league/uri -type f -name '*.php' -exec sed 's/withScheme[(]\$scheme[)]: UriInterface/withScheme(?string $scheme): UriInterface/g' -i {} +
|
||||
|
||||
$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
|
||||
|
Loading…
Reference in New Issue
Block a user