diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 0355c33..fbb7289 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -8,7 +8,7 @@ jobs: fail-fast: false matrix: operating-system: [ubuntu-latest] - php-versions: ['7.4', '8.0', '8.1', '8.2', '8.3'] + php-versions: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5'] steps: - name: Checkout diff --git a/composer.json b/composer.json index 5f1b5e7..c51d6c6 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ }, "require-dev": { "phpunit/phpunit": "^9", - "vimeo/psalm": "^4.6", + "vimeo/psalm": "^4.6 || ^5.0 || ^6.0", "friendsofphp/php-cs-fixer": "^3.0" }, "autoload": { diff --git a/src/Connection/InetSocket.php b/src/Connection/InetSocket.php index 93da2f7..0be021b 100644 --- a/src/Connection/InetSocket.php +++ b/src/Connection/InetSocket.php @@ -144,7 +144,7 @@ private function cutIntoMtuSizedPackets(array $messages): array if ($this->allowFragmentation()) { $message = join(self::LINE_DELIMITER, $messages) . self::LINE_DELIMITER; - $result = str_split($message, $this->maxPayloadSize); + $result = str_split($message, max(1, $this->maxPayloadSize)); return $result ?: []; }