NoCoroutinesInTransactionsRule
class NoCoroutinesInTransactionsRule implements Rule
Reports child coroutines started inside a database transaction callback.
A child coroutine borrows its own pooled connection, so its queries run outside the transaction the parent coroutine owns.
Constants
| private SPAWNING_NAMES |
The lowercase short names of the functions and methods below. |
| private SPAWNING_FUNCTIONS |
The functions that start child coroutines. |
| private SPAWNING_METHODS |
The lowercase methods that start child coroutines, by declaring class. |
| private TASK_PARAMETERS |
The names of the task-list parameters that spawning functions and methods take. |
Methods
Create a new coroutines in transactions rule instance.
Get the node type the rule checks.
Report coroutine-starting calls that run inside a transaction callback.
Details
at line 106
__construct(ReflectionProvider $reflectionProvider, ConcurrencyDriverHelper $concurrencyDriverHelper, CoroutineRuleHelper $coroutineRuleHelper)
Create a new coroutines in transactions rule instance.
at line 116
string
getNodeType()
Get the node type the rule checks.
at line 129
array
processNode(Node $node, Scope $scope)
Report coroutine-starting calls that run inside a transaction callback.