Skip to content

Commit

Permalink
minor #874 [ci] set server version in dsn (jrushlow)
Browse files Browse the repository at this point in the history
This PR was merged into the 1.0-dev branch.

Discussion
----------

[ci] set server version in dsn

`doctrine.dbal.server_version` is no longer available - set the server version explicitly in the dsn.

symfony/recipes#939

- [x] `dev` stability testing failing until symfony/recipes#945

Commits
-------

c9bb444 [ci] set server version in dsn
  • Loading branch information
weaverryan committed May 10, 2021
2 parents e59e0b6 + c9bb444 commit 060ce03
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:

services:
mysql:
image: mysql:5.7
image: mysql:5.7 # Update server_version in phpunit.xml.dist if this changes.
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: test_maker
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
>
<php>
<ini name="error_reporting" value="-1" />
<env name="TEST_DATABASE_DSN" value="mysql://root:root@127.0.0.1:3306/test_maker" />
<env name="TEST_DATABASE_DSN" value="mysql://root:root@127.0.0.1:3306/test_maker?serverVersion=5.7" />
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0"/>
</php>

Expand Down
7 changes: 0 additions & 7 deletions src/Test/MakerTestDetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,6 @@ public function configureDatabase(bool $createSchema = true): self
)
;

// use MySQL 5.6, which is what's currently available on Travis
$this->addReplacement(
'config/packages/doctrine.yaml',
"#server_version: '13'",
"server_version: '5.7'"
);

// this looks silly, but it's the only way to drop the database *for sure*,
// as doctrine:database:drop will error if there is no database
// also, skip for SQLITE, as it does not support --if-not-exists
Expand Down

0 comments on commit 060ce03

Please sign in to comment.