@stof There are already [checks for the current state of the transaction](https://github.com/doctrine/dbal/pull/571/files#diff-34e5cb36a912322bb72369c74070b1d7R64) anyway, so this wouldn't change much.

As regards to each configuration method in the Transaction (`setIsolationLevel()`, `setReadOnly()`, ...) these can all call a private `setConfiguration()` method that throws an exception if the transaction has already been started, and store the value in a `$configuration` variable so the code can be kept very neat.

Finally, the complexity about executing the transactions in the correct order is really low, it really is just an extra check to perform in the TransactionManager, which has access to the complete stack of transactions. The only thing to do is find the parent transaction, if any, and check whether it is active.

Again, I'd be happy to write a proof of concept in a separate PR.