telephantast / telephantast-bundle
Telephantast Symfony Bundle
Installs: 111
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: ^8.1
- symfony/config: ^6 || ^7
- symfony/console: ^6 || ^7
- symfony/dependency-injection: ^6 || ^7
- symfony/http-kernel: ^6 || ^7
- telephantast/message: ^0.1@dev
- telephantast/message-bus: ^0.1@dev
This package is auto-updated.
Last update: 2024-11-18 00:37:12 UTC
README
Installation
composer require telephantast/telephantast-bundle '^0.1@dev'
If you use Symfony Flex, the bundle will be automatically registered in bundles.php
. Otherwise, do it manually:
return [
// ...
+ Telephantast\TelephantastBundle\TelephantastBundle::class => ['all' => true],
];
Configuration
See the full config by running:
bin/console debug:config telephantast
Configuration for bunny-transport and doctrine-persistence:
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; use Telephantast\DoctrinePersistence\DoctrineOrmEntityFinderAndSaver; use Telephantast\DoctrinePersistence\DoctrineOrmTransactionProvider; use Telephantast\DoctrinePersistence\DoctrinePostgresOutboxStorage; return static function (ContainerConfigurator $di): void { $di->extension('telephantast', [ 'entity_finder_id' => DoctrineOrmEntityFinderAndSaver::class, 'entity_saver_id' => DoctrineOrmEntityFinderAndSaver::class, 'async' => [ 'bunny' => [ 'host' => '%env(string:key:host:url:TELEPHANTAST_TRANSPORT_URL)%', 'port' => '%env(int:key:port:url:TELEPHANTAST_TRANSPORT_URL)%', 'user' => '%env(string:key:user:url:TELEPHANTAST_TRANSPORT_URL)%', 'password' => '%env(string:key:pass:url:TELEPHANTAST_TRANSPORT_URL)%', 'vhost' => '%env(string:key:path:url:TELEPHANTAST_TRANSPORT_URL)%', 'heartbeat' => '%env(int:key:heartbeat:query_string:TELEPHANTAST_TRANSPORT_URL)%', ], 'outbox' => [ 'transaction_provider_id' => DoctrineOrmTransactionProvider::class, 'storage_id' => DoctrinePostgresOutboxStorage::class, ], ], 'entities' => [ MyEntity::class => null, ], ]); $di->services() ->defaults() ->autowire() ->autoconfigure() ->set(DoctrineOrmTransactionProvider::class) ->set(DoctrinePostgresOutboxStorage::class) ->set(DoctrineOrmEntityFinderAndSaver::class); };
TELEPHANTAST_TRANSPORT_URL=bunny://guest:guest@rabbitmq:5672//?heartbeat=60