Download the PHP package lenny4/doctrine-merge-persistent-collection-bundle without Composer

On this page you can find all versions of the php package lenny4/doctrine-merge-persistent-collection-bundle. 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 doctrine-merge-persistent-collection-bundle

Merge persistence collection when update entity

Latest Version on Packagist Tests Total Downloads

This bundle is very usefull if you are using ApiPlatform and you don't want to send multiple requests when you update an entity and his children.

Installation

You can install the package via composer:

Usage

How does it work ?

Let's say you have 2 entities Father and Son as ApiResource

With these data in your database:

id name
1 father1
id name age father_id
1 son1 10 1
2 son2 20 1

Let's say you want to update the name of the Father from father1 to father2 and the age of 1 of his children son1 only with 1 request. It's currently impossible only with ApiPlatform. But with this Bundle you can do it now by calling doctrineMergePersistentCollection->merge as shown in the Usage.

Use case (example)

1) Add a son PUT /api/fathers/1

This will change the name of the father to father2 and add a son. Result:

id name age father_id
1 son1 10 1
2 son2 20 1
3 son3 30 1

2) Update son2 age PUT /api/fathers/1

This will change the name of the father to father2 and son2 age. Result:

id name age father_id
1 son1 10 1
2 son2 30 1

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

License

The MIT License (MIT). Please see License File for more information.


All versions of doctrine-merge-persistent-collection-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
doctrine/orm Version ^2.13
symfony/config Version ^6.1
symfony/dependency-injection Version ^6.1
symfony/http-kernel Version ^6.1
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 lenny4/doctrine-merge-persistent-collection-bundle contains the following files

Loading the files please wait ....