-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Ci compatibility to Sulu 2.6 compatibility and fix ProphecyTrait …
…warning (#55) * Fix prophecy requirement * Split Test and Lint task * Fix phpstan error * Remove lint flag * Fix PHP 7.2 compatibility * Fix lint * Fix phpspec/prophecy-phpunit compatibility * Fix check in Kernel
- Loading branch information
1 parent
62c1224
commit 222ea12
Showing
9 changed files
with
80 additions
and
18 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 |
---|---|---|
|
@@ -20,37 +20,41 @@ jobs: | |
matrix: | ||
include: | ||
- php-version: '7.2' | ||
lint: false | ||
dependency-versions: 'lowest' | ||
tools: 'composer:v1' | ||
tools: 'composer:v2' | ||
env: | ||
SYMFONY_DEPRECATIONS_HELPER: disabled | ||
|
||
- php-version: '7.4' | ||
lint: true | ||
dependency-versions: 'highest' | ||
tools: 'composer:v2' | ||
env: | ||
SYMFONY_DEPRECATIONS_HELPER: disabled | ||
|
||
- php-version: '8.0' | ||
lint: true | ||
dependency-versions: 'highest' | ||
tools: 'composer:v2' | ||
env: | ||
SYMFONY_DEPRECATIONS_HELPER: disabled | ||
|
||
- php-version: '8.1' | ||
lint: true | ||
dependency-versions: 'highest' | ||
tools: 'composer:v2' | ||
env: | ||
SYMFONY_DEPRECATIONS_HELPER: disabled | ||
|
||
- php-version: '8.2' | ||
lint: true | ||
dependency-versions: 'highest' | ||
tools: 'composer:v2' | ||
env: | ||
SYMFONY_DEPRECATIONS_HELPER: disabled | ||
|
||
- php-version: '8.3' | ||
dependency-versions: 'highest' | ||
tools: 'composer:v2' | ||
env: | ||
SYMFONY_DEPRECATIONS_HELPER: weak | ||
|
||
services: | ||
mysql: | ||
image: mysql:5.7 | ||
|
@@ -62,7 +66,7 @@ jobs: | |
|
||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install and configure PHP | ||
uses: shivammathur/setup-php@v2 | ||
|
@@ -71,20 +75,48 @@ jobs: | |
extensions: 'mysql, gd' | ||
tools: ${{ matrix.tools }} | ||
|
||
- name: Remove phpspec/prophecy-phpunit | ||
if: ${{ matrix.php-version == '7.2' }} | ||
run: composer remove phpspec/prophecy-phpunit --no-update --dev | ||
|
||
- name: Remove not required test tooling | ||
run: composer remove "*php-cs-fixer*" "*phpstan*" --no-update --dev | ||
|
||
- name: Install composer dependencies | ||
uses: ramsey/composer-install@v1 | ||
uses: ramsey/composer-install@v2 | ||
with: | ||
dependency-versions: ${{matrix.dependency-versions}} | ||
|
||
- name: Bootstrap test environment | ||
run: composer bootstrap-test-environment | ||
env: ${{ matrix.env }} | ||
|
||
- name: Lint code | ||
if: ${{ matrix.lint }} | ||
run: composer lint | ||
env: ${{ matrix.env }} | ||
|
||
- name: Execute test cases | ||
run: composer test | ||
env: ${{ matrix.env }} | ||
|
||
lint: | ||
name: 'PHP Lint' | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
DATABASE_URL: 'mysql://root:[email protected]/sulu_comment_test?serverVersion=5.7' | ||
|
||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install and configure PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.3 | ||
extensions: 'mysql, gd' | ||
tools: 'composer:v2' | ||
|
||
- name: Install composer dependencies | ||
uses: ramsey/composer-install@v2 | ||
with: | ||
dependency-versions: 'highest' | ||
|
||
- name: Lint code | ||
run: composer lint |
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
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
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of Sulu. | ||
* | ||
* (c) Sulu GmbH | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
* with this source code in the file LICENSE. | ||
*/ | ||
|
||
namespace Prophecy\PhpUnit; // BC bridge for PHP 7.2 where we can not install phpspec/prophecy-phpunit package | ||
|
||
if (!\trait_exists(ProphecyTrait::class)) { | ||
trait ProphecyTrait | ||
{ | ||
} | ||
} |
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