shivammathur / setup-php

GitHub action to set up PHP with extensions, php.ini configuration, coverage drivers, and various tools.
https://setup-php.com
MIT License
2.92k stars 341 forks source link

Setup emits warning `xargs: warning: options --max-args and --replace/-I/-i are mutually exclusive, ignoring previous --max-args value` #712

Closed localheinz closed 1 year ago

localheinz commented 1 year ago

Describe the bug

Version

Runners

Operating systems

PHP versions

To Reproduce See .github/workflows/ci.yml in sebastianbergmann/phpunit:

# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

on:
  - pull_request
  - push

name: CI

env:
  COMPOSER_ROOT_VERSION: "10.1-dev"

permissions:
  contents: read

jobs:
  unit-tests:
    name: Unit Tests

    runs-on: ${{ matrix.os }}

    env:
      PHP_EXTENSIONS: none, curl, dom, json, libxml, mbstring, openssl, phar, soap, tokenizer, xml, xmlwriter
      PHP_INI_VALUES: memory_limit=-1, assert.exception=1, zend.assertions=1, error_reporting=-1, log_errors_max_len=0, display_errors=On

    continue-on-error: ${{ matrix.experimental }}

    strategy:
      fail-fast: false
      matrix:
        os:
          - ubuntu-latest
          - windows-latest

        php-version:
          - "8.1"
          - "8.2"

        experimental:
          - false

        include:
          - os: ubuntu-latest
            php-version: "8.3"
            experimental: true

          - os: windows-latest
            php-version: "8.3"
            experimental: true

    steps:
      - name: Configure Git to avoid issues with line endings
        if: matrix.os == 'windows-latest'
        run: git config --global core.autocrlf false

      - name: Checkout
        uses: actions/checkout@v3

      - name: Install PHP with extensions
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php-version }}
          extensions: ${{ env.PHP_EXTENSIONS }}
          ini-values: ${{ env.PHP_INI_VALUES }}
          tools: none

      - name: Install dependencies with Composer
        run: ./tools/composer update --no-ansi --no-interaction --no-progress

      - name: Run tests with PHPUnit
        run: ./phpunit --testsuite unit

Expected behavior Setup fails or does not emit a warning

Screenshots/Logs See

Additional context n/a

Are you willing to submit a PR? n/a

shivammathur commented 1 year ago

Fixed in https://github.com/shivammathur/setup-php/commit/39b4e4a983d4ee3b1f984a81eca6a46994718761, Will be in the next release.

shivammathur commented 1 year ago

Fix released in 2.25.0.

localheinz commented 1 year ago

Thank you, @shivammathur!