This changelog references the relevant changes done in 2.x versions.
- Ignore
ExecutionDoesNotExist
inDynamoDbScheduler
. - Do not log exceptions in
LogAndDispatchExceptionHandler::onRequestBusException
since the exception is rethrown inPbjx::request
anyways.
- Do not unset the
ctx_retries
field inDynamoDbScheduler
.
- Remove pool delay from
DynamoDbEventStore::pipeAllEvents
altogether since concurrency and batching with symfony commands does the trick.
- Add
$context['concurrency']
check inDynamoDbEventStore::pipeAllEvents
so that can be configured. Defaults to 25.
- Update composer constraint for
gdbots/query-parser
to~0.2 || ^1.0
.
- In
SimplePbjx::copyContext
copy thectx_ipv6
field when present.
- Remove use of
Limit
inDynamoDbEventStore
so fewer queries are made to scan the table. - Add check for destroy in context in
ElasticaEventSearch::createStorage
to delete index before creating it.
- In
Gdbots\Pbjx\EventSearch\Elastica\IndexManager
assume date is an immutable object.
- BUG fix in
DynamoDbEventStore::optimisticCheck
to cast event id to string in both checks.
- Add
DynamoDbEventStore::beforePutItem
hook so item can be customized, e.g. setting ttl field so DynamoDb automatically deletes it.
- In
SimplePbjx
rethrow any exceptions when response created events are triggered. - In
ElasticaEventSearch
use response query time to determinetime_taken
.
- In
Gdbots\Pbjx\EventSearch\Elastica\IndexManager
add custom normalizers fromMappingFactory::getCustomNormalizers
if available, otherwise hardcoded.
- Add
$config['aws_session_token'] = $this->credentials->getSecurityToken();
inGdbots\Pbjx\EventSearch\Elastica\AwsAuthV4ClientManager
so signatures work in AWS ECS.
- Use Throwable for all typehints instead of Exception to catch TypeError as well.
POSSIBLE BREAKING CHANGE
If you are not using an EventStore
or EventSearch
implementation from this library then you'll need to add the getEvent
, getEvents
, deleteEvent
and deleteEvents
methods to your implementation.
- Add
getEvent
,getEvents
anddeleteEvent
methods toEventStore
. - Add
deleteEvents
methods toEventSearch
.
- issue #15: Increase offset max from 1000 to 10,000 in
ElasticaEventSearch::searchEvents
.
- Adjust
PbjxToken
TTL to 10 (down from 120) and LEEWAY to 300 (from 30). Because LEEWAY is used in both iat and exp validation we need that window to be larger, exp works within that expanded window as well.
- Adjust
PbjxToken
TTL to 120 (up from 5) and LEEWAY to 30 (from 5).
- Fix bug in
Gdbots\Pbjx\EventSearch\Elastica\IndexManager::getIndexNamesForSearch
that would not include the next index when overlapping quarters.
- Catch and log error when updating existing analyzers on index in
Gdbots\Pbjx\EventSearch\Elastica\IndexManager::updateIndex
.
POSSIBLE BREAKING CHANGE
If you are not using the SimplePbjx
implementation for Pbjx
then you'll need to add the sendAt
and cancelJobs
methods to your implementation.
- Add
Gdbots\Pbjx\Scheduler\Scheduler
with aDynamoDbScheduler
implementation (interally uses Step Functions and a DynamoDb table). - Add
sendAt
andcancelJobs
methods toPbjx
. - Add
getScheduler
method toServiceLocator
. The service is optional, just likeEventStore
andEventSearch
. Attempting to callsendAt
orcancelJobs
will throw an exception if you haven't configured the scheduler.
- Add
Gdbots\Pbjx\DependencyInjection\*
marker interfaces to make it possible to autowire/autoconfigure services in frameworks like Symfony. - Update
CommandHandler
andRequestHandler
interfaces to use newPbjxHandler
marker interface which requires static methodhandlesCuries
. If your code is not using theCommandHandlerTrait
orRequestHandlerTrait
then you will need to add those methods. At the time of this update, no code in the wild is known to exist not using the traits so this is left as a patch. Also note, emitting an empty array is fine if you're not using Symfony or another framework that would make use of that method.
- Update
gdbots/schemas
composer constraint to allow for^1.4.1
. - Remove
gdbots/pbj
package from composer asgdbots/schemas
already requires it. - Update
symfony/event-dispatcher
composer constraint to allow for^3.0 || ^4.0
. - Add
PbjxToken
which creates one time use signed tokens (JWT) that are intendeded to be used to secure pbjx HTTP services against XSS, CSRF, replay attacks, etc.
- issue #8: Automatically reconnect gearman if connection is lost. After
maxReconnects
is reached (default=3) then all further pbjx operations will be handled in memory.
BREAKING CHANGES
- Requires php7.1 and all classes use
declare(strict_types = 1);
and use php7 return type hints and scalar type hints. - Renames some classes ("Default" makes no sense, "Simple" is more clear as an implementation):
DefaultCommandBus
is nowSimpleCommandBus
DefaultExceptionHandler
is nowLogAndDispatchExceptionHandler
DefaultEventBus
is nowSimpleEventBus
DefaultPbjx
is nowSimplePbjx
DefaultRequestBus
is nowSimpleRequestBus
- Most implementations are now marked as final. Use decorator pattern or provide your own implementation to change the functionality of Pbjx components.
- Transports now use a
TransportEnvelope
so the consumers can handle multiple serializers and properly set replay flag on messages that are handled in a separate process or separate machine entirely (e.g. gearman). Transport
andRouter
interfaces moved toGdbots\Pbjx\Transport\*
.
NEW FEATURES
- Adds
EventStore
andEventSearch
with DynamoDb and Elastica implementations.