Skip to content
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

BUGFIX: Close connection to reset transaction #40

Merged
merged 3 commits into from
Nov 9, 2024

Conversation

mhsdesign
Copy link
Member

When the database is empty, the doctrine migrations will be run via executeMigrations.
Though that leads to a transaction still being active:

array(2) {
  ["getTransactionNestingLevel"]=>
  int(119)
  ["isTransactionActive"]=>
  bool(true)
}

To work around this we close the connection, leading to the excepted state of no transaction. (The same state if the schema would already exist)

array(2) {
  ["getTransactionNestingLevel"]=>
  int(0)
  ["isTransactionActive"]=>
  bool(false)
}

This change is required for neos/neos-development-collection#5284 so we can remove the hacky ./../flow doctrine:migrate scripts in the CI.

When the database is empty, the doctrine migrations will be run via `executeMigrations`.
Though that leads to a transaction still being active:

```
array(2) {
  ["getTransactionNestingLevel"]=>
  int(119)
  ["isTransactionActive"]=>
  bool(true)
}
```

To work around this we close the connection, leading to the excepted state of no transaction. (The same state if the schema would already exist)

```
array(2) {
  ["getTransactionNestingLevel"]=>
  int(0)
  ["isTransactionActive"]=>
  bool(false)
}
```
@kitsunet kitsunet merged commit f4fb51e into 9.0 Nov 9, 2024
@kitsunet kitsunet deleted the bugfix/reset-transaction-level branch November 9, 2024 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants