Skip to content

Commit

Permalink
Merge pull request #81 from Jakub-Fajkus/bump-amqplib-for-php81
Browse files Browse the repository at this point in the history
Bump php-amqplib/php-amqplib to ~3.1.0 for PHP8.1
  • Loading branch information
Spamercz authored Feb 8, 2022
2 parents 31f985e + 7314abe commit 4be6630
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/php-package-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
"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",
"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",
Expand Down
6 changes: 3 additions & 3 deletions src/Kdyby/RabbitMq/Consumer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 4be6630

Please sign in to comment.