HomeDevCentral

Use broker factory

Description

Use broker factory

Summary:
Broker service provider change

We move the responsibility to prepare a working broker instance
from the application service provider to the broker library.

D225 has introduced a factory to create an instance of Broker
from a configuration array. We now require keruald/broker 0.3.2+.

The broker factory received the array defined in config/broker.php
as key connections.<correct driver>. The driver is specified at the
driver key from the same file. Each respects 12 factors principle.

Test infrastructure change

We already mock the Blackhole broker in some tests and we will keep
the test code as is, to allow any queer choices like 'integration
test with a working broker' in the future.

For the remaining, regular tests, we want to use everywhere a
blackhole broker and so we update the configuration in BROKER_DRIVER
enviromnet variable.

We add a definition of this blackhole driver to our config.

Test Plan: composer update && phpunit

Reviewers: dereckson

Subscribers: alken-orin

Differential Revision: http://devcentral.nasqueron.org/D231

Details

Provenance
derecksonAuthored on
Differential Revision
D231: Use broker factory
Parents
rNOTIFffe10b383174: Fixed issue when credentials.json is not defined in the config
Branches
Unknown
Tags
Unknown