Update the export command to use a PHP8-safe PDO transaction commit path
Addresses an issue reported in https://github.com/FriendsOfSymfony1/doctrine1/issues/130
I'm not familiar enough with the internals of this package to build the test, but this behavior occurs when:
- The Doctrine Transaction believes it is in a transaction (There is a nestinglevel)
- The plain PHP PDO object (due to the change in PHP 8) knows that it is no longer in a transaction - due to the database auto-committing a DDL command
- Commit is called on the connection/transaction.
I began writing a test but couldn't get the test suite to run on my machine, and wasn't sure how to mock the change in PDO behavior from 7.x to 8.0
I do see the task behavior is fixed on a build pointing at my forks branch, help figuring out how to build the test for it would be appreciated
This patch will fix the issue #98.
I just remembered that I wrote a failing test. Look at #103.
I will cherry-pick your patch and run the test.
@mcgrogan91 Yes, the patch you provide works. :100:
Sadly, the current CI does not support its execution as missing a MySQL server.
How I executed the test suite?
- Checkout on #103 where two commits of this PR applied
- Merge #90
- Revert two commits of this PR
- Run tests suite
tests/bin/test, expect failing test. - Apply two commits of this PR
- Run tests suite
tests/bin/test, expect test pass.
I'm glad to hear your testing of it worked. What's the next step to get this moving? Right now we have our application pointing at my fork but i'd love to get us back onto the main repository before moving forward with a production deploy
Any update on this? Any chance of merging this PR?