Download the PHP package becklyn/ddd-symfony-bridge without Composer

On this page you can find all versions of the php package becklyn/ddd-symfony-bridge. 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-symfony-bridge

becklyn/ddd-symfony-bridge integrates components provided by becklyn/ddd-core and becklyn/ddd-doctrine-bridge with a Symfony application. It uses SimpleBus to implement the event and command buses.

Installation

Enabling Event Bus & Subscribers and Command Bus & Handlers

Enabling the Event Store

How To

Use Event Subscribers and Command Handlers

If you followed the installation instructions above, the only thing you need to register a class as an event subscriber or command handler is to have its class name end in 'Subscriber' or 'Handler', respectively.

Each subscriber or handler may handle one or more events or commands. An individual event class may be handled by multiple subscribers, while the application will throw exceptions or behave unpredictably if a command class is handled by multiple handlers.

To have a subscriber or handler handle an event or command, simply implement a public method with a single argument typed to the event or command class. The name of the method and the argument can be anything, but the method must return void. It is traditional for the method to be named handle and the argument $event or $command, or for methods to be named handleMyEventClass in case of subscribers or handlers handling multiple different events or commands.

Configuration

To change the values of configuration options from their defaults, create a becklyn_ddd.yaml file in the config/packages folder within your Symfony application with the following contents:

Available Options

use_event_store

By default, the event store is active. If you do not want to use it for whatever reason, set this option to false.

Note that if you leave this option set to true and do not execute the Doctrine migrations required for the store, the application will throw an exception as soon as a transaction is committed and there have been events registered.

SimpleBus Configuration

SimpleBus always finishes the handling of the current command before new commands dispatched during this handling are processed. In other words, it puts all commands dispatched during the processing of another command into a queue, and flushes the queue only when the processing of the current command is complete.

Having a command dispatch another command and that new command be processed before handling of the originating command resumes can be a code smell in a lot of situations. But in case you require such functionality it is possible to configure SimpleBus to do so. Add the following to the command_bus.yaml in config/packages:


All versions of ddd-symfony-bridge with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
becklyn/ddd-core Version ^4.0
becklyn/ddd-doctrine-bridge Version ^3.0.1
doctrine/doctrine-bundle Version ^1.10||^2.0
sensio/framework-extra-bundle Version ^5.0||^6.0
simple-bus/message-bus Version ^6.0
simple-bus/symfony-bridge Version ^6.0
symfony/config Version ^5.4 || ^6.0
symfony/dependency-injection Version ^5.4 || ^6.0
symfony/http-foundation Version ^5.4 || ^6.0
doctrine/doctrine-migrations-bundle Version ^3.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 becklyn/ddd-symfony-bridge contains the following files

Loading the files please wait ....