-
-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"No active transaction" exception with PHP 8.0 #348
Comments
Actually using line 237: public function transactional($func)
{
if (! is_callable($func)) {
throw new InvalidArgumentException('Expected argument of type "callable", got "' . gettype($func) . '"');
}
$this->conn->beginTransaction();
try {
$return = call_user_func($func, $this);
$this->flush();
// $this->conn->commit();
TransactionHelper::commitIfInTransaction($this->conn);
return $return ?: true;
} catch (Throwable $e) {
$this->close();
// $this->conn->rollBack();
TransactionHelper::rollbackIfInTransaction($this->conn);
throw $e;
}
} |
Do you know if any DDL statements are executed before the attempt to commit? The issues you are linking to should only arise when combining PHP 8 + PDO + MySQL or Oracle + DDL statements. Maybe that's because of the "purging database" step? Does it maybe work with |
@greg0ire thanks for putting me on the right track. One of the fixture files contained an |
Most likely related to doctrine/migrations#1104 and doctrine/migrations#1139
Versions installed:
To reproduce:
bin/console doctrine:fixtures:load --verbose
Stack trace:
Possible resolution:
I haven't had the time too look into this in details but since this happens in a Rollback, the solution may be similar to doctrine/migrations#1143
Thank you for the help, and please let me know how I can help further.
The text was updated successfully, but these errors were encountered: