-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Support PHP 8.0 and Symfony 5 * Use github workflows * Removed unused security check
- Loading branch information
Thomas Jarrand
authored
Feb 25, 2022
1 parent
c3bdb2c
commit 4a6459e
Showing
14 changed files
with
304 additions
and
112 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 |
---|---|---|
@@ -0,0 +1,115 @@ | ||
name: 'CI' | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
|
||
lint: | ||
name: 'Lint' | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
|
||
steps: | ||
- name: 'Checkout' | ||
uses: actions/checkout@v2 | ||
|
||
- name: 'Setup PHP' | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
coverage: "none" | ||
extensions: "json" | ||
ini-values: "memory_limit=-1" | ||
php-version: "8.0" | ||
|
||
- name: 'Determine composer cache directory' | ||
id: composer-cache | ||
run: echo "::set-output name=directory::$(composer config cache-dir)" | ||
|
||
- name: 'Cache composer dependencies' | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.directory }} | ||
key: 7.4-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: 7.4-composer- | ||
|
||
- name: 'Install dependencies' | ||
id: deps | ||
run: | | ||
echo "::group::composer update" | ||
composer update --no-progress --ansi | ||
echo "::endgroup::" | ||
echo "::group::install phpunit" | ||
# Required for PhpStan | ||
vendor/bin/simple-phpunit install | ||
echo "::endgroup::" | ||
- name: 'Composer validate' | ||
if: always() && steps.deps.outcome == 'success' | ||
run: composer validate --strict | ||
|
||
- name: 'PHP CS Fixer' | ||
if: always() && steps.deps.outcome == 'success' | ||
run: vendor/bin/php-cs-fixer fix --dry-run --diff | ||
|
||
- name: 'PhpStan' | ||
if: always() && steps.deps.outcome == 'success' | ||
run: vendor/bin/phpstan analyse | ||
|
||
tests: | ||
name: 'Tests' | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
|
||
strategy: | ||
fail-fast: false # don't cancel other matrix jobs on failure | ||
matrix: | ||
php: [ '7.4', '8.0' ] | ||
|
||
steps: | ||
- name: 'Checkout' | ||
uses: actions/checkout@v2 | ||
|
||
- name: 'Setup PHP' | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
coverage: "none" | ||
extensions: "json" | ||
ini-values: "memory_limit=-1" | ||
php-version: "${{ matrix.php }}" | ||
|
||
- name: 'Determine composer cache directory' | ||
id: composer-cache | ||
run: echo "::set-output name=directory::$(composer config cache-dir)" | ||
|
||
- name: 'Cache composer dependencies' | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.directory }} | ||
key: ${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: ${{ matrix.php }}-composer- | ||
|
||
#- name: 'Fixup Composer' | ||
# if: matrix.php == 8.0 | ||
# run: | | ||
# echo "::group::Fixup Composer platform config for third-parties deps not PHP 8 ready yet" | ||
# composer config platform.php 7.4.99 | ||
# echo "::endgroup::" | ||
|
||
- name: 'Install dependencies' | ||
run: | | ||
echo "::group::composer update" | ||
composer update --no-progress --ansi | ||
echo "::endgroup::" | ||
echo "::group::install phpunit" | ||
vendor/bin/simple-phpunit install | ||
echo "::endgroup::" | ||
- name: 'Run tests' | ||
run: vendor/bin/simple-phpunit --testdox | ||
|
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,2 +1,13 @@ | ||
/vendor/* | ||
###> symfony/phpunit-bridge ### | ||
.phpunit | ||
.phpunit.result.cache | ||
/phpunit.xml | ||
###< symfony/phpunit-bridge ###### | ||
|
||
###> friendsofphp/php-cs-fixer ### | ||
/.php-cs-fixer.php | ||
/.php-cs-fixer.cache | ||
###< friendsofphp/php-cs-fixer ### | ||
|
||
/vendor/ | ||
composer.lock |
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,29 @@ | ||
<?php | ||
|
||
$finder = (new PhpCsFixer\Finder())->in([ | ||
__DIR__ | ||
]); | ||
|
||
return (new PhpCsFixer\Config()) | ||
->setFinder($finder) | ||
->setCacheFile('.php-cs-fixer.cache') // forward compatibility with 3.x line | ||
->setRiskyAllowed(true) | ||
->setRules([ | ||
'@PSR12' => true, | ||
'@Symfony' => true, | ||
'strict_param' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'concat_space' => ['spacing' => 'one'], | ||
'declare_strict_types' => true, | ||
'native_function_invocation' => ['include' => ['@compiler_optimized']], | ||
'no_superfluous_phpdoc_tags' => true, | ||
'ordered_imports' => true, | ||
'phpdoc_annotation_without_dot' => false, | ||
'phpdoc_order' => true, | ||
'phpdoc_summary' => false, | ||
'simplified_null_return' => false, | ||
'single_line_throw' => false, | ||
'void_return' => true, | ||
'yoda_style' => false, | ||
]) | ||
; |
This file was deleted.
Oops, something went wrong.
2 changes: 2 additions & 0 deletions
2
DependencyInjection/Compiler/OverrideRequestHandlerCompilerPass.php
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2021 élao | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,29 @@ | ||
########### | ||
# Install # | ||
########### | ||
|
||
install: | ||
composer update | ||
|
||
######## | ||
# Lint # | ||
######## | ||
|
||
lint: lint.php-cs-fixer lint.phpstan lint.composer | ||
|
||
lint.php-cs-fixer: | ||
vendor/bin/php-cs-fixer fix | ||
|
||
lint.phpstan: | ||
vendor/bin/phpstan analyse . | ||
|
||
lint.composer: | ||
composer validate --strict | ||
|
||
######## | ||
# Test # | ||
######## | ||
|
||
## Test | ||
test: | ||
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
Oops, something went wrong.