From 93f3b149a9a9261f004ea04ce71a1302e6e238d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20P=C3=A1la?= Date: Mon, 25 Oct 2021 12:29:44 +0200 Subject: [PATCH 1/4] Fixed arguments in PHP (errcontext is removed) --- src/Kdyby/RabbitMq/Consumer.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Kdyby/RabbitMq/Consumer.php b/src/Kdyby/RabbitMq/Consumer.php index 59578792..9042662a 100644 --- a/src/Kdyby/RabbitMq/Consumer.php +++ b/src/Kdyby/RabbitMq/Consumer.php @@ -82,13 +82,13 @@ public function consume(int $msgAmount): void $this->setupConsumer(); $this->onStart($this); - $previousErrorHandler = \set_error_handler(static function ($severity, $message, $file, $line, $context) use (&$previousErrorHandler) { - if (!\preg_match('~stream_select\\(\\)~i', $message)) { + $previousErrorHandler = \set_error_handler(static function (int $errno, string $errstr, string $errfile, int $errline) use (&$previousErrorHandler) { + if (!\preg_match('~stream_select\\(\\)~i', $errstr)) { $args = \func_get_args(); return \call_user_func_array($previousErrorHandler, $args); } - throw new \PhpAmqpLib\Exception\AMQPRuntimeException($message . ' in ' . $file . ':' . $line, (int) $severity); + throw new \PhpAmqpLib\Exception\AMQPRuntimeException($errstr . ' in ' . $errfile . ':' . $errline, $errno); }); try { From d716f06a98266214c91f5b6c165f940d82cb2737 Mon Sep 17 00:00:00 2001 From: Jakub Fajkus Date: Mon, 24 Jan 2022 11:35:54 +0100 Subject: [PATCH 2/4] Bump php-amqplib/php-amqplib to ~3.1.0 for PHP8.1 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 666d59f5..d2b12b15 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "php": "^7.4 | ^8.0", "nette/di": "^3.0", "nette/utils": "^3.0", - "php-amqplib/php-amqplib": "~3.0.0" + "php-amqplib/php-amqplib": "~3.1.0" }, "require-dev": { "kdyby/console": "~2.8", From 4b74e17f7a56cafd5517824c07e252e045d02d84 Mon Sep 17 00:00:00 2001 From: Jakub-Fajkus Date: Tue, 8 Feb 2022 11:59:35 +0100 Subject: [PATCH 3/4] Run checks for PHP 8.1 --- .github/workflows/php-package-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/php-package-ci.yml b/.github/workflows/php-package-ci.yml index 4d09b1a5..853a3634 100644 --- a/.github/workflows/php-package-ci.yml +++ b/.github/workflows/php-package-ci.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php: [ 7.4, 8.0 ] + php: [ 7.4, 8.0, 8.1 ] steps: - uses: actions/checkout@v2 - uses: shivammathur/setup-php@v2 From 7314abefe396ffc145b1108892c7448ea0add3f2 Mon Sep 17 00:00:00 2001 From: Jakub-Fajkus Date: Tue, 8 Feb 2022 12:01:12 +0100 Subject: [PATCH 4/4] Bump phpstan to ^1.4 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index d2b12b15..7e7f9a9b 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,7 @@ "nette/bootstrap": "~3.0", "latte/latte": "~2.4", "tracy/tracy": "~2.4", - "phpstan/phpstan": "^0.12.88", + "phpstan/phpstan": "^1.4", "php-coveralls/php-coveralls": "^2.1", "nette/tester": "^2.3.2", "mockery/mockery": "~1.3.0",