-
-
Notifications
You must be signed in to change notification settings - Fork 13
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 * Update src/DependencyInjection/Configuration.php Co-authored-by: Grégoire Hébert <[email protected]> * bump php version Co-authored-by: Grégoire Hébert <[email protected]>
- Loading branch information
1 parent
c516006
commit 3092096
Showing
34 changed files
with
254 additions
and
167 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,64 @@ | ||
# EditorConfig helps developers define and maintain consistent | ||
# coding styles between different editors and IDEs | ||
# editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
# Change these settings to your own preference | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
# We recommend you to keep these unchanged | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.feature] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.js] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.json] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.php] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[*.sh] | ||
indent_style = tab | ||
indent_size = 4 | ||
|
||
[*.xml] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[*.{yaml,yml}] | ||
indent_style = space | ||
indent_size = 4 | ||
trim_trailing_whitespace = false | ||
|
||
[.github/workflows/*.{yaml,yml}] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[.php_cs{,.dist}] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[composer.json] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[phpunit.xml{,.dist}] | ||
indent_style = space | ||
indent_size = 4 |
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 |
---|---|---|
|
@@ -2,102 +2,104 @@ name: CI | |
|
||
on: | ||
schedule: | ||
- cron: 0 2 * * 1-5 | ||
# Every sunday at 02:00 | ||
- cron: 0 2 * * 0 | ||
pull_request: | ||
push: | ||
branches: | ||
- v5 | ||
|
||
env: | ||
COVERAGE: '0' | ||
EXT_PCOV_VERSION: '1.0.6' | ||
|
||
jobs: | ||
tests: | ||
name: Tests PHP ${{ matrix.php }} ${{ matrix.dependency }} (Symfony ${{ matrix.symfony }}) | ||
runs-on: ubuntu-latest | ||
container: | ||
image: php:${{ matrix.php }} | ||
options: >- | ||
--tmpfs /tmp:exec | ||
strategy: | ||
# https://github.community/t5/GitHub-Actions/GitHub-Actions-Matrix-options-dont-work-as-documented/m-p/29558 | ||
matrix: | ||
php: | ||
- '7.2' | ||
- '7.3' | ||
- '7.4' | ||
- 'rc' | ||
symfony: | ||
- '4.4.*' | ||
- '5.0.*' | ||
include: | ||
- php: '7.4' | ||
coverage: true | ||
- '5.1.*' | ||
dependency: | ||
- '' | ||
- 'lowest' | ||
include: | ||
- php: '7.4' | ||
dependency: '' | ||
symfony: '5.1.*' | ||
coverage: true | ||
bootable: true | ||
exclude: | ||
- symfony: '4.4.*' | ||
dependency: 'lowest' | ||
fail-fast: false | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
|
||
- name: "Cache dependencies installed with composer" | ||
uses: actions/cache@v1 | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
path: ~/.composer/cache | ||
key: ${{ matrix.php }}-composer-${{ matrix.dependency }}-${{ hashFiles('**/composer.json') }} | ||
restore-keys: | | ||
${{ matrix.php }}-composer-${{ matrix.dependency }}- | ||
- name: Enable code coverage | ||
if: matrix.coverage && matrix.dependency == '' | ||
run: echo "COVERAGE=1" >> $GITHUB_ENV | ||
php-version: ${{ matrix.php }} | ||
extensions: composer:v2, flex | ||
coverage: pcov | ||
tools: php-cs-fixer | ||
|
||
- name: Install system packages | ||
run: | | ||
apt-get update | ||
apt-get install -y --no-install-recommends \ | ||
unzip\ | ||
libzip-dev \ | ||
chromium \ | ||
gnupg | ||
docker-php-ext-install zip | ||
- name: Install pcov PHP extension | ||
if: env.COVERAGE == '1' | ||
run: | | ||
pecl install pcov-$EXT_PCOV_VERSION | ||
docker-php-ext-install sockets | ||
docker-php-ext-enable pcov sockets | ||
- name: Get Composer Cache Directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Install Composer | ||
run: curl -sS -o - https://raw.githubusercontent.com/composer/getcomposer.org/ba13e3fc70f1c66250d1ea7ea4911d593aa1dba5/web/installer | php -- --install-dir=/usr/local/bin --filename=composer --quiet | ||
- name: Cache dependencies | ||
uses: actions/cache@v1 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: ${{ runner.os }}-composer- | ||
|
||
- name: Configure Symfony | ||
run: | | ||
composer global require symfony/flex | ||
composer config extra.symfony.require "${{ matrix.symfony }}" | ||
run: composer config extra.symfony.require "${{ matrix.symfony }}" | ||
|
||
- name: Update project dependencies | ||
if: matrix.dependency == '' | ||
run: php -d memory_limit=-1 `which composer` update --no-progress --no-suggest --ansi --prefer-stable | ||
run: composer update --no-progress --ansi --prefer-stable ${{ matrix.composer }} | ||
|
||
- name: Update project dependencies lowest | ||
if: matrix.dependency == 'lowest' | ||
run: composer update --no-progress --ansi --prefer-lowest --prefer-stable | ||
|
||
- name: Disable deprecations notices for lowest dependencies | ||
if: matrix.dependency == 'lowest' | ||
run: echo "SYMFONY_DEPRECATIONS_HELPER=weak" >> $GITHUB_ENV | ||
|
||
- name: Bundle is bootable | ||
if: matrix.bootable | ||
env: | ||
SKELETON_VERSION: ${{matrix.symfony}} | ||
run: | | ||
php -d memory_limit=-1 `which composer` remove --dev --no-progress --no-update --ansi league/flysystem-bundle | ||
php -d memory_limit=-1 `which composer` update --no-progress --no-suggest --ansi --prefer-stable --prefer-lowest | ||
composer create-project "symfony/skeleton:${SKELETON_VERSION}" flex | ||
cd flex | ||
composer config extra.symfony.allow-contrib true | ||
composer req --ignore-platform-reqs gheb/docusign-bundle | ||
- name: Run php-cs-fixer tests | ||
if: matrix.php != 'rc' | ||
run: php-cs-fixer fix --diff --dry-run | ||
|
||
- name: Install chromium | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y --no-install-recommends chromium-browser | ||
- name: Run phpstan tests | ||
if: matrix.dependency == '' | ||
run: php -d memory_limit=-1 vendor/bin/phpstan analyze | ||
run: vendor/bin/phpstan analyze | ||
|
||
- name: Run phpstan tests lowest | ||
if: matrix.dependency == 'lowest' | ||
run: php -d memory_limit=-1 vendor/bin/phpstan analyze -c phpstan.neon.lowest.dist | ||
|
||
- name: Run php-cs-fixer tests | ||
run: vendor/bin/php-cs-fixer fix --dry-run --diff | ||
run: vendor/bin/phpstan analyze -c phpstan.neon.lowest.dist | ||
|
||
- name: Prepare PHPUnit tests | ||
env: | ||
|
@@ -107,7 +109,7 @@ jobs: | |
openssl aes-256-cbc -d -a -pbkdf2 -salt -in features/var/jwt/docusign.pem.enc -out features/var/jwt/docusign.pem -pass env:DOCUSIGN_RSA_PASSPHRASE | ||
- name: Run PHPUnit tests with coverage | ||
if: env.COVERAGE == '1' | ||
if: matrix.coverage | ||
env: | ||
DOCUSIGN_INTEGRATION_KEY: ${{ secrets.DOCUSIGN_INTEGRATION_KEY }} | ||
DOCUSIGN_USER_GUID: ${{ secrets.DOCUSIGN_USER_GUID }} | ||
|
@@ -119,10 +121,10 @@ jobs: | |
DOCUSIGN_DEFAULT_SIGNER_EMAIL: ${{ secrets.DOCUSIGN_DEFAULT_SIGNER_EMAIL }} | ||
DOCUSIGN_EMAIL: ${{ secrets.DOCUSIGN_EMAIL }} | ||
DOCUSIGN_PASSWORD: ${{ secrets.DOCUSIGN_PASSWORD }} | ||
run: vendor/bin/phpunit --coverage-clover build/logs/phpunit/clover.xml --colors=always --testdox | ||
run: vendor/bin/simple-phpunit --coverage-clover build/logs/phpunit/clover.xml --colors=always --testdox | ||
|
||
- name: Run PHPUnit tests | ||
if: env.COVERAGE == '0' | ||
if: matrix.coverage == '' | ||
env: | ||
DOCUSIGN_INTEGRATION_KEY: ${{ secrets.DOCUSIGN_INTEGRATION_KEY }} | ||
DOCUSIGN_USER_GUID: ${{ secrets.DOCUSIGN_USER_GUID }} | ||
|
@@ -134,27 +136,26 @@ jobs: | |
DOCUSIGN_DEFAULT_SIGNER_EMAIL: ${{ secrets.DOCUSIGN_DEFAULT_SIGNER_EMAIL }} | ||
DOCUSIGN_EMAIL: ${{ secrets.DOCUSIGN_EMAIL }} | ||
DOCUSIGN_PASSWORD: ${{ secrets.DOCUSIGN_PASSWORD }} | ||
run: vendor/bin/phpunit --colors=always --testdox | ||
run: vendor/bin/simple-phpunit --colors=always --testdox | ||
|
||
- name: Upload test artifacts | ||
if: always() | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: build-php${{ matrix.php }} | ||
path: build | ||
|
||
- name: Upload coverage results to Codecov | ||
if: env.COVERAGE == '1' | ||
if: matrix.coverage | ||
uses: codecov/[email protected] | ||
with: | ||
name: phpunit-php${{ matrix.php }} | ||
flags: phpunit | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
- name: Upload coverage results to Coveralls | ||
if: env.COVERAGE == '1' | ||
if: matrix.coverage | ||
env: | ||
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
composer global require --prefer-dist --no-progress --no-suggest --ansi cedx/coveralls | ||
composer global require --prefer-dist --no-progress --ansi cedx/coveralls | ||
$HOME/.composer/vendor/bin/coveralls build/logs/phpunit/clover.xml |
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 |
---|---|---|
|
@@ -23,10 +23,10 @@ | |
"email": "[email protected]" | ||
}, | ||
"require": { | ||
"php": "^7.2", | ||
"php": ">=7.2", | ||
"ext-SimpleXML": "*", | ||
"docusign/esign-client": "^3.0", | ||
"lcobucci/jwt": "^3.3.1", | ||
"lcobucci/jwt": "^3.3.1 || ^4.0-dev", | ||
"league/flysystem": "^1.0.8", | ||
"psr/log": "^1.1", | ||
"symfony/config": "^4.4 || ^5.0", | ||
|
@@ -43,24 +43,23 @@ | |
"webmozart/assert": "^1.5" | ||
}, | ||
"require-dev": { | ||
"friendsofphp/php-cs-fixer": "^2.16.2", | ||
"doctrine/annotations": "^1.11", | ||
"league/flysystem-bundle": "^1.2", | ||
"nyholm/symfony-bundle-test": "^1.6.1", | ||
"phpspec/prophecy": "^1.9", | ||
"nyholm/symfony-bundle-test": "dev-master", | ||
"phpstan/phpstan": "^0.12.18", | ||
"phpunit/phpunit": "^7.5.2 || ^8.0", | ||
"psr/event-dispatcher": "^1.0", | ||
"symfony/console": "^4.4 || ^5.0", | ||
"symfony/css-selector": "^4.4 || ^5.0", | ||
"symfony/debug": "^4.4 || ^5.0", | ||
"symfony/dotenv": "^4.4 || ^5.0", | ||
"symfony/monolog-bundle": "^3.5", | ||
"symfony/panther": "^0.6.1", | ||
"symfony/phpunit-bridge": "^4.4 || ^5.0", | ||
"symfony/polyfill-php72": "^1.9", | ||
"symfony/process": "^4.4 || ^5.0", | ||
"symfony/profiler-pack": "^1.0", | ||
"symfony/security-bundle": "^4.4 || ^5.0", | ||
"symfony/twig-bundle": "^4.4 || ^5.0", | ||
"symfony/web-server-bundle": "^4.4 || ^5.0" | ||
"symfony/twig-bundle": "^4.4 || ^5.0" | ||
}, | ||
"suggest": { | ||
"league/flysystem-bundle": "For Symfony >4.2 - Allow the use of the official adapter system instead of the compat layer.", | ||
|
@@ -74,9 +73,18 @@ | |
"autoload-dev": { | ||
"psr-4": { | ||
"DocusignBundle\\Tests\\": "tests/", | ||
"DocusignBundle\\E2e\\": "features/" | ||
"DocusignBundle\\E2e\\": "features/src/", | ||
"PHPUnit\\": "vendor/bin/.phpunit/phpunit/src" | ||
} | ||
}, | ||
"scripts": { | ||
"post-install-cmd": [ | ||
"vendor/bin/simple-phpunit --version" | ||
], | ||
"post-update-cmd": [ | ||
"vendor/bin/simple-phpunit --version" | ||
] | ||
}, | ||
"config": { | ||
"sort-packages": true | ||
}, | ||
|
Oops, something went wrong.