Skip to content

Commit

Permalink
GH Actions: remove --no-interaction from Composer commands
Browse files Browse the repository at this point in the history
... as since `setup-php` version `2.17.0`, this is no longer needed as this is now the default via an environtment variable set by `setup-php`.

Refs:
* https://github.com/shivammathur/setup-php/releases/tag/2.17.0
* shivammathur/setup-php#547
  • Loading branch information
jrfnl committed Mar 26, 2022
1 parent 8024e18 commit 4648a04
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/basics.yml
Expand Up @@ -41,12 +41,12 @@ jobs:
- name: 'Composer: adjust dependencies'
run: |
# The sniff stage doesn't run the unit tests, so no need for PHPUnit.
composer remove --no-update --dev phpunit/phpunit --no-scripts --no-interaction
composer remove --no-update --dev phpunit/phpunit --no-scripts
# Using PHPCS `master` as an early detection system for bugs upstream.
composer require --no-update squizlabs/php_codesniffer:"dev-master" --no-interaction
composer require --no-update squizlabs/php_codesniffer:"dev-master"
# Add PHPCSDevCS - this is the CS ruleset we use.
# This is not in the composer.json as it has different minimum PHPCS reqs and would conflict.
composer require --no-update --dev phpcsstandards/phpcsdevcs:"^1.1.3" --no-interaction
composer require --no-update --dev phpcsstandards/phpcsdevcs:"^1.1.3"
# Install dependencies and handle caching in one go.
# @link https://github.com/marketplace/actions/install-composer-dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/quicktest.yml
Expand Up @@ -63,13 +63,13 @@ jobs:
coverage: none

- name: 'Composer: set PHPCS version for tests'
run: composer require --no-update squizlabs/php_codesniffer:"${{ matrix.phpcs_version }}" --no-interaction
run: composer require --no-update squizlabs/php_codesniffer:"${{ matrix.phpcs_version }}"

- name: 'Composer: tweak PHPUnit version'
if: ${{ matrix.php == 'latest' || startsWith( matrix.php, '8' ) }}
# Temporary fix - PHPUnit 9.3+ is buggy when used for code coverage, so not allowed "normally".
# For tests which don't run code coverage, we can safely install it for PHP 8 though.
run: composer require --no-update phpunit/phpunit:"^9.3" --no-interaction
run: composer require --no-update phpunit/phpunit:"^9.3"

# Install dependencies and handle caching in one go.
# @link https://github.com/marketplace/actions/install-composer-dependencies
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Expand Up @@ -203,13 +203,13 @@ jobs:
coverage: none

- name: 'Composer: set PHPCS version for tests'
run: composer require --no-update squizlabs/php_codesniffer:"${{ matrix.phpcs_version }}" --no-interaction
run: composer require --no-update squizlabs/php_codesniffer:"${{ matrix.phpcs_version }}"

- name: 'Composer: conditionally tweak PHPUnit version'
if: ${{ startsWith( matrix.php, '8' ) }}
# Temporary fix - PHPUnit 9.3+ is buggy when used for code coverage, so not allowed "normally".
# For tests which don't run code coverage, we can safely install it for PHP 8 though.
run: composer require --no-update phpunit/phpunit:"^9.3" --no-interaction
run: composer require --no-update phpunit/phpunit:"^9.3"

# Install dependencies and handle caching in one go.
# @link https://github.com/marketplace/actions/install-composer-dependencies
Expand Down Expand Up @@ -285,7 +285,7 @@ jobs:
- name: 'Composer: adjust dependencies'
run: |
# Set a specific PHPCS version.
composer require --no-update squizlabs/php_codesniffer:"${{ matrix.phpcs_version }}" --no-scripts --no-interaction
composer require --no-update squizlabs/php_codesniffer:"${{ matrix.phpcs_version }}" --no-scripts
- name: Install Composer dependencies - normal
uses: "ramsey/composer-install@v2"
Expand All @@ -303,7 +303,7 @@ jobs:

- name: Install Coveralls
if: ${{ success() }}
run: composer require php-coveralls/php-coveralls:"^2.4.2" --no-interaction
run: composer require php-coveralls/php-coveralls:"^2.4.2"

- name: Upload coverage results to Coveralls
if: ${{ success() }}
Expand Down

0 comments on commit 4648a04

Please sign in to comment.