PHPackages                             php-arsenal/doctrine-odm-transactional-document-manager - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. php-arsenal/doctrine-odm-transactional-document-manager

AbandonedLibrary[Database &amp; ORM](/categories/database)

php-arsenal/doctrine-odm-transactional-document-manager
=======================================================

0.1.1(4y ago)09MITPHP &gt;=8.0

Since Jul 6Compare

[ Source](https://github.com/php-arsenal/doctrine-odm-transactional-document-manager)[ Packagist](https://packagist.org/packages/php-arsenal/doctrine-odm-transactional-document-manager)[ RSS](/packages/php-arsenal-doctrine-odm-transactional-document-manager/feed)WikiDiscussions Synced today

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

Doctrine ODM Transactional Document Manager
===========================================

[](#doctrine-odm-transactional-document-manager)

Built upon Maciej [blog post](https://zgadzaj.com/development/mongodb/mongodb-multi-document-transactions-in-symfony-4-with-doctrine-and-mongodb-odm-bundle)

[![Release](https://camo.githubusercontent.com/d1a083cdd398776a7ca32c71ff972f634bc502e9b87eaa303b381e8447b3eedb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f7068702d617273656e616c2f646f637472696e652d6f646d2d7472616e73616374696f6e616c2d646f63756d656e742d6d616e61676572)](https://github.com/php-arsenal/doctrine-odm-transactional-document-manager/releases)[![CI](https://camo.githubusercontent.com/acadbfdea926384c40bdf5944428df43fcee121f58e5ba085c43cd64c80cc4bd/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7068702d617273656e616c2f646f637472696e652d6f646d2d7472616e73616374696f6e616c2d646f63756d656e742d6d616e616765722f4349)](https://github.com/php-arsenal/doctrine-odm-transactional-document-manager/actions/workflows/ci.yml)[![Packagist](https://camo.githubusercontent.com/487d52c587adfd87b7446607efe4af493f4734680ed4bba8fdc7b79475021e74/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7068702d617273656e616c2f646f637472696e652d6f646d2d7472616e73616374696f6e616c2d646f63756d656e742d6d616e61676572)](https://packagist.org/packages/php-arsenal/doctrine-odm-transactional-document-manager)

Install
-------

[](#install)

Require with Composer

```
composer require php-arsenal/doctrine-odm-transactional-document-manager

```

Add to `services.yaml`

```
    PhpArsenal\DoctrineOdmTransactionalDocumentManager\TransactionalDocumentManager:
        autowire: true
        autoconfigure: true
```

Use
---

[](#use)

We might also wrap that `publishProducts()` code in a try-catch block and call `$this->documentManager->abortTransaction();` in its catch section, but if a transaction is not committed, it will be automatically aborted (rolled back), so there is no real need for that here.

```
