name: test

on: [ push, pull_request ]

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        php-version: ['5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4']
        guzzle-version: ['^5.3', '^6.0']
        include:
        - php-version: '7.2'
          guzzle-version: '^7.0'
        - php-version: '7.3'
          guzzle-version: '^7.0'
        - php-version: '7.4'
          guzzle-version: '^7.0'
        - php-version: '8.0'
          guzzle-version: '^7.0'

    steps:
    - uses: actions/checkout@v2

    - name: install PHP
      uses: shivammathur/setup-php@v2
      with:
        php-version: ${{ matrix.php-version }}
        coverage: none
        extensions: intl, mbstring

    - run: composer validate

    - name: require guzzle
      run: composer require "guzzlehttp/guzzle:${{ matrix.guzzle-version }}" --no-update ${{ matrix.composer-flags }}

    - name: install dependencies
      run: composer update --prefer-dist --no-progress --no-suggest --no-interaction ${{ matrix.composer-flags }}

    - run: composer run-script test

name: test

on: [ push, pull_request ]

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        php-version: ['5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4']
        guzzle-version: ['^5.3', '^6.0']
        include:
        - php-version: '7.2'
          guzzle-version: '^7.0'
        - php-version: '7.3'
          guzzle-version: '^7.0'
        - php-version: '7.4'
          guzzle-version: '^7.0'
        - php-version: '8.0'
          guzzle-version: '^7.0'
        - php-version: '8.1'
          guzzle-version: '^7.0'
          composer-flags: '--ignore-platform-req php'

    steps:
    - uses: actions/checkout@v2

    - name: install PHP
      uses: shivammathur/setup-php@v2
      with:
        php-version: ${{ matrix.php-version }}
        coverage: none
        extensions: intl, mbstring

    - run: composer validate

    - name: require guzzle
      run: composer require "guzzlehttp/guzzle:${{ matrix.guzzle-version }}" --no-update ${{ matrix.composer-flags }}

    - name: install dependencies
      run: composer update --prefer-dist --no-progress --no-suggest --no-interaction ${{ matrix.composer-flags }}

    - run: composer run-script test

Add PHP 8.1 to test matrix
Add PHP 8.1 to test matrix
