Implementation of the static machine on Zend Framework3 + Doctine2

Introduction: Why is a 3m3r35 stealth machine needed?
In applications, it is often necessary to restrict access to certain actions over an object. To do this, use RBAC-modules, which solve the problem of restricting access depending on the rights of the user. The task of managing actions depends on the state of the object remains unresolved. This problem can be solved with the help of a finite state machine or state machine. A convenient state machine allows not only to collect all the rules of transitions between the states of an object in one place, but also introduces some order in the code ...
+ 0 -

Doctrine, autoCommit, nested transactions - non-obvious nuances

The name of the autoCommit option may give the impression that at autoCommit = true commit is called automatically, and at autoCommit = false it must be called by hand, but it is not.
autoCommit = false
In this mode, new transactions start automatically (the first one at the connection, then when you call commit /rollback), that is, all requests are always executed inside the transaction, you must manually call commit /rollback to complete them.
autoCommit = true (the default value)
In this mode, transactions do not start automatically, they must be started by calling ...
+ 0 -