Issue #3477815: Document why the phpcs:ignore suppressions in...

Issue #3477815: Document why the phpcs:ignore suppressions in DriverSpecificTransactionTestBase are needed

A Transaction object commits or releases itself when it is destructed, so assigning the return value of createRootTransaction() / createFirstSavepointTransaction() / startTransaction() to a variable is what keeps the transaction or savepoint open until the variable goes out of scope at the end of the test method. Calling these without capturing the result would end the transaction immediately, even though the variable is otherwise never read again, which is why several call sites carry a VariableAnalysis suppression.

This documents the contract on the two helper methods and adds a one-line reason above each of the seven suppressions, per the investigation and suggested approach in comment #5 of the issue.

Closes #3477815

Closes #3477815

Merge request reports

Loading
Loading