fusonic / framework-bundle
Opinionated collection of classes and functionalities used throughout Fusonic's Symfony projects
Package info
github.com/fusonic/php-framework-bundle
Type:symfony-bundle
pkg:composer/fusonic/framework-bundle
Requires
- php: ^8.2
- doctrine/dbal: ^3.9 || ^4.2
- doctrine/doctrine-fixtures-bundle: ^3.7 || ^4.1
- fakerphp/faker: ^1.24
- fusonic/ddd-extensions: ^3.0
- symfony/dependency-injection: ^6.4 || ^7.3 || ^8.0
- symfony/framework-bundle: ^6.4 || ^7.3 || ^8.0
- symfony/http-kernel: ^6.4 || ^7.3 || ^8.0
- symfony/messenger: ^6.4 || ^7.3 || ^8.0
- symfony/security-bundle: ^6.4 || ^7.3 || ^8.0
- symfony/serializer: ^6.4 || ^7.3 || ^8.0
- symfony/uid: ^6.4 || ^7.3 || ^8.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.91
- infection/infection: ^0.31
- nelmio/api-doc-bundle: ^5.8
- phpstan/phpstan: ^2.1
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- phpstan/phpstan-strict-rules: ^2.0
- phpstan/phpstan-symfony: ^2.0
- phpunit/phpunit: ^12.4
- rector/rector: ^2.2
- tomasvotruba/type-coverage: ^2.0
Suggests
- fusonic/api-documentation-bundle: If the application needs to provide API documentation
- nelmio/api-doc-bundle: If the application needs to provide API documentation
README
About
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/uidalongsidefusonic/ddd-extensionsto allow Doctrine entities to use UUIDs in the form of typed classes as primary identifiers. - Message Bus Configurations: Simplified handling of
symfony/messengermessage buses using typed classes, allowing for easier message dispatching and clean separation of commands, queries, and events.
Install
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], ];
Configuration
The bundle assumes that the symfony/messenger bus services IDs for the
command, event, and query buses are as follows:
command.busevent.busquery.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'); };
Contributing
This is a subtree split of the fusonic/php-extensions repository. Please create your pull requests there.