liip / liip/LiipTestFixturesBundle
SQLSTATE[HY000]: General error: 1 table messenger_messages already exists
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 178
- Forks
- 48
- PR merge metrics
- No merged PRs in 30d
Description
After an upgrade from symfony 4.4 to symfony 5.1 with all the doctrine dependencies, and also an remove of `liip/functional-test-bundle` and instead install of `liip/test-fixtures-bundle`
Some dependencies that have been upgraded is
```
doctrine/doctrine-migrations-bundle
doctrine/doctrine-fixtures-bundle
symfony/messenger
```
My tests began to output a lot of `SQLSTATE[HY000]: General error: 1 table messenger_messages already exists` all over the place.
Now for my migrations to not add `messenger_messages` table I have the following doctrine config
```
# config/packages/doctrine.yaml
doctrine:
dbal:
connections:
default:
schema_filter: ~^(?!messenger_messages)~
```
So to fix my `table already exists` I had to add the following to my doctrine test yaml file
```
# config/packages/test/doctrine.yaml
doctrine:
dbal:
default_connection: default
connections:
default:
schema_filter: ~
```
And now my tests are running fine.
Im not actually sure this is a bug in either doctrine or liip, but just wanted to add it somewhere, so it can be googled - because I had no relevant google results coming up.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with config/packages/doctrine.yaml and config/packages/test/doctrine.yaml, then reproduce the test failure after the Symfony and Doctrine dependency upgrades. Determine whether the bundle or its documentation should handle the messenger_messages schema conflict, and confirm the tests run without requiring the reported workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, symfony
- Domain
- database, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100