From 3f03a7b21a53888cb11df64b0a64b53b56121404 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Wed, 19 Jun 2019 11:18:51 +0200 Subject: [PATCH] Conversion bugfixes --- src/danog/MadelineProto/MTProto.php | 1 + tests/makephar.sh | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/danog/MadelineProto/MTProto.php b/src/danog/MadelineProto/MTProto.php index 492ef277..a4204154 100644 --- a/src/danog/MadelineProto/MTProto.php +++ b/src/danog/MadelineProto/MTProto.php @@ -900,6 +900,7 @@ class MTProto extends AsyncConstruct implements TLCallback // Connects to all datacenters and if necessary creates authorization keys, binds them and writes client info public function connect_to_all_dcs_async(): \Generator { + $this->channels_state->get(false); foreach ($this->channels_state->get() as $state) { $channelId = $state->getChannel(); if (!isset($this->feeders[$channelId])) { diff --git a/tests/makephar.sh b/tests/makephar.sh index 6268f822..ed6816bf 100755 --- a/tests/makephar.sh +++ b/tests/makephar.sh @@ -5,7 +5,7 @@ PHP_MAJOR_VERSION=$(php -r 'echo PHP_MAJOR_VERSION;') PHP_MINOR_VERSION=$(php -r 'echo PHP_MINOR_VERSION;') # Download converters -composer global require spatie/7to5 dev-master#80de80c7ebb0dd0805a79e939b0426883ffd9403 +composer global require spatie/7to5 dev-master#e03b18903c45b01546c2984cc3c54e4750c71e3a [ -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 @@ -88,6 +88,9 @@ cd .. find phar5 -type f -exec sed 's/\w* \.\.\./.../' -i {} + +# Make sure conversion worked +for f in $(find . -type f -name '*.php'); do php -l $f | grep -v 'No syntax errors';done + #[ "$TRAVIS_BRANCH" != "master" ] && branch="-$TRAVIS_BRANCH" || branch="" branch="-$TRAVIS_BRANCH" cd $madelinePath