Skip to content

Commit 21f335b

Browse files
committed
Try to solve deprecations
1 parent d441da2 commit 21f335b

File tree

6 files changed

+23
-2
lines changed

6 files changed

+23
-2
lines changed

tests/End2End/App/FooHandler.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
namespace Facile\MongoDbMessenger\Tests\End2End\App;
66

77
use Facile\MongoDbMessenger\Tests\Stubs\FooMessage;
8+
use Symfony\Component\Messenger\Attribute\AsMessageHandler;
89
use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
910

11+
#[AsMessageHandler]
1012
class FooHandler implements MessageHandlerInterface
1113
{
1214
public const ERROR_MESSAGE = 'Failing on purpose';

tests/End2End/App/Kernel.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,12 @@ public function registerContainerConfiguration(LoaderInterface $loader): void
3131
$loader->load(__DIR__ . '/facile_it_mongodb.yaml');
3232
$loader->load(__DIR__ . '/messenger.yaml');
3333

34-
if (BaseKernel::VERSION_ID >= 50400) {
35-
$loader->load(__DIR__ . '/deprecations.yaml');
34+
if (BaseKernel::VERSION_ID >= 60400) {
35+
$loader->load(__DIR__ . '/deprecations_6.4.yaml');
36+
} elseif (BaseKernel::VERSION_ID >= 60100) {
37+
$loader->load(__DIR__ . '/deprecations_6.1.yaml');
38+
} elseif (BaseKernel::VERSION_ID >= 50400) {
39+
$loader->load(__DIR__ . '/deprecations_5.4.yaml');
3640
}
3741
}
3842
}

tests/End2End/App/SuppressDeprecationNormalizer.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,12 @@ protected function isAllowedAttribute($classOrObject, $attribute, $format = null
3636

3737
return parent::isAllowedAttribute($classOrObject, $attribute, $format, $context);
3838
}
39+
40+
/**
41+
* @return array<class-string, bool>
42+
*/
43+
public function getSupportedTypes(?string $format): array
44+
{
45+
return [RedeliveryStamp::class => true];
46+
}
3947
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
framework:
2+
http_method_override: false
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
framework:
2+
handle_all_throwables: true
3+
http_method_override: false
4+
php_errors:
5+
log: true

0 commit comments

Comments
 (0)