Download the PHP package rekalogika/domain-event without Composer

On this page you can find all versions of the php package rekalogika/domain-event. 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 domain-event

rekalogika/domain-event

An implementation of domain event pattern for Symfony & Doctrine.

Full documentation is available at rekalogika.dev/domain-event.

What is a Domain Event?

A domain event is simply a regular event like you would normally use with Symfony's EventDispatcher. The difference is that a domain event represents something that has happened in your domain. It has a name that is meaningful to the underlying business that the domain represents. A domain event is usually dispatched by your entities, as opposed to being dispatched from your controllers or other services.

Why Use Domain Events?

A domain event represents a business event that has happened. It is a good way to model the business requirements that say "when something happens, do this".

A domain event is raised by the part of your code where the event is actually happening. Different part of your application might call the same method on an entity. In some cases, the method is called indirectly, and the caller has no idea that it is being called. By using domain events, the event will be dispatched in all the cases. No need to make sure to dispatch the event from all the different places where the method is called.

The application layer (controllers, services) can tell an entity to do something, but it cannot reliably know if the action is actually performed, or if an additional action is performed. A controller or a service can ask $bookshelf->removeBook($book), but only the $bookshelf knows if the book was actually removed. And if the event actually happened, the entity can tell the world about it by recording a BookRemoved event.

Some problems might tempt you to inject a service into your entity. With domain events, you can avoid that. You can make your entity dispatch an event, and set up a listener to react to that event. The relevant services can then correctly act on your entity, instead of the other way around.

Synopsis

Features

To Do

Installation

Ensure that Symfony Flex is enabled (it is enabled by default). Open a command console, enter your project directory and execute:

Documentation

rekalogika.dev/domain-event

License

MIT

Contributing

The rekalogika/domain-event repository is a read-only repo split from the main repo. Issues and pull requests should be submitted to the rekalogika/domain-event-src monorepo.


All versions of domain-event with dependencies

PHP Build Version
Package Version
Requires doctrine/doctrine-bundle Version ^2.11.3 || ^2.12
doctrine/orm Version ^2.16 || ^3.0
doctrine/persistence Version ^3.2
psr/event-dispatcher Version ^1.0
rekalogika/domain-event-contracts Version ^2.5.1
symfony/config Version ^6.4 || ^7.0
symfony/dependency-injection Version ^6.4 || ^7.0
symfony/event-dispatcher Version ^6.4 || ^7.0
symfony/http-kernel Version ^6.4 || ^7.0
symfony/service-contracts Version ^3.0
symfony/var-exporter Version ^6.4 || ^7.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 rekalogika/domain-event contains the following files

Loading the files please wait ....