Download the PHP package orbitale/entity-merger without Composer

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

:warning: This package is unmaintained. Please look at better solutions, like serializers.

Entity Merger

Entity/object merger for PHP apps.

Installation

Install with Composer, it's the best packages manager you can have:

Requirements

Basic usage

Note: The EntityMerger only works with mapped objects. The properties must exist, and it cannot use magic methods to retrieve datas.

Using the Doctrine ORM ObjectManager

The EntityMerger accepts a Doctrine\ORM\ObjectManager as first argument, like the EntityManager for instance. This allows better and deeper merging when using ORM-mapped entities, by automatically using the Doctrine Metadatas to detect property types. If you are using the EntityMerger in an application that uses Doctrine, it is highly recommended to inject the ObjectManager to use your mapping as type reference for each of your class properties.

If no ObjectManager is used, the EntityMerger will perform its own checks with its own metadatas manager, but it is obviously less performant than the Doctrine one, because it cannot assume that you are attempting to merge an entity. It instead makes its checks based on PHPDoc, class imports and default parameters, so be sure to perfectly write your PHPDoc in your class if you do not want to use the ObjectManager!

Using the Serializer

The EntityMerger accepts a Serializer as second argument. It can both use the native Symfony Serializer and the powerful JMS Serializer.

Note: If you are using Symfony <2.5 and still want to use the serializer, then you'll have to switch to the JMS' one, or you may have some unexpected behavior because of the lack of the PropertyNormalizer class.

Using the Serializer allows you to merge two objects in the specified one by serializing the dataObject parameter into an array, and using it as values to merge in your object/entity.

Note: Of course you can use your own serialization method to inject the dataObject as array in your merge process.

Advanced usage

Merge two objects in the first one (must use any serializer):


All versions of entity-merger with dependencies

PHP Build Version
Package Version
Requires php Version ^5.5|^7.0
symfony/serializer Version ^2.3|^3.0
doctrine/orm Version ^2.2.3
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 orbitale/entity-merger contains the following files

Loading the files please wait ....