-
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Symfony 7 compatibility and deps bump (#133)
* Bump minimum deps compatibility * Add symfony/validator in dev dependencies * Upgrade phpunit.xml.dist format * Fix style
- Loading branch information
Showing
7 changed files
with
65 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,6 @@ jobs: | |
strategy: | ||
matrix: | ||
php-version: | ||
- "8.0" | ||
- "8.1" | ||
- "8.2" | ||
- "8.3" | ||
|
@@ -23,25 +22,25 @@ jobs: | |
fail-fast: false | ||
|
||
services: | ||
database: | ||
mysql: | ||
image: mysql:8 | ||
ports: | ||
- 3306:3306 | ||
options: --health-cmd "mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 10 | ||
env: | ||
MYSQL_ROOT_PASSWORD: odmroot | ||
MYSQL_ROOT_PASSWORD: root | ||
MYSQL_DATABASE: odm | ||
MYSQL_USER: odm | ||
MYSQL_PASSWORD: odm | ||
|
||
steps: | ||
- name: Start PostgreSQL | ||
run: | | ||
sudo systemctl start postgresql.service | ||
pg_isready | ||
sudo -u postgres psql -c "create user odm WITH PASSWORD 'odm';" | ||
sudo -u postgres psql -c "create database odm OWNER odm;" | ||
postgres: | ||
image: postgres:14 | ||
ports: | ||
- 5432:5432 | ||
options: --health-cmd "/usr/bin/pg_isready" --health-interval 10s --health-timeout 5s --health-retries 10 | ||
env: | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_DB: odm | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
|
@@ -61,10 +60,10 @@ jobs: | |
|
||
- name: Run tests (MySQL) | ||
env: | ||
DATABASE_URL: mysql://odm:odm@127.0.0.1/odm?serverVersion=8.0 | ||
DATABASE_URL: mysql://root:root@127.0.0.1:3306/odm?serverVersion=8.0 | ||
run: php vendor/bin/simple-phpunit | ||
|
||
- name: Run tests (PostgreSQL) | ||
env: | ||
DATABASE_URL: postgresql://odm:odm@localhost/odm?serverVersion=14&charset=utf8 | ||
DATABASE_URL: postgresql://postgres:[email protected]:5432/odm?serverVersion=14&charset=utf8 | ||
run: php vendor/bin/simple-phpunit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<phpunit | ||
backupGlobals="false" | ||
colors="true" | ||
bootstrap="tests/bootstrap.php" | ||
> | ||
<php> | ||
<ini name="error_reporting" value="-1" /> | ||
<server name="KERNEL_DIR" value="tests/Fixtures" /> | ||
<server name="KERNEL_CLASS" value="AppKernel" /> | ||
<server name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=7" /> | ||
</php> | ||
|
||
<testsuites> | ||
<testsuite name="Project Test Suite"> | ||
<directory>tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
<filter> | ||
<whitelist> | ||
<directory>.</directory> | ||
<exclude> | ||
<directory>tests</directory> | ||
<directory>vendor</directory> | ||
</exclude> | ||
</whitelist> | ||
</filter> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" colors="true" bootstrap="tests/bootstrap.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"> | ||
<coverage> | ||
<include> | ||
<directory>.</directory> | ||
</include> | ||
<exclude> | ||
<directory>tests</directory> | ||
<directory>vendor</directory> | ||
</exclude> | ||
</coverage> | ||
<php> | ||
<ini name="error_reporting" value="-1"/> | ||
<server name="KERNEL_DIR" value="tests/Fixtures"/> | ||
<server name="KERNEL_CLASS" value="AppKernel"/> | ||
<server name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=7"/> | ||
</php> | ||
<testsuites> | ||
<testsuite name="Project Test Suite"> | ||
<directory>tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,23 +16,33 @@ | |
* | ||
* @author Kévin Dunglas <[email protected]> | ||
*/ | ||
#[ORM\Entity] | ||
class Foo | ||
{ | ||
/** | ||
* @ORM\Column(type="integer") | ||
* | ||
* @ORM\Id | ||
* | ||
* @ORM\GeneratedValue(strategy="AUTO") | ||
*/ | ||
#[ | ||
ORM\Column(type: 'integer'), | ||
ORM\Id, | ||
ORM\GeneratedValue(strategy: 'AUTO'), | ||
] | ||
private $id; | ||
|
||
/** | ||
* @ORM\Column(type="string") | ||
*/ | ||
#[ORM\Column(type: 'string')] | ||
private $name; | ||
|
||
/** | ||
* @ORM\Column(type="json_document", options={"jsonb": true}) | ||
*/ | ||
#[ORM\Column(type: 'json_document', options: ['jsonb' => true])] | ||
private $misc; | ||
|
||
public function getId() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,22 +16,32 @@ | |
* | ||
* @author Kévin Dunglas <[email protected]> | ||
*/ | ||
#[ORM\Entity] | ||
class Product | ||
{ | ||
/** | ||
* @ORM\Column(type="integer") | ||
* | ||
* @ORM\Id | ||
* | ||
* @ORM\GeneratedValue(strategy="AUTO") | ||
*/ | ||
#[ | ||
ORM\Column(type: 'integer'), | ||
ORM\Id, | ||
ORM\GeneratedValue(strategy: 'AUTO'), | ||
] | ||
public $id; | ||
|
||
/** | ||
* @ORM\Column(type="string") | ||
* @ORM\Column(type="string") | ||
*/ | ||
#[ORM\Column(type: 'string')] | ||
public $name; | ||
|
||
/** | ||
* @ORM\Column(type="json_document", options={"jsonb": true}, nullable=true) | ||
*/ | ||
#[ORM\Column(type: 'json_document', nullable: true, options: ['jsonb' => true])] | ||
public $attributes; | ||
} |