diff --git a/docs b/docs index 34769aac6..3a0604116 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 34769aac6fa12a654ba8a1b88deaf08652c17928 +Subproject commit 3a06041168b8d69b31e5de5c555d3c89a9042f6b diff --git a/src/Broadcast/InternalState.php b/src/Broadcast/InternalState.php index 745ad4087..bf503da04 100644 --- a/src/Broadcast/InternalState.php +++ b/src/Broadcast/InternalState.php @@ -186,7 +186,7 @@ final class InternalState } } }); - if (count($promises) % 50 === 0) { + if (\count($promises) % 50 === 0) { await($promises); $promises = []; } diff --git a/src/Db/DriverArray.php b/src/Db/DriverArray.php index cde10181d..1928472b9 100644 --- a/src/Db/DriverArray.php +++ b/src/Db/DriverArray.php @@ -90,16 +90,21 @@ abstract class DriverArray implements DbArray, IteratorAggregate )); } + private bool $old = true; public function __wakeup(): void { Magic::start(light: true); $this->setSettings($this->dbSettings); + if ($this->old) { + $this->setSerializer(SerializerType::SERIALIZE); + } } public static function getInstance(string $table, DbType|array|null $previous, DatabaseAbstract $settings): static { /** @var MysqlArray|PostgresArray|RedisArray */ $instance = new static(); + $instance->old = false; $instance->setTable($table); $instance->setSettings($settings); diff --git a/src/InternalDoc.php b/src/InternalDoc.php index 8a284597c..71b15d0d3 100644 --- a/src/InternalDoc.php +++ b/src/InternalDoc.php @@ -1539,6 +1539,8 @@ abstract class InternalDoc /** * Subscribe to event handler updates for a channel/supergroup we're not a member of. * + * @param mixed $channel Channel/supergroup to subscribe to + * * @return bool False if we were already subscribed */ public function subscribeToUpdates(mixed $channel): bool diff --git a/src/Logger.php b/src/Logger.php index bb0477ce2..f112f2578 100644 --- a/src/Logger.php +++ b/src/Logger.php @@ -314,7 +314,7 @@ final class Logger if (!self::$printed) { self::$printed = true; $this->colors[self::NOTICE] = \implode(';', [self::FOREGROUND['light_gray'], self::SET['bold'], self::BACKGROUND['blue']]); - $this->logger('MadelineProto'); + $this->logger('MadelineProto '.MTProto::RELEASE); $this->logger('Copyright (C) 2016-'.\date('Y').' Daniil Gentili'); $this->logger('Licensed under AGPLv3'); $this->logger('https://github.com/danog/MadelineProto'); diff --git a/src/MTProto.php b/src/MTProto.php index 1c0d9e588..f1d4dd3d9 100644 --- a/src/MTProto.php +++ b/src/MTProto.php @@ -139,7 +139,7 @@ final class MTProto implements TLCallback, LoggerGetter * * @var string */ - const RELEASE = '8.0'; + const RELEASE = '8.0.0-beta84'; /** * We're not logged in. * diff --git a/src/MTProtoTools/UpdateHandler.php b/src/MTProtoTools/UpdateHandler.php index bf9af8a98..7a8abe744 100644 --- a/src/MTProtoTools/UpdateHandler.php +++ b/src/MTProtoTools/UpdateHandler.php @@ -457,6 +457,8 @@ trait UpdateHandler /** * Subscribe to event handler updates for a channel/supergroup we're not a member of. * + * @param mixed $channel Channel/supergroup to subscribe to + * * @return bool False if we were already subscribed */ public function subscribeToUpdates(mixed $channel): bool