This Symfony bundle provides an opinionated collection of classes and functionalities used throughout Fusonic's Symfony projects, designed to simplify and standardize common development patterns.
Key features include:
- Doctrine Entity Identifier Management: Integration of
symfony/uid
alongsidefusonic/ddd-extensions
to allow Doctrine entities to use UUIDs in the form of typed classes as primary identifiers. - Message Bus Configurations: Simplified handling of
symfony/messenger
message buses using typed classes, allowing for easier message dispatching and clean separation of commands, queries, and events.
Use Composer to install the bundle.
composer require fusonic/framework-bundle
Requirements:
- PHP 8.2+
- Symfony 6.4+
In case Symfony did not add the bundle to the bundle configuration, add the following (by default, located in
config/bundles.php
):
<?php
return [
// ...
Fusonic\FrameworkBundle\FusonicFrameworkBundle::class => ['all' => true],
];
The bundle assumes that the symfony/messenger
bus services IDs for the
command, event, and query buses are as follows:
command.bus
event.bus
query.bus
If this is not the case, you can freely configure the service IDs by creating a new
config/packages/fusonic_framework.php
file (or an equivalent YAML file) as follows:
<?php
use Symfony\Config\FusonicFrameworkConfig;
return static function (FusonicFrameworkConfig $frameworkConfig): void {
$frameworkConfig
->messenger()
->bus()
->commandBus('command.bus.with.other.name');
->eventBus('event.bus.with.other.name')
->queryBus('query.bus.with.other.name');
};
This is a subtree split of the fusonic/php-extensions repository. Please create your pull requests there.