Skip to content
This repository was archived by the owner on Feb 16, 2021. It is now read-only.

Conversation

@ohvitorino
Copy link
Contributor

I chose to only add SimpleBusCommandBusBundle instead of any of the other bundles included by the installed package.

https://github.com/SimpleBus/SymfonyBridge

new Knp\Bundle\PaginatorBundle\KnpPaginatorBundle(),
new Knp\Bundle\MenuBundle\KnpMenuBundle(),
new Eo\AirbrakeBundle\EoAirbrakeBundle(),
new SimpleBus\SymfonyBridge\SimpleBusCommandBusBundle(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you will need all 3 to get doctrine working properly

new SimpleBus\SymfonyBridge\DoctrineOrmBridgeBundle(),
            new SimpleBus\SymfonyBridge\SimpleBusCommandBusBundle(),
            new SimpleBus\SymfonyBridge\SimpleBusEventBusBundle(),

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do the other 2 do? Because I didn't need them when developing my bundle.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it wraps the handling of commands inside a database transaction

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need config for that, or is it just automatically when you add it in AppKernel?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it happens automatically, no extra configuration needed just add the bundles

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@carakas I only included the minimal requisites to be able to use the command bus. But maybe it is a good idea to initialise the doctrine bundle as well, because it is quite handy to use the rollback functionality.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ohvitorino this hasn't changed yet

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already added the missing doctrine bridge dependencies.

composer.json Outdated
"sumocoders/framework-multi-user-bundle": "^4.0",
"knplabs/knp-paginator-bundle": "^2.5"
"knplabs/knp-paginator-bundle": "^2.5",
"simple-bus/symfony-bridge": "^4.1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you also need to add simple-bus/doctrine-orm-bridge

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same, didn't need this, what does it do?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't remember in exactly what situations but in some if you don't have this the deploys fail, it is also for that reason included in fork

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it will also automatically flush at the end of the command

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, didn't know that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@carakas according to the documentation, the added bundle already includes the doctrine-orm-bundle (https://github.com/SimpleBus/SymfonyBridge/blob/master/README.md). So no need to include it as well.

@jonasdekeukelaere
Copy link
Member

Some test fail as well

@ohvitorino
Copy link
Contributor Author

@jonasdekeukelaere my bad. I wasn't expecting to have broken tests just because of installing a bundle :P I'll have a look at it.

new Knp\Bundle\PaginatorBundle\KnpPaginatorBundle(),
new Knp\Bundle\MenuBundle\KnpMenuBundle(),
new Eo\AirbrakeBundle\EoAirbrakeBundle(),
new SimpleBus\SymfonyBridge\SimpleBusCommandBusBundle(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ohvitorino this hasn't changed yet

@ohvitorino ohvitorino force-pushed the set-simplebus-bundle-as-default-command-bus branch from 2a4aaf9 to 0a9e549 Compare May 18, 2017 15:49
Bruno Vitorino added 2 commits May 18, 2017 17:54
This is a dependency of the DoctrineOrmBundle.
This seams to also be required.
@StijnVrolijk StijnVrolijk merged commit 7dd9538 into master May 19, 2017
@tijsverkoyen tijsverkoyen deleted the set-simplebus-bundle-as-default-command-bus branch May 23, 2018 10:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants