Skip to content

Commit

Permalink
chore: require symfony/psr7-pack but remove it in CI
Browse files Browse the repository at this point in the history
This way we improve the DX (phpstan, running cypress in local), but we remove it in the CI to check if Behat bridge still works
  • Loading branch information
Kocal committed May 31, 2021
1 parent 13b0576 commit 47efa8d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 30 deletions.
19 changes: 0 additions & 19 deletions .github/psr_http_message_bridge.yaml

This file was deleted.

15 changes: 7 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,10 @@ jobs:
with:
node-version: ${{ env.NODE_VERSION }}

- run: composer install --prefer-dist --no-interaction --no-progress
- run: cp .github/psr_http_message_bridge.yaml fixtures/applications/Symfony/config/packages
- run: cp .github/nyholm_psr7.yaml fixtures/applications/Symfony/config/packages
- run: composer require symfony/psr7-pack # To make PHPStan and me happy, it prevent me to write stubs for PHPStan

- run: composer validate --strict

- run: composer install --prefer-dist --no-interaction --no-progress

- run: composer phpstan

- run: composer php-cs-fixer@ci
Expand Down Expand Up @@ -99,6 +96,11 @@ jobs:
if: matrix.config.SYMFONY_VERSION
run: echo "SYMFONY_REQUIRE=${{ matrix.config.SYMFONY_VERSION }}" >> $GITHUB_ENV

# Remove PSR-7 related things which are only needed for Cypress.
- run: |
rm fixtures/applications/Symfony/config/packages/nyholm_psr7.yaml
composer remove symfony/psr7-pack
- name: Install composer dependencies
run: composer update ${{ matrix.config.COMPOSER_FLAGS }} --prefer-dist --no-interaction --no-progress

Expand Down Expand Up @@ -131,9 +133,6 @@ jobs:
node-version: ${{ env.NODE_VERSION }}

- run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
- run: cp .github/psr_http_message_bridge.yaml fixtures/applications/Symfony/config/packages
- run: cp .github/nyholm_psr7.yaml fixtures/applications/Symfony/config/packages
- run: composer require symfony/psr7-pack

- run: composer server-start

Expand Down
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
"require": {
"php": "^7.3 || ^8.0",
"ext-json": "*",
"phpunit/phpunit": "^8.5 || ^9.0",
"symfony/console": "^4.4 || ^5.0",
"symfony/mailer": "^4.4 || ^5.0",
"phpunit/phpunit": "^8.5 || ^9.0"
"symfony/mailer": "^4.4 || ^5.0"
},
"require-dev": {
"behat/behat": "^3.6",
Expand All @@ -47,7 +47,8 @@
"phpstan/phpstan-strict-rules": "^0.12.2",
"phpstan/phpstan-symfony": "^0.12.6",
"phpstan/phpstan-webmozart-assert": "^0.12.4",
"symfony/framework-bundle": "^4.4.14 || ^5.0"
"symfony/framework-bundle": "^4.4.14 || ^5.0",
"symfony/psr7-pack": "^1.0"
},
"autoload": {
"psr-4": {
Expand Down
File renamed without changes.

0 comments on commit 47efa8d

Please sign in to comment.