sonata-doctrine-extensions icon indicating copy to clipboard operation
sonata-doctrine-extensions copied to clipboard

Adding TransactionalManagerInterface

Open eerison opened this issue 1 year ago • 3 comments

Subject

I am targeting this branch, because it has the support for the php 7.4 version.

Related with #{put_issue_number_here}.

Changelog

### Added
- Added `TransactionalManagerInterface::class` interface.

eerison avatar Aug 11 '22 10:08 eerison

You need to implement it in https://github.com/sonata-project/sonata-doctrine-extensions/blob/2.x/src/Entity/BaseEntityManager.php

BaseEntityManager or BaseManager I don't really get what is the difference between both?

eerison avatar Aug 11 '22 10:08 eerison

You need to implement it in https://github.com/sonata-project/sonata-doctrine-extensions/blob/2.x/src/Entity/BaseEntityManager.php

BaseEntityManager or BaseManager I don't really get what is the difference between both?

BaseManager is a base for both doctrineORM and doctirneMOngo. BaseEntityManager is a bath for doctrineORMManagers

There is transaction in EntityManager so we can add it to BaseEntityManager. I'm not sure the same exists to MongoManager, and even if it exists, the impelmentation won't be the same

VincentLanglet avatar Aug 11 '22 10:08 VincentLanglet

Linter is failing

VincentLanglet avatar Aug 11 '22 17:08 VincentLanglet

Linter is failing

the phpcs I could run locally, But psalm doesn't work :/, Then I do not know it it was fixed!

eerison avatar Aug 12 '22 07:08 eerison

I added the return type for tests

eerison avatar Aug 12 '22 07:08 eerison

sorry for keeping you running the pipelines :(

eerison avatar Aug 12 '22 07:08 eerison

let me know if it's missing something!

eerison avatar Aug 12 '22 08:08 eerison

And what was the decision 👀

eerison avatar Aug 15 '22 05:08 eerison

I think I found at least another case on SonataMediaBundle where this could be useful.

jordisala1991 avatar Aug 16 '22 07:08 jordisala1991

I think I found at least another case on SonataMediaBundle where this could be useful.

Can you explain what you have in mind ?

VincentLanglet avatar Aug 16 '22 08:08 VincentLanglet

Nothing, I have searched where do we use transactions and are only on PageBundle

jordisala1991 avatar Aug 16 '22 12:08 jordisala1991