-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: change default serializer configuration (#48)
- fix the default PhpSerializer invokable config - fix tests for invokables as they have no factory - move the default Symfony Serializer config from the ConfigProvider The default Symfony Serializer config in the ConfigProvider caused issue when testing the container for valid values and the component is not part of the project.
- Loading branch information
1 parent
b73e0f6
commit 315b862
Showing
8 changed files
with
73 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App; | ||
|
||
use Symfony\Component\Messenger\Transport\Serialization\Serializer; | ||
use Xtreamwayz\PsrContainerMessenger\Serializer\SymfonySerializerFactory; | ||
|
||
return [ | ||
// phpcs:disable | ||
'dependencies' => [ | ||
'aliases' => [ | ||
'messenger.serializer' => Serializer::class, | ||
], | ||
'factories' => [ | ||
Serializer::class => SymfonySerializerFactory::class, | ||
] | ||
], | ||
|
||
'messenger' => [ | ||
'serializer' => [ | ||
'default_serializer' => null, | ||
'symfony_serializer' => [ | ||
'format' => 'json', | ||
'context' => [], | ||
], | ||
], | ||
'default_bus' => 'messenger.command.bus', | ||
'buses' => [ | ||
'messenger.command.bus' => [ | ||
'allows_no_handler' => false, | ||
'handlers' => [], | ||
'middleware' => [ | ||
'messenger.command.middleware.add_bus_stamp', | ||
'messenger.command.middleware.handler', | ||
], | ||
'routes' => [], | ||
], | ||
'messenger.event.bus' => [ | ||
'allows_no_handler' => true, | ||
'handlers' => [], | ||
'middleware' => [ | ||
'messenger.event.middleware.handler', | ||
], | ||
'routes' => [], | ||
], | ||
'messenger.query.bus' => [ | ||
'allows_no_handler' => false, | ||
'handlers' => [], | ||
'middleware' => [ | ||
'messenger.query.middleware.handler', | ||
], | ||
'routes' => [], | ||
], | ||
], | ||
], | ||
// phpcs:enable | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters