Skip to content

Commit

Permalink
Allow Doctrine ORM 3 & Symfony 7 (#8)
Browse files Browse the repository at this point in the history
* Allow doctrine ^3.2

* Fixed how tests are creating SQLite database

* Fixed how tests are creating SQLite database

* Allow & test Symfony 7
  • Loading branch information
yann-eugone authored Aug 1, 2024
1 parent bf69755 commit fc4e672
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 15 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@ jobs:
matrix:
include:
- php-version: "8.1"
symfony-version: "6.3.*"
symfony-version: "6.4.*"
- php-version: "8.3"
symfony-version: "6.4.*"
- php-version: "8.2"
symfony-version: "6.3.*"
symfony-version: "7.1.*"
- php-version: "8.3"
symfony-version: "7.1.*"

steps:
- name: "Checkout"
Expand Down Expand Up @@ -47,8 +51,8 @@ jobs:
strategy:
matrix:
include:
- php-version: "8.2"
symfony-version: "6.3.*"
- php-version: "8.3"
symfony-version: "7.1.*"

steps:
- name: "Checkout"
Expand Down Expand Up @@ -84,8 +88,8 @@ jobs:
strategy:
matrix:
include:
- php-version: "8.2"
symfony-version: "6.3.*"
- php-version: "8.3"
symfony-version: "7.1.*"

steps:
- name: "Checkout"
Expand Down Expand Up @@ -115,8 +119,8 @@ jobs:
strategy:
matrix:
include:
- php-version: "8.2"
symfony-version: "6.3.*"
- php-version: "8.3"
symfony-version: "7.1.*"

steps:
- name: "Checkout"
Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@
],
"require": {
"php": "^8.1",
"doctrine/orm": "^2.7",
"doctrine/orm": "^2.7|^3.2",
"sonata-project/doctrine-orm-admin-bundle": "^4.9",
"sonata-project/admin-bundle": "^4.22",
"symfony/framework-bundle": "^6.3",
"symfony/validator": "^6.3",
"symfony/framework-bundle": "^6.3|^7.0",
"symfony/validator": "^6.3|^7.0",
"twig/twig": "^3.5"
},
"require-dev": {
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^9.5",
"symfony/browser-kit": "^6.3",
"symfony/css-selector": "^6.3",
"symfony/browser-kit": "^6.3|^7.0",
"symfony/css-selector": "^6.3|^7.0",
"symplify/easy-coding-standard": "^11.3"
},
"autoload": {
Expand Down
4 changes: 2 additions & 2 deletions tests/DatabaseTestHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ public static function rebuild(ContainerInterface $container): void
if (file_exists($database)) {
unlink($database);
}
$schema = $connection->createSchemaManager();
$schema->createDatabase($database);

touch($database);

(new SchemaTool($doctrine))
->createSchema($doctrine->getMetadataFactory()->getAllMetadata());
Expand Down

0 comments on commit fc4e672

Please sign in to comment.