Download the PHP package becklyn/ddd-core without Composer

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

becklyn/ddd-core is a set of components for developing software with domain-driven design, event sourcing and CQRS. Support is included for:

The components are designed to facilitate the following workflow:

Usage

becklyn/ddd-core provides the components mostly as abstract classes and interfaces to facilitate use independent of any specific technological infrastructure. Our choice is Symfony with Doctrine and SimpleBus, and we provide implementations tying everything together in the becklyn/ddd-doctrine-bridge and becklyn/ddd-symfony-bridge libraries. If you wish to use other technologies, you will need to provide your own implementations for the event store and event, transaction and command handling.

Core Loop

Here's a more detailed explanation on how to achieve the becklyn/ddd-core workflow:

Entities, Aggregates and Events

Entities must implement the EventProvider interface, and they must raise a domain event for every change to their state. The EventProviderCapabilities can be used by entities to facilitate this. Each entity must also have its corresponding identity class implementing the EntityId interface. AbstractEntityId is provided for a default implementation.

One entity in every aggregate serves as the aggregate root. Any and all interaction with the aggregate is allowed only through this entity, and thus only aggregate roots should have repositories. Aggregate root identities must implement the AggregateId interface instead of just EntityId. AbstractAggregateId is provided for a default implementation. When dequeueEvents is called on an aggregate root, it should in turn collect all of the events from other entities in the aggregate and return them along the events raised by the aggregate root.

Events must implement the DomainEvent interface and may do so extending the AbstractDomainEvent class. A domain event records a state change and must contain all the data necesary for it to be replayed from the previous state.

If using event sourcing, aggregates should use the EventSourcedProviderCapabilities trait instead of EventProviderCapabilities. While it is possible to implement repositories using the EventStore and its getAggregateStream method directly, this will likely result in low performance for most implementations if a large number of aggregates is fetched at once. For such scenarios we recommend using projections instead.

Testing

We write our PHPUnit/Prophecy unit tests inspired by the BDD workflow of "given/when/then". To test the code interacting with components from this library, we have gathered various given/when/then helper methods into traits. You can find them within the Testing namespaces of individual subdomans present in the library, for example:


All versions of ddd-core with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
becklyn/utilities Version ^2.0
ramsey/uuid Version ^4.0
illuminate/collections Version ^8.12 || ^9.0
webmozart/assert Version ^1.9
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-core contains the following files

Loading the files please wait ....