Download the PHP package marble/entity-manager without Composer

On this page you can find all versions of the php package marble/entity-manager. 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 entity-manager

Marble Entity Manager

Minimum PHP version Tests Installs via Packagist Latest stable version License

This library provides some of the great features of ORM frameworks — entity manager, unit of work, identity map, repository factory, query caching — without the object-relational mapping itself. It’s up to you to implement the actual reading and writing of entity data from and to whatever persistence layer you’re using.

Why Marble?

I love Doctrine ORM as much as the next guy, but often enough the object-relational mapping part of it is just overly constrained (1 property = 1 column) and overly constraining (Doctrine collections all over your domain code). Its configuration, especially if you want to get around those constraints, can get very (very) elaborate.

Moreover, ORM libraries are limited to relational (i.e. SQL-based) storage engines. Add NoSQL or external APIs into the mix, and you'll need to bring in additional entity-managing libraries to bridge the gap.

Marble gives you full control over how your data is saved and loaded, without sacrificing the benefits of a robust unit of work and identity map.

Installation

Use Composer to install: composer require marble/entity-manager

This library requires PHP 8.2 or higher.

Note: if you’re building a Symfony application, consider installing the bundle instead. It comes with a default implementation of EntityIoProvider and provides several features to make your life easier.

Getting started

  1. All your entity classes should implement the Entity interface. For identifiers you may use the provided SimpleId or Uid classes, or any other implementation of the Identifier interface.
  2. Create a class that implements EntityReader for every entity class that you want to fetch from your application code or from other readers. See Fetching for more details.
  3. Create one or more classes that implement EntityWriter. Typically you’ll have either a single writer for all entities, or a writer per entity class except those that are always written and deleted by other writers. See Removing for more details.
  4. Implement the EntityIoProvider interface and have it return the correct EntityReader and EntityWriter for a given Entity. Of course one class may implement both interfaces.

How it works

Persisting

Fetching

Note: One known limitation of this library compared to some other ORM libraries, is that all fetch* calls to the repository are forwarded to your entity reader. This means queries only operate directly on the persistence layer, and will ignore in-memory, pre-flush changes and additions in the unit of work. There is currently no extension point in the library to circumvent this limitation.

However, if you’re following Domain-Driven Design (DDD) practices, particularly the "one aggregate per transaction" rule, in most cases you shouldn’t be querying the repository after mutating an aggregate but before flushing. Nonetheless, be careful when doing batch processing or handling synchronous, pre-flush events.

Removing

License

Marble is open-sourced software licensed under the MIT license.

About

Made by a Dutch guy in his spare time, with some frustrations towards (as well as love for) Doctrine ORM.


All versions of entity-manager with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
psr/event-dispatcher Version ^1.0
sebastian/comparator Version ^4.0|^5.0
symfony/var-exporter Version ^7.4|^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 marble/entity-manager contains the following files

Loading the files please wait ...