From 57fba78ae1d405c19bb6ae37145f47966282c9e4 Mon Sep 17 00:00:00 2001 From: Emiel Bom <11626777+adm-bome@users.noreply.github.com> Date: Wed, 24 Jan 2024 14:32:45 +0100 Subject: [PATCH 1/7] Ignore errors from nullable_type_declarations Quick fix for the pint tests --- pint.json | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 pint.json diff --git a/pint.json b/pint.json new file mode 100644 index 00000000..751c2203 --- /dev/null +++ b/pint.json @@ -0,0 +1,8 @@ +{ + "preset": "laravel", + "rules": { + "nullable_type_declaration_for_default_null_value": { + "use_nullable_type_declaration": false + } + } +} From 2695f785096f08a8535e16697b6c83c4c65fb4ed Mon Sep 17 00:00:00 2001 From: Emiel Bom <11626777+adm-bome@users.noreply.github.com> Date: Wed, 24 Jan 2024 16:42:06 +0100 Subject: [PATCH 2/7] can't use network_protocol for ssl connections --- src/Queue/Connection/ConnectionFactory.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Queue/Connection/ConnectionFactory.php b/src/Queue/Connection/ConnectionFactory.php index f5ccad0e..f531e761 100644 --- a/src/Queue/Connection/ConnectionFactory.php +++ b/src/Queue/Connection/ConnectionFactory.php @@ -126,7 +126,6 @@ protected static function createStreamConnection($connection, AMQPConnectionConf 'keepalive' => $config->isKeepalive(), 'heartbeat' => $config->getHeartbeat(), ], - $config->getNetworkProtocol(), $config ); } From 1475380174bf8c9183d5490fe737f285a4ddb0ae Mon Sep 17 00:00:00 2001 From: Emiel Bom <11626777+adm-bome@users.noreply.github.com> Date: Wed, 24 Jan 2024 16:51:10 +0100 Subject: [PATCH 3/7] skip test --- tests/Feature/TestCase.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/Feature/TestCase.php b/tests/Feature/TestCase.php index 299e7024..fc69568a 100644 --- a/tests/Feature/TestCase.php +++ b/tests/Feature/TestCase.php @@ -96,6 +96,8 @@ public function testPush(): void public function testPushAfterCommit(): void { + $this->markTestSkipped(); + $transaction = new DatabaseTransactionsManager; $this->app->singleton('db.transactions', function ($app) use ($transaction) { From 806a59d2f5ffd04c3c2a421f9c5fa6d929fc4764 Mon Sep 17 00:00:00 2001 From: Emiel Bom <11626777+adm-bome@users.noreply.github.com> Date: Wed, 24 Jan 2024 16:55:24 +0100 Subject: [PATCH 4/7] Update ConnectorTest.php --- tests/Feature/ConnectorTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/Feature/ConnectorTest.php b/tests/Feature/ConnectorTest.php index 91660ad2..8b8ecd82 100644 --- a/tests/Feature/ConnectorTest.php +++ b/tests/Feature/ConnectorTest.php @@ -144,6 +144,8 @@ public function testSslConnection(): void // Test to validate ssl connection params public function testNoVerificationSslConnection(): void { + $this->markTestSkipped(); + $this->app['config']->set('queue.connections.rabbitmq', [ 'driver' => 'rabbitmq', 'queue' => env('RABBITMQ_QUEUE', 'default'), From 089e72d162b7cb554d80a6ecbb85f0d9b00a8baa Mon Sep 17 00:00:00 2001 From: Emiel Bom <11626777+adm-bome@users.noreply.github.com> Date: Thu, 25 Jan 2024 12:37:47 +0100 Subject: [PATCH 5/7] changed signature method commit between laravel versions 9 and 10, the signature of the method `commit` within the `DatabaseTransactionsManager:class` was changed. --- tests/Feature/TestCase.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/Feature/TestCase.php b/tests/Feature/TestCase.php index fc69568a..c49d8608 100644 --- a/tests/Feature/TestCase.php +++ b/tests/Feature/TestCase.php @@ -96,8 +96,6 @@ public function testPush(): void public function testPushAfterCommit(): void { - $this->markTestSkipped(); - $transaction = new DatabaseTransactionsManager; $this->app->singleton('db.transactions', function ($app) use ($transaction) { @@ -112,7 +110,7 @@ public function testPushAfterCommit(): void $this->assertSame(0, Queue::size()); $this->assertNull(Queue::pop()); - $transaction->commit('FakeDBConnection'); + $transaction->commit('FakeDBConnection', 1, 0); sleep(1); From e04ff6b41e626ef2d0457f7b7154cfe856764d02 Mon Sep 17 00:00:00 2001 From: Emiel Bom <11626777+adm-bome@users.noreply.github.com> Date: Thu, 25 Jan 2024 12:49:33 +0100 Subject: [PATCH 6/7] changed the php-amqplib version to ^3.6 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index e7167c1a..cd2e6898 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ "php": "^8.0", "ext-json": "*", "illuminate/queue": "^9.0|^10.0", - "php-amqplib/php-amqplib": "^v3.5.2" + "php-amqplib/php-amqplib": "^v3.6" }, "require-dev": { "phpunit/phpunit": "^9.3", From a7de79e86fd8e2b802ccd8be99979e7165b1f5a8 Mon Sep 17 00:00:00 2001 From: Emiel Bom <11626777+adm-bome@users.noreply.github.com> Date: Thu, 25 Jan 2024 12:52:43 +0100 Subject: [PATCH 7/7] Update ConnectorTest.php --- tests/Feature/ConnectorTest.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/Feature/ConnectorTest.php b/tests/Feature/ConnectorTest.php index 8b8ecd82..91660ad2 100644 --- a/tests/Feature/ConnectorTest.php +++ b/tests/Feature/ConnectorTest.php @@ -144,8 +144,6 @@ public function testSslConnection(): void // Test to validate ssl connection params public function testNoVerificationSslConnection(): void { - $this->markTestSkipped(); - $this->app['config']->set('queue.connections.rabbitmq', [ 'driver' => 'rabbitmq', 'queue' => env('RABBITMQ_QUEUE', 'default'),