Download the PHP package alexandrebulete/ddd-activity-bundle without Composer

On this page you can find all versions of the php package alexandrebulete/ddd-activity-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package ddd-activity-bundle

DDD Activity Bundle

The activity journal of a DDD application: who did what, through which chain of causes, and how it ended — for every command, every sensitive read and every effect on the outside world.

"Who deployed lapsa to production on the 12th?" becomes a search in the back office: Pauline from Slack, an AI agent, or the system reacting to an approval — with everything that led to it and everything that followed.

Install

Requires alexandrebulete/ddd-symfony-bundle ≥ 1.5, whose tracing provides the actor and the chain on every message. Symfony Security and an IAM are optional: without them, the system is the actor of every chain.

The bundle ships its own migration (a service, so it follows activity.table): never migrations:diff its table.

What gets journaled

Journaled
A command (CommandInterface) always — unless marked #[NotJournaled]
A query (QueryInterface) only when marked #[Journaled] — sensitive reads
An external effect when the adapter records it (below)
Anything else on the buses no

Each entry keeps: when; who (kind, id, the name at that time, and the credential used — an API token's id, filterable: "everything this token did"); the action; the outcome (succeeded, failed with the error, refused); the channel; the chain (correlation_id, causation_id, message_id); the permission of the use case; and what the message chose to describe.

A use case refused by the authorization middleware is journaled as refused, with who asked.

Describing a use case

Nothing to do for the defaults. To name the subject, a readable sentence and the facts worth keeping, a message implements the foundation's JournaledInterface — the Application layer depends on nothing else:

Details are scalars or lists of scalars, picked explicitly: nothing is serialized implicitly, so no secret, entity or client document slips in.

Recording an external effect

The effect joins the chain being handled. It is written on its own connection: an effect that happened stays journaled even if the transaction around it is rolled back.

Guarantees

Databases. PostgreSQL and MySQL get every guarantee above. SQLite has a single writer: a failure occurring after the command wrote cannot be journaled — it is logged instead, without ever blocking the application.

Who sees what

Every entry carries the permission of its use case (an effect, the one of the use case that caused it). When the application authorizes use cases (a PermissionCheckerInterface is registered — the IAM does it), a viewer sees:

Seeing the journal at all takes activity.find_activity_entries. Without a checker, everything is visible to whoever reaches the screen.

Back office

With Sylius Admin UI, "Activity journal" lists entries with filters (actor, action, subject, outcome, chain). "Show the chain" narrows the list to one chain, oldest first. Read-only by construction.

Retention

The purge is a command like any other: the journal records its own purges.

Configuration

Development

The integration tests boot a kernel without Sylius nor Security, on the database given by DDD_TEST_DATABASE_URL (a SQLite file otherwise); CI runs them on PostgreSQL, MySQL and SQLite.


All versions of ddd-activity-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
alexandrebulete/ddd-doctrine-bridge Version ^1.3
alexandrebulete/ddd-foundation Version ^1.4
alexandrebulete/ddd-sylius-bundle Version ^1.0
alexandrebulete/ddd-symfony-bundle Version ^1.5
doctrine/dbal Version ^4.3
doctrine/doctrine-bundle Version ^2.13 || ^3.0
doctrine/doctrine-migrations-bundle Version ^3.7 || ^4.0
doctrine/migrations Version ^3.8
doctrine/orm Version ^3.3
pagerfanta/core Version ^4.0
psr/clock Version ^1.0
psr/log Version ^3.0
sylius/admin-ui Version >=0.10
sylius/grid-bundle Version ^1.13
sylius/resource-bundle Version >=1.14
symfony/clock Version ^7.0 || ^8.0
symfony/config Version ^7.0 || ^8.0
symfony/console Version ^7.0 || ^8.0
symfony/dependency-injection Version ^7.0 || ^8.0
symfony/framework-bundle Version ^7.0 || ^8.0
symfony/messenger Version ^7.0 || ^8.0
symfony/translation Version ^7.0 || ^8.0
symfony/uid Version ^7.0 || ^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package alexandrebulete/ddd-activity-bundle contains the following files

Loading the files please wait ...