From 59c13e46081d49dfcf5fbebe57936d1ad31bf758 Mon Sep 17 00:00:00 2001 From: Vincent Date: Thu, 29 Sep 2022 11:31:37 +0200 Subject: [PATCH] Support psr/log:^3.0 (#131) --- .github/workflows/ci.yml | 42 +++++++++++++++------------------- composer.json | 5 ++-- features/console | 2 +- features/public/index.php | 2 +- tests/ClickwrapTest.php | 2 ++ tests/EmbeddedAuthCodeTest.php | 4 +++- tests/EmbeddedTest.php | 4 +++- tests/HomepageTest.php | 2 ++ tests/RemoteAuthCodeTest.php | 2 ++ tests/RemoteTest.php | 2 ++ 10 files changed, 38 insertions(+), 29 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd12923..acd6fe1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,42 +12,33 @@ on: jobs: tests: - name: Tests PHP ${{ matrix.php }} ${{ matrix.dependency }} (Symfony ${{ matrix.symfony }}) + name: Tests PHP ${{ matrix.php }} (Symfony ${{ matrix.symfony }}) runs-on: ubuntu-latest strategy: matrix: php: - - '7.3' - '7.4' - '8.0' - '8.1' symfony: - '4.4.*' - '5.4.*' - - '6.0.*' - dependency: - - '' - - '--prefer-lowest' - exclude: - - symfony: '6.0.*' - php: '7.3' - - symfony: '6.0.*' - php: '7.4' - - symfony: '5.4.*' - dependency: '--prefer-lowest' - - symfony: '6.0.*' - dependency: '--prefer-lowest' + - '6.1.*' include: - php: '7.4' - dependency: '' symfony: '5.4.*' bootable: true - php: '8.1' - dependency: '' - symfony: '6.0.*' + symfony: '6.1.*' coverage: '--coverage-clover build/logs/phpunit/clover.xml' bootable: true quality: true + exclude: + # Symfony 6.1 requires PHP 8.1 + - php: '7.4' + symfony: '6.1.*' + - php: '8.0' + symfony: '6.1.*' fail-fast: false steps: - name: Checkout @@ -80,7 +71,7 @@ jobs: run: composer config extra.symfony.require "${{ matrix.symfony }}" - name: Update project dependencies - run: composer update --no-progress --ansi --prefer-stable ${{ matrix.dependency }} + run: composer update --no-progress --ansi --prefer-stable - name: Bundle is bootable if: matrix.bootable && github.event_name == 'push' @@ -121,6 +112,13 @@ jobs: DOCUSIGN_PASSWORD: ${{ secrets.DOCUSIGN_PASSWORD }} run: vendor/bin/simple-phpunit ${{ matrix.coverage }} + - name: Upload coverage artifacts + if: failure() + uses: actions/upload-artifact@v3 + with: + name: panther-screenshots-${{ matrix.php }} + path: screenshots + - name: Run bootable PHPUnit tests env: DOCUSIGN_INTEGRATION_KEY: ${{ secrets.DOCUSIGN_INTEGRATION_KEY }} @@ -133,13 +131,11 @@ jobs: DOCUSIGN_DEFAULT_SIGNER_EMAIL: ${{ secrets.DOCUSIGN_DEFAULT_SIGNER_EMAIL }} DOCUSIGN_EMAIL: ${{ secrets.DOCUSIGN_EMAIL }} DOCUSIGN_PASSWORD: ${{ secrets.DOCUSIGN_PASSWORD }} - run: | - composer require --dev nyholm/symfony-bundle-test:dev-master - vendor/bin/simple-phpunit --group bootable + run: vendor/bin/simple-phpunit --group bootable - name: Upload coverage artifacts if: matrix.coverage != '' - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v3 with: name: build-php${{ matrix.php }} path: build diff --git a/composer.json b/composer.json index 64df73e..4cb529a 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ "docusign/esign-client": "^5.0 || ^6.0", "lcobucci/jwt": "^3.3.1 || ^4.0", "league/flysystem": "^1.1 || ^2.3", - "psr/log": "^1.1 || ^2.0", + "psr/log": "^1.1 || ^2.0 || ^3.0", "symfony/config": "^4.4 || ^5.0 || ^6.0", "symfony/dependency-injection": "^4.4 || ^5.0 || ^6.0", "symfony/event-dispatcher-contracts": "^1.0 || ^2.0 || ^3.0", @@ -46,13 +46,14 @@ "dbrekelmans/bdi": "^1.0", "doctrine/annotations": "^1.11", "league/flysystem-bundle": "^1.2 || ^2.0", + "nyholm/symfony-bundle-test": "^2.0", "phpspec/prophecy": "^1.12", "phpstan/phpstan": "^1.0", "psr/event-dispatcher": "^1.0", "symfony/console": "^4.4 || ^5.0 || ^6.0", "symfony/css-selector": "^4.4 || ^5.0 || ^6.0", - "symfony/debug": "^4.4", "symfony/dotenv": "^4.4 || ^5.0 || ^6.0", + "symfony/error-handler": "^4.4 || ^5.0 || ^6.0", "symfony/monolog-bundle": "^3.5", "symfony/panther": "^1.0 || ^2.0", "symfony/phpunit-bridge": "^5.1 || ^6.0", diff --git a/features/console b/features/console index 897fe94..8510019 100755 --- a/features/console +++ b/features/console @@ -4,7 +4,7 @@ use DocusignBundle\E2e\Kernel; use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Component\Console\Input\ArgvInput; -use Symfony\Component\Debug\Debug; +use Symfony\Component\ErrorHandler\Debug; set_time_limit(0); diff --git a/features/public/index.php b/features/public/index.php index 16f101a..d908c1c 100644 --- a/features/public/index.php +++ b/features/public/index.php @@ -12,7 +12,7 @@ declare(strict_types=1); use DocusignBundle\E2e\Kernel; -use Symfony\Component\Debug\Debug; +use Symfony\Component\ErrorHandler\Debug; use Symfony\Component\HttpFoundation\Request; require dirname(__DIR__).'/bootstrap.php'; diff --git a/tests/ClickwrapTest.php b/tests/ClickwrapTest.php index 81c553b..99ad602 100644 --- a/tests/ClickwrapTest.php +++ b/tests/ClickwrapTest.php @@ -17,6 +17,8 @@ /** * @author Vincent Chalamon + * + * @group functional */ final class ClickwrapTest extends PantherTestCase { diff --git a/tests/EmbeddedAuthCodeTest.php b/tests/EmbeddedAuthCodeTest.php index f5198a5..7fafff3 100644 --- a/tests/EmbeddedAuthCodeTest.php +++ b/tests/EmbeddedAuthCodeTest.php @@ -17,6 +17,8 @@ /** * @author Vincent Chalamon + * + * @group functional */ final class EmbeddedAuthCodeTest extends PantherTestCase { @@ -96,7 +98,7 @@ public function testICanSignAnEmbeddedDocument(): void $crawler->filter('label[for=disclosureAccepted]')->click(); } - $crawler->filter('#action-bar-btn-continue')->click(); + $client->executeScript("$('#action-bar-btn-continue').click()"); $crawler = $client->waitFor('.page-tabs .signature-tab > button'); // Wait for "Comment tooltip" button (optional use-case) diff --git a/tests/EmbeddedTest.php b/tests/EmbeddedTest.php index 6f0165e..6b3cbf4 100644 --- a/tests/EmbeddedTest.php +++ b/tests/EmbeddedTest.php @@ -17,6 +17,8 @@ /** * @author Vincent Chalamon + * + * @group functional */ final class EmbeddedTest extends PantherTestCase { @@ -70,7 +72,7 @@ public function testICanSignAnEmbeddedDocument(): void $crawler->filter('label[for=disclosureAccepted]')->click(); } - $crawler->filter('#action-bar-btn-continue')->click(); + $client->executeScript("$('#action-bar-btn-continue').click()"); $crawler = $client->waitFor('.page-tabs .signature-tab > button'); // Wait for "Comment tooltip" button (optional use-case) diff --git a/tests/HomepageTest.php b/tests/HomepageTest.php index de17e84..66471cb 100644 --- a/tests/HomepageTest.php +++ b/tests/HomepageTest.php @@ -17,6 +17,8 @@ /** * @author Vincent Chalamon + * + * @group functional */ final class HomepageTest extends PantherTestCase { diff --git a/tests/RemoteAuthCodeTest.php b/tests/RemoteAuthCodeTest.php index 02b26c2..1d6a246 100644 --- a/tests/RemoteAuthCodeTest.php +++ b/tests/RemoteAuthCodeTest.php @@ -17,6 +17,8 @@ /** * @author Vincent Chalamon + * + * @group functional */ final class RemoteAuthCodeTest extends PantherTestCase { diff --git a/tests/RemoteTest.php b/tests/RemoteTest.php index 0e49119..4112d06 100644 --- a/tests/RemoteTest.php +++ b/tests/RemoteTest.php @@ -17,6 +17,8 @@ /** * @author Vincent Chalamon + * + * @group functional */ final class RemoteTest extends PantherTestCase {