-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add PHP 8 compatibility * Increase sulu version * Remove ignore platform reqs * Fix phpstan error * Fix tests on prefer lowest * Apply suggestions from code review Co-authored-by: nnatter <[email protected]> * Fix json tests Co-authored-by: nnatter <[email protected]>
- Loading branch information
1 parent
d46cf05
commit 9317a74
Showing
11 changed files
with
207 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 |
---|---|---|
|
@@ -9,14 +9,42 @@ on: | |
|
||
jobs: | ||
test: | ||
name: 'PHP 7.4 (highest)' | ||
name: 'PHP ${{ matrix.php-version }} (${{ matrix.dependency-versions }}, Lint ${{ matrix.lint }})' | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
DATABASE_URL: mysql://root:[email protected]:3306/su_headless_test?serverVersion=5.7 | ||
DATABASE_CHARSET: utf8mb4 | ||
DATABASE_COLLATE: utf8mb4_unicode_ci | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- php-version: '7.3' | ||
lint: false | ||
coverage: false | ||
dependency-versions: 'lowest' | ||
tools: 'composer:v1' | ||
env: | ||
SYMFONY_DEPRECATIONS_HELPER: disabled | ||
|
||
- php-version: '7.4' | ||
lint: true | ||
coverage: true | ||
dependency-versions: 'highest' | ||
tools: 'composer:v2' | ||
env: | ||
SYMFONY_DEPRECATIONS_HELPER: weak | ||
|
||
- php-version: '8.0' | ||
lint: false | ||
coverage: false | ||
dependency-versions: 'highest' | ||
tools: 'composer:v2' | ||
env: | ||
SYMFONY_DEPRECATIONS_HELPER: weak | ||
|
||
services: | ||
mysql: | ||
image: mysql:5.7 | ||
|
@@ -33,20 +61,22 @@ jobs: | |
- name: Install and configure PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '7.4' | ||
php-version: ${{ matrix.php-version }} | ||
extensions: ctype, iconv, mysql | ||
coverage: pcov | ||
tools: composer | ||
tools: ${{ matrix.tools }} | ||
|
||
- name: Install composer dependencies | ||
uses: ramsey/composer-install@v1 | ||
with: | ||
dependency-versions: 'highest' | ||
dependency-versions: ${{ matrix.dependency-versions }} | ||
composer-options: ${{ matrix.composer-options }} | ||
|
||
- name: Bootstrap test environment | ||
run: composer bootstrap-test-environment | ||
|
||
- name: Lint code | ||
if: ${{ matrix.lint }} | ||
run: composer lint | ||
|
||
- name: Execute unit test cases | ||
|
@@ -56,4 +86,5 @@ jobs: | |
run: composer test -- Tests/Functional --log-junit var/junit.xml | ||
|
||
- name: Check code coverage | ||
if: ${{ matrix.coverage }} | ||
run: php vendor/bin/code-coverage-checker "var/coverage.php" "line" "95" "Content" |
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 |
---|---|---|
|
@@ -35,7 +35,7 @@ | |
"categories": [], | ||
"tags": [], | ||
"images": [], | ||
"segments": [], | ||
"segments": "@[email protected]().optional()", | ||
"icon": [], | ||
"audience_targeting_groups": [] | ||
} | ||
|
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 |
---|---|---|
|
@@ -13,6 +13,7 @@ | |
"template": "default", | ||
"parent": "@uuid@", | ||
"url": "\/test-1", | ||
"path": "@[email protected](\"/test-1\").optional()", | ||
"urls": { | ||
"de": "\/test-1" | ||
}, | ||
|
@@ -36,6 +37,7 @@ | |
"webspaceKey": "sulu_io", | ||
"template": "default", | ||
"parent": "@uuid@", | ||
"path": "@[email protected](\"/test-2\").optional()", | ||
"url": "\/test-2", | ||
"urls": { | ||
"de": "\/test-2" | ||
|
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 |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
"webspaceKey": "sulu_io", | ||
"template": "default", | ||
"parent": "@uuid@", | ||
"path": "@[email protected](\"/test-3\").optional()", | ||
"url": "\/test-3", | ||
"urls": { | ||
"de": "\/test-3" | ||
|
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 |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
"webspaceKey": "sulu_io", | ||
"template": "default", | ||
"parent": "@uuid@", | ||
"path": "@[email protected](\"/test-1\").optional()", | ||
"url": "\/test-1", | ||
"urls": { | ||
"de": "\/test-1" | ||
|
@@ -35,6 +36,7 @@ | |
"webspaceKey": "sulu_io", | ||
"template": "default", | ||
"parent": "@uuid@", | ||
"path": "@[email protected](\"/test-1/test-1a\").optional()", | ||
"url": "/test-1a", | ||
"urls": { | ||
"de": "/test-1a" | ||
|
@@ -59,6 +61,7 @@ | |
"webspaceKey": "sulu_io", | ||
"template": "default", | ||
"parent": "@uuid@", | ||
"path": "@[email protected](\"/test-1/test-1b\").optional()", | ||
"url": "/test-1b", | ||
"urls": { | ||
"de": "/test-1b" | ||
|
@@ -85,6 +88,7 @@ | |
"webspaceKey": "sulu_io", | ||
"template": "default", | ||
"parent": "@uuid@", | ||
"path": "@[email protected](\"/test-2\").optional()", | ||
"url": "\/test-2", | ||
"urls": { | ||
"de": "\/test-2" | ||
|
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 |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
"webspaceKey": "sulu_io", | ||
"template": "default", | ||
"parent": "@uuid@", | ||
"path": "@[email protected](\"/test-1\").optional()", | ||
"url": "\/test-1", | ||
"urls": { | ||
"de": "\/test-1" | ||
|
@@ -36,6 +37,7 @@ | |
"webspaceKey": "sulu_io", | ||
"template": "default", | ||
"parent": "@uuid@", | ||
"path": "@[email protected](\"/test-1/test-1a\").optional()", | ||
"url": "/test-1a", | ||
"urls": { | ||
"de": "/test-1a" | ||
|
@@ -60,6 +62,7 @@ | |
"webspaceKey": "sulu_io", | ||
"template": "default", | ||
"parent": "@uuid@", | ||
"path": "@[email protected](\"/test-2\").optional()", | ||
"url": "\/test-2", | ||
"urls": { | ||
"de": "\/test-2" | ||
|
@@ -84,6 +87,7 @@ | |
"webspaceKey": "sulu_io", | ||
"template": "default", | ||
"parent": "@uuid@", | ||
"path": "@[email protected](\"/test-1/test-1b\").optional()", | ||
"url": "/test-1b", | ||
"urls": { | ||
"de": "/test-1b" | ||
|
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,6 +16,7 @@ | |
"webspaceKey": "sulu_io", | ||
"template": "default", | ||
"parent": "@uuid@", | ||
"path": "@[email protected](\"/test-1\").optional()", | ||
"url": "\/test-1", | ||
"urls": { | ||
"de": "\/test-1" | ||
|
@@ -30,7 +31,7 @@ | |
"categories": [], | ||
"audience_targeting_groups": [], | ||
"tags": [], | ||
"segments": [], | ||
"segments": "@[email protected]().optional()", | ||
"icon": [], | ||
"images": [] | ||
}, | ||
|
@@ -51,6 +52,7 @@ | |
"webspaceKey": "sulu_io", | ||
"template": "default", | ||
"parent": "@uuid@", | ||
"path": "@[email protected](\"/test-2\").optional()", | ||
"url": "\/test-2", | ||
"urls": { | ||
"de": "\/test-2" | ||
|
@@ -65,7 +67,7 @@ | |
"categories": [], | ||
"audience_targeting_groups": [], | ||
"tags": [], | ||
"segments": [], | ||
"segments": "@[email protected]().optional()", | ||
"icon": [ | ||
{ | ||
"id": "@integer@", | ||
|
@@ -106,4 +108,3 @@ | |
} | ||
} | ||
|
||
|
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 |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
"webspaceKey": "sulu_io", | ||
"template": "default", | ||
"parent": "@uuid@", | ||
"path": "@[email protected](\"/test-1/test-1a\").optional()", | ||
"url": "/test-1a", | ||
"urls": { | ||
"de": "/test-1a" | ||
|
@@ -36,6 +37,7 @@ | |
"webspaceKey": "sulu_io", | ||
"template": "default", | ||
"parent": "@uuid@", | ||
"path": "@[email protected](\"/test-1/test-1b\").optional()", | ||
"url": "/test-1b", | ||
"urls": { | ||
"de": "/test-1b" | ||
|
Oops, something went wrong.