diff --git a/.github/workflows/test-application.yaml b/.github/workflows/test-application.yaml
index 64ab2b95..c7022446 100644
--- a/.github/workflows/test-application.yaml
+++ b/.github/workflows/test-application.yaml
@@ -20,6 +20,7 @@ jobs:
database: postgres
dependency-versions: 'lowest'
tools: 'composer:v2'
+ phpunit-config: 'phpunit-9.xml.dist'
env:
SYMFONY_DEPRECATIONS_HELPER: disabled
DATABASE_URL: postgres://postgres:postgres@127.0.0.1/sulu_form_test?serverVersion=12.5
@@ -30,6 +31,7 @@ jobs:
database: mysql
dependency-versions: 'highest'
tools: 'composer:v2'
+ phpunit-config: 'phpunit-9.xml.dist'
env:
SYMFONY_DEPRECATIONS_HELPER: weak
DATABASE_URL: mysql://root:root@127.0.0.1/sulu_form_test?serverVersion=5.7
@@ -57,6 +59,16 @@ jobs:
DATABASE_COLLATE: utf8mb4_unicode_ci
- php-version: '8.2'
+ database: postgres
+ dependency-versions: 'highest'
+ tools: 'composer:v2'
+ env:
+ SYMFONY_DEPRECATIONS_HELPER: weak
+ DATABASE_URL: postgres://postgres:postgres@127.0.0.1/sulu_form_test?serverVersion=12.5
+ DATABASE_CHARSET: UTF8
+ DATABASE_COLLATE:
+
+ - php-version: '8.3'
database: mysql
dependency-versions: 'highest'
tools: 'composer:v2'
@@ -66,10 +78,11 @@ jobs:
DATABASE_CHARSET: utf8mb4
DATABASE_COLLATE: utf8mb4_unicode_ci
- - php-version: '8.3'
+ - php-version: '8.4'
database: mysql
dependency-versions: 'highest'
tools: 'composer:v2'
+ composer-options: '--ignore-platform-reqs'
env:
SYMFONY_DEPRECATIONS_HELPER: weak
DATABASE_URL: mysql://root:root@127.0.0.1/sulu_form_test?serverVersion=5.7
@@ -96,7 +109,7 @@ jobs:
steps:
- name: Checkout project
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
- name: Install and configure PHP
uses: shivammathur/setup-php@v2
@@ -106,11 +119,13 @@ jobs:
tools: ${{ matrix.tools }}
coverage: none
- - name: Remove not required tooling for tests
- run: composer remove php-cs-fixer/shim "*phpstan*" --dev --no-update
+ - name: Remove Lint Tools
+ # These tools are not required to run tests, so we are removing them to improve dependency resolving and
+ # testing lowest versions.
+ run: composer remove "*php-cs-fixer*" "*phpstan*" "*rector*" --dev --no-update
- name: Install composer dependencies
- uses: ramsey/composer-install@v1
+ uses: ramsey/composer-install@v2
with:
dependency-versions: ${{matrix.dependency-versions}}
composer-options: ${{ matrix.composer-options }}
@@ -120,7 +135,7 @@ jobs:
env: ${{ matrix.env }}
- name: Execute test cases
- run: time composer test
+ run: time composer test -- --config ${{ matrix.phpunit-config || 'phpunit.xml.dist' }}
env: ${{ matrix.env }}
lint:
@@ -131,7 +146,7 @@ jobs:
steps:
- name: Checkout project
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
- name: Install and configure PHP
uses: shivammathur/setup-php@v2
@@ -142,7 +157,7 @@ jobs:
coverage: none
- name: Install composer dependencies
- uses: ramsey/composer-install@v1
+ uses: ramsey/composer-install@v2
with:
dependency-versions: ${{matrix.dependency-versions}}
composer-options: ${{ matrix.composer-options }}
diff --git a/Tests/Functional/Mail/HelperTestCase.php b/Tests/Functional/Mail/HelperTestCase.php
index 84da9504..a6ab71f6 100644
--- a/Tests/Functional/Mail/HelperTestCase.php
+++ b/Tests/Functional/Mail/HelperTestCase.php
@@ -33,8 +33,6 @@ class HelperTestCase extends SuluTestCase
protected function setUp(): void
{
- static::$kernel = null; // requires as Symfony 4.4 does not unset on tearDown
-
$this->client = $this->createWebsiteClient();
$this->purgeDatabase();
$this->initPhpcr();
diff --git a/composer.json b/composer.json
index edff35e5..a61ef1b7 100644
--- a/composer.json
+++ b/composer.json
@@ -49,7 +49,7 @@
"phpstan/phpstan-doctrine": "^1.0",
"phpstan/phpstan-phpunit": "^1.0",
"phpstan/phpstan-symfony": "^1.0",
- "phpunit/phpunit": "^8.0",
+ "phpunit/phpunit": "^9.6 || ^10.0",
"sendinblue/api-v3-sdk": "^8.0",
"symfony/browser-kit": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/dotenv": "^4.4 || ^5.0 || ^6.0 || ^7.0",
diff --git a/phpunit-9.xml.dist b/phpunit-9.xml.dist
new file mode 100644
index 00000000..0e62f3be
--- /dev/null
+++ b/phpunit-9.xml.dist
@@ -0,0 +1,24 @@
+
+
+
+
+ ./Tests
+
+
+
+
+
+ .
+
+ Resources/
+ Tests/
+ vendor/
+
+
+
+
+
+
+
+
+
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index bbaf9804..f355e585 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -1,25 +1,24 @@
-
+
./Tests
-
-
- .
-
- Resources/
- Tests/
- vendor/
-
-
-
-
-
+
+