on:
  pull_request:
  schedule:
    - cron:  "0 0 * * *"

concurrency:
  group: ${{ github.head_ref || 'cron' }}
  cancel-in-progress: true

jobs:
  tests:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        php-version:
          - '8.5'
          - '8.4'
          - '8.3'
          - '8.2'
          - '8.1'
          - '8.0'
          - '7.4'
          - '7.3'
          - '7.2'
          - '7.1'
          - '7.0'
        phpunit-version:
          - "13.0.0"
          - '12.5.0'
          - '12.4.0'
          - '12.3.0'
          - '12.2.0'
          - '12.1.0'
          - '12.0.0'
          - '11.5.0'
          - '11.4.0'
          - '11.3.0'
          - '11.2.0'
          - '11.1.0'
          - '11.0.0'
          - '10.5.0'
          - '10.4.0'
          - '10.3.0'
          - '10.2.0'
          - '10.1.0'
          - '10.0.0'
          - '9.6.0'
          - '9.5.0'
          - '9.4.0'
          - '9.3.0'
          - '9.2.0'
          - '9.1.0'
          - '9.0.0'
          - '8.4.0'
          - '8.3.0'
          - '8.2.0'
          - '8.1.0'
          - '8.0.0'
          - '7.5.0'
          - '7.4.0'
          - '7.3.0'
          - '7.2.0'
          - '7.1.0'
          - '7.0.0'
          - '6.5.0'
          - '6.4.0'
          - '6.3.0'
          - '6.2.0'
          - '6.1.0'
          - '6.0.0'

        exclude:
          # PHP 8.5 Exclusions
          - php-version: '8.5'
            phpunit-version: '9.4.0'
          - php-version: '8.5'
            phpunit-version: '9.3.0'
          - php-version: '8.5'
            phpunit-version: '9.2.0'
          - php-version: '8.5'
            phpunit-version: '9.1.0'
          - php-version: '8.5'
            phpunit-version: '9.0.0'
          - php-version: '8.5'
            phpunit-version: '8.4.0'
          - php-version: '8.5'
            phpunit-version: '8.3.0'
          - php-version: '8.5'
            phpunit-version: '8.2.0'
          - php-version: '8.5'
            phpunit-version: '8.1.0'
          - php-version: '8.5'
            phpunit-version: '8.0.0'
          - php-version: '8.5'
            phpunit-version: '7.5.0'
          - php-version: '8.5'
            phpunit-version: '7.4.0'
          - php-version: '8.5'
            phpunit-version: '7.3.0'
          - php-version: '8.5'
            phpunit-version: '7.2.0'
          - php-version: '8.5'
            phpunit-version: '7.1.0'
          - php-version: '8.5'
            phpunit-version: '7.0.0'
          - php-version: '8.5'
            phpunit-version: '6.5.0'
          - php-version: '8.5'
            phpunit-version: '6.4.0'
          - php-version: '8.5'
            phpunit-version: '6.3.0'
          - php-version: '8.5'
            phpunit-version: '6.2.0'
          - php-version: '8.5'
            phpunit-version: '6.1.0'
          - php-version: '8.5'
            phpunit-version: '6.0.0'
        
          # PHP 8.4 Exclusions
          - php-version: '8.4'
            phpunit-version: '9.4.0'
          - php-version: '8.4'
            phpunit-version: '9.3.0'
          - php-version: '8.4'
            phpunit-version: '9.2.0'
          - php-version: '8.4'
            phpunit-version: '9.1.0'
          - php-version: '8.4'
            phpunit-version: '9.0.0'
          - php-version: '8.4'
            phpunit-version: '8.4.0'
          - php-version: '8.4'
            phpunit-version: '8.3.0'
          - php-version: '8.4'
            phpunit-version: '8.2.0'
          - php-version: '8.4'
            phpunit-version: '8.1.0'
          - php-version: '8.4'
            phpunit-version: '8.0.0'
          - php-version: '8.4'
            phpunit-version: '7.5.0'
          - php-version: '8.4'
            phpunit-version: '7.4.0'
          - php-version: '8.4'
            phpunit-version: '7.3.0'
          - php-version: '8.4'
            phpunit-version: '7.2.0'
          - php-version: '8.4'
            phpunit-version: '7.1.0'
          - php-version: '8.4'
            phpunit-version: '7.0.0'
          - php-version: '8.4'
            phpunit-version: '6.5.0'
          - php-version: '8.4'
            phpunit-version: '6.4.0'
          - php-version: '8.4'
            phpunit-version: '6.3.0'
          - php-version: '8.4'
            phpunit-version: '6.2.0'
          - php-version: '8.4'
            phpunit-version: '6.1.0'
          - php-version: '8.4'
            phpunit-version: '6.0.0'
        
          # PHP 8.3 Exclusions
          - php-version: '8.3'
            phpunit-version: '13.0.0'
          - php-version: '8.3'
            phpunit-version: '9.4.0'
          - php-version: '8.3'
            phpunit-version: '9.3.0'
          - php-version: '8.3'
            phpunit-version: '9.2.0'
          - php-version: '8.3'
            phpunit-version: '9.1.0'
          - php-version: '8.3'
            phpunit-version: '9.0.0'
          - php-version: '8.3'
            phpunit-version: '8.4.0'
          - php-version: '8.3'
            phpunit-version: '8.3.0'
          - php-version: '8.3'
            phpunit-version: '8.2.0'
          - php-version: '8.3'
            phpunit-version: '8.1.0'
          - php-version: '8.3'
            phpunit-version: '8.0.0'
          - php-version: '8.3'
            phpunit-version: '7.5.0'
          - php-version: '8.3'
            phpunit-version: '7.4.0'
          - php-version: '8.3'
            phpunit-version: '7.3.0'
          - php-version: '8.3'
            phpunit-version: '7.2.0'
          - php-version: '8.3'
            phpunit-version: '7.1.0'
          - php-version: '8.3'
            phpunit-version: '7.0.0'
          - php-version: '8.3'
            phpunit-version: '6.5.0'
          - php-version: '8.3'
            phpunit-version: '6.4.0'
          - php-version: '8.3'
            phpunit-version: '6.3.0'
          - php-version: '8.3'
            phpunit-version: '6.2.0'
          - php-version: '8.3'
            phpunit-version: '6.1.0'
          - php-version: '8.3'
            phpunit-version: '6.0.0'

          # PHP 8.2 Exclusions
          - php-version: '8.2'
            phpunit-version: '13.0.0'
          - php-version: '8.2'
            phpunit-version: '12.5.0'
          - php-version: '8.2'
            phpunit-version: '12.4.0'
          - php-version: '8.2'
            phpunit-version: '12.3.0'
          - php-version: '8.2'
            phpunit-version: '12.2.0'
          - php-version: '8.2'
            phpunit-version: '12.1.0'
          - php-version: '8.2'
            phpunit-version: '12.0.0'
          - php-version: '8.2'
            phpunit-version: '9.4.0'
          - php-version: '8.2'
            phpunit-version: '9.3.0'
          - php-version: '8.2'
            phpunit-version: '9.2.0'
          - php-version: '8.2'
            phpunit-version: '9.1.0'
          - php-version: '8.2'
            phpunit-version: '9.0.0'
          - php-version: '8.2'
            phpunit-version: '8.4.0'
          - php-version: '8.2'
            phpunit-version: '8.3.0'
          - php-version: '8.2'
            phpunit-version: '8.2.0'
          - php-version: '8.2'
            phpunit-version: '8.1.0'
          - php-version: '8.2'
            phpunit-version: '8.0.0'
          - php-version: '8.2'
            phpunit-version: '7.5.0'
          - php-version: '8.2'
            phpunit-version: '7.4.0'
          - php-version: '8.2'
            phpunit-version: '7.3.0'
          - php-version: '8.2'
            phpunit-version: '7.2.0'
          - php-version: '8.2'
            phpunit-version: '7.1.0'
          - php-version: '8.2'
            phpunit-version: '7.0.0'
          - php-version: '8.2'
            phpunit-version: '6.5.0'
          - php-version: '8.2'
            phpunit-version: '6.4.0'
          - php-version: '8.2'
            phpunit-version: '6.3.0'
          - php-version: '8.2'
            phpunit-version: '6.2.0'
          - php-version: '8.2'
            phpunit-version: '6.1.0'
          - php-version: '8.2'
            phpunit-version: '6.0.0'

          # PHP 8.1 Exclusions
          - php-version: '8.1'
            phpunit-version: '13.0.0'
          - php-version: '8.1'
            phpunit-version: '12.5.0'
          - php-version: '8.1'
            phpunit-version: '12.4.0'
          - php-version: '8.1'
            phpunit-version: '12.3.0'
          - php-version: '8.1'
            phpunit-version: '12.2.0'
          - php-version: '8.1'
            phpunit-version: '12.1.0'
          - php-version: '8.1'
            phpunit-version: '12.0.0'
          - php-version: '8.1'
            phpunit-version: '11.5.0'
          - php-version: '8.1'
            phpunit-version: '11.4.0'
          - php-version: '8.1'
            phpunit-version: '11.3.0'
          - php-version: '8.1'
            phpunit-version: '11.2.0'
          - php-version: '8.1'
            phpunit-version: '11.1.0'
          - php-version: '8.1'
            phpunit-version: '11.0.0'
          - php-version: '8.1'
            phpunit-version: '9.4.0'
          - php-version: '8.1'
            phpunit-version: '9.3.0'
          - php-version: '8.1'
            phpunit-version: '9.2.0'
          - php-version: '8.1'
            phpunit-version: '9.1.0'
          - php-version: '8.1'
            phpunit-version: '9.0.0'
          - php-version: '8.1'
            phpunit-version: '8.4.0'
          - php-version: '8.1'
            phpunit-version: '8.3.0'
          - php-version: '8.1'
            phpunit-version: '8.2.0'
          - php-version: '8.1'
            phpunit-version: '8.1.0'
          - php-version: '8.1'
            phpunit-version: '8.0.0'
          - php-version: '8.1'
            phpunit-version: '7.5.0'
          - php-version: '8.1'
            phpunit-version: '7.4.0'
          - php-version: '8.1'
            phpunit-version: '7.3.0'
          - php-version: '8.1'
            phpunit-version: '7.2.0'
          - php-version: '8.1'
            phpunit-version: '7.1.0'
          - php-version: '8.1'
            phpunit-version: '7.0.0'
          - php-version: '8.1'
            phpunit-version: '6.5.0'
          - php-version: '8.1'
            phpunit-version: '6.4.0'
          - php-version: '8.1'
            phpunit-version: '6.3.0'
          - php-version: '8.1'
            phpunit-version: '6.2.0'
          - php-version: '8.1'
            phpunit-version: '6.1.0'
          - php-version: '8.1'
            phpunit-version: '6.0.0'

          # PHP 8.0 Exclusions
          - php-version: '8.0'
            phpunit-version: '13.0.0'
          - php-version: '8.0'
            phpunit-version: '12.5.0'
          - php-version: '8.0'
            phpunit-version: '12.4.0'
          - php-version: '8.0'
            phpunit-version: '12.3.0'
          - php-version: '8.0'
            phpunit-version: '12.2.0'
          - php-version: '8.0'
            phpunit-version: '12.1.0'
          - php-version: '8.0'
            phpunit-version: '12.0.0'
          - php-version: '8.0'
            phpunit-version: '11.5.0'
          - php-version: '8.0'
            phpunit-version: '11.4.0'
          - php-version: '8.0'
            phpunit-version: '11.3.0'
          - php-version: '8.0'
            phpunit-version: '11.2.0'
          - php-version: '8.0'
            phpunit-version: '11.1.0'
          - php-version: '8.0'
            phpunit-version: '11.0.0'
          - php-version: '8.0'
            phpunit-version: '10.5.0'
          - php-version: '8.0'
            phpunit-version: '10.4.0'
          - php-version: '8.0'
            phpunit-version: '10.3.0'
          - php-version: '8.0'
            phpunit-version: '10.2.0'
          - php-version: '8.0'
            phpunit-version: '10.1.0'
          - php-version: '8.0'
            phpunit-version: '10.0.0'
          - php-version: '8.0'
            phpunit-version: '9.2.0'
          - php-version: '8.0'
            phpunit-version: '9.1.0'
          - php-version: '8.0'
            phpunit-version: '9.0.0'
          - php-version: '8.0'
            phpunit-version: '8.4.0'
          - php-version: '8.0'
            phpunit-version: '8.3.0'
          - php-version: '8.0'
            phpunit-version: '8.2.0'
          - php-version: '8.0'
            phpunit-version: '8.1.0'
          - php-version: '8.0'
            phpunit-version: '8.0.0'
          - php-version: '8.0'
            phpunit-version: '7.5.0'
          - php-version: '8.0'
            phpunit-version: '7.4.0'
          - php-version: '8.0'
            phpunit-version: '7.3.0'
          - php-version: '8.0'
            phpunit-version: '7.2.0'
          - php-version: '8.0'
            phpunit-version: '7.1.0'
          - php-version: '8.0'
            phpunit-version: '7.0.0'
          - php-version: '8.0'
            phpunit-version: '6.5.0'
          - php-version: '8.0'
            phpunit-version: '6.4.0'
          - php-version: '8.0'
            phpunit-version: '6.3.0'
          - php-version: '8.0'
            phpunit-version: '6.2.0'
          - php-version: '8.0'
            phpunit-version: '6.1.0'
          - php-version: '8.0'
            phpunit-version: '6.0.0'
            
          # PHP 7.4 Exclusions
          - php-version: '7.4'
            phpunit-version: '13.0.0'
          - php-version: '7.4'
            phpunit-version: '12.5.0'
          - php-version: '7.4'
            phpunit-version: '12.4.0'
          - php-version: '7.4'
            phpunit-version: '12.3.0'
          - php-version: '7.4'
            phpunit-version: '12.2.0'
          - php-version: '7.4'
            phpunit-version: '12.1.0'
          - php-version: '7.4'
            phpunit-version: '12.0.0'
          - php-version: '7.4'
            phpunit-version: '11.5.0'
          - php-version: '7.4'
            phpunit-version: '11.4.0'
          - php-version: '7.4'
            phpunit-version: '11.3.0'
          - php-version: '7.4'
            phpunit-version: '11.2.0'
          - php-version: '7.4'
            phpunit-version: '11.1.0'
          - php-version: '7.4'
            phpunit-version: '11.0.0'
          - php-version: '7.4'
            phpunit-version: '10.5.0'
          - php-version: '7.4'
            phpunit-version: '10.4.0'
          - php-version: '7.4'
            phpunit-version: '10.3.0'
          - php-version: '7.4'
            phpunit-version: '10.2.0'
          - php-version: '7.4'
            phpunit-version: '10.1.0'
          - php-version: '7.4'
            phpunit-version: '10.0.0'
          - php-version: '7.4'
            phpunit-version: '8.1.0'
          - php-version: '7.4'
            phpunit-version: '8.0.0'
          - php-version: '7.4'
            phpunit-version: '7.4.0'
          - php-version: '7.4'
            phpunit-version: '7.3.0'
          - php-version: '7.4'
            phpunit-version: '7.2.0'
          - php-version: '7.4'
            phpunit-version: '7.1.0'
          - php-version: '7.4'
            phpunit-version: '7.0.0'
          - php-version: '7.4'
            phpunit-version: '6.5.0'
          - php-version: '7.4'
            phpunit-version: '6.4.0'
          - php-version: '7.4'
            phpunit-version: '6.3.0'
          - php-version: '7.4'
            phpunit-version: '6.2.0'
          - php-version: '7.4'
            phpunit-version: '6.1.0'
          - php-version: '7.4'
            phpunit-version: '6.0.0'

          # PHP 7.3 Exclusions
          - php-version: '7.3'
            phpunit-version: '13.0.0'
          - php-version: '7.3'
            phpunit-version: '12.5.0'
          - php-version: '7.3'
            phpunit-version: '12.4.0'
          - php-version: '7.3'
            phpunit-version: '12.3.0'
          - php-version: '7.3'
            phpunit-version: '12.2.0'
          - php-version: '7.3'
            phpunit-version: '12.1.0'
          - php-version: '7.3'
            phpunit-version: '12.0.0'
          - php-version: '7.3'
            phpunit-version: '11.5.0'
          - php-version: '7.3'
            phpunit-version: '11.4.0'
          - php-version: '7.3'
            phpunit-version: '11.3.0'
          - php-version: '7.3'
            phpunit-version: '11.2.0'
          - php-version: '7.3'
            phpunit-version: '11.1.0'
          - php-version: '7.3'
            phpunit-version: '11.0.0'
          - php-version: '7.3'
            phpunit-version: '10.5.0'
          - php-version: '7.3'
            phpunit-version: '10.4.0'
          - php-version: '7.3'
            phpunit-version: '10.3.0'
          - php-version: '7.3'
            phpunit-version: '10.2.0'
          - php-version: '7.3'
            phpunit-version: '10.1.0'
          - php-version: '7.3'
            phpunit-version: '10.0.0'
          
          # PHP 7.2 Exclusions
          - php-version: '7.2'
            phpunit-version: '13.0.0'
          - php-version: '7.2'
            phpunit-version: '12.5.0'
          - php-version: '7.2'
            phpunit-version: '12.4.0'
          - php-version: '7.2'
            phpunit-version: '12.3.0'
          - php-version: '7.2'
            phpunit-version: '12.2.0'
          - php-version: '7.2'
            phpunit-version: '12.1.0'
          - php-version: '7.2'
            phpunit-version: '12.0.0'
          - php-version: '7.2'
            phpunit-version: '11.5.0'
          - php-version: '7.2'
            phpunit-version: '11.4.0'
          - php-version: '7.2'
            phpunit-version: '11.3.0'
          - php-version: '7.2'
            phpunit-version: '11.2.0'
          - php-version: '7.2'
            phpunit-version: '11.1.0'
          - php-version: '7.2'
            phpunit-version: '11.0.0'
          - php-version: '7.2'
            phpunit-version: '10.5.0'
          - php-version: '7.2'
            phpunit-version: '10.4.0'
          - php-version: '7.2'
            phpunit-version: '10.3.0'
          - php-version: '7.2'
            phpunit-version: '10.2.0'
          - php-version: '7.2'
            phpunit-version: '10.1.0'
          - php-version: '7.2'
            phpunit-version: '10.0.0'
          - php-version: '7.2'
            phpunit-version: '9.6.0'
          - php-version: '7.2'
            phpunit-version: '9.5.0'
          - php-version: '7.2'
            phpunit-version: '9.4.0'
          - php-version: '7.2'
            phpunit-version: '9.3.0'
          - php-version: '7.2'
            phpunit-version: '9.2.0'
          - php-version: '7.2'
            phpunit-version: '9.1.0'
          - php-version: '7.2'
            phpunit-version: '9.0.0'
          
          # PHP 7.1 Exclusions
          - php-version: '7.1'
            phpunit-version: '13.0.0'
          - php-version: '7.1'
            phpunit-version: '12.5.0'
          - php-version: '7.1'
            phpunit-version: '12.4.0'
          - php-version: '7.1'
            phpunit-version: '12.3.0'
          - php-version: '7.1'
            phpunit-version: '12.2.0'
          - php-version: '7.1'
            phpunit-version: '12.1.0'
          - php-version: '7.1'
            phpunit-version: '12.0.0'
          - php-version: '7.1'
            phpunit-version: '11.5.0'
          - php-version: '7.1'
            phpunit-version: '11.4.0'
          - php-version: '7.1'
            phpunit-version: '11.3.0'
          - php-version: '7.1'
            phpunit-version: '11.2.0'
          - php-version: '7.1'
            phpunit-version: '11.1.0'
          - php-version: '7.1'
            phpunit-version: '11.0.0'
          - php-version: '7.1'
            phpunit-version: '10.5.0'
          - php-version: '7.1'
            phpunit-version: '10.4.0'
          - php-version: '7.1'
            phpunit-version: '10.3.0'
          - php-version: '7.1'
            phpunit-version: '10.2.0'
          - php-version: '7.1'
            phpunit-version: '10.1.0'
          - php-version: '7.1'
            phpunit-version: '10.0.0'
          - php-version: '7.1'
            phpunit-version: '9.6.0'
          - php-version: '7.1'
            phpunit-version: '9.5.0'
          - php-version: '7.1'
            phpunit-version: '9.4.0'
          - php-version: '7.1'
            phpunit-version: '9.3.0'
          - php-version: '7.1'
            phpunit-version: '9.2.0'
          - php-version: '7.1'
            phpunit-version: '9.1.0'
          - php-version: '7.1'
            phpunit-version: '9.0.0'
          - php-version: '7.1'
            phpunit-version: '8.5.0'
          - php-version: '7.1'
            phpunit-version: '8.4.0'
          - php-version: '7.1'
            phpunit-version: '8.3.0'
          - php-version: '7.1'
            phpunit-version: '8.2.0'
          - php-version: '7.1'
            phpunit-version: '8.1.0'
          - php-version: '7.1'
            phpunit-version: '8.0.0'
      
          # PHP 7.0 Exclusions
          - php-version: '7.0'
            phpunit-version: '13.0.0'
          - php-version: '7.0'
            phpunit-version: '12.5.0'
          - php-version: '7.0'
            phpunit-version: '12.4.0'
          - php-version: '7.0'
            phpunit-version: '12.3.0'
          - php-version: '7.0'
            phpunit-version: '12.2.0'
          - php-version: '7.0'
            phpunit-version: '12.1.0'
          - php-version: '7.0'
            phpunit-version: '12.0.0'
          - php-version: '7.0'
            phpunit-version: '11.5.0'
          - php-version: '7.0'
            phpunit-version: '11.4.0'
          - php-version: '7.0'
            phpunit-version: '11.3.0'
          - php-version: '7.0'
            phpunit-version: '11.2.0'
          - php-version: '7.0'
            phpunit-version: '11.1.0'
          - php-version: '7.0'
            phpunit-version: '11.0.0'
          - php-version: '7.0'
            phpunit-version: '10.5.0'
          - php-version: '7.0'
            phpunit-version: '10.4.0'
          - php-version: '7.0'
            phpunit-version: '10.3.0'
          - php-version: '7.0'
            phpunit-version: '10.2.0'
          - php-version: '7.0'
            phpunit-version: '10.1.0'
          - php-version: '7.0'
            phpunit-version: '10.0.0'
          - php-version: '7.0'
            phpunit-version: '9.6.0'
          - php-version: '7.0'
            phpunit-version: '9.5.0'
          - php-version: '7.0'
            phpunit-version: '9.4.0'
          - php-version: '7.0'
            phpunit-version: '9.3.0'
          - php-version: '7.0'
            phpunit-version: '9.2.0'
          - php-version: '7.0'
            phpunit-version: '9.1.0'
          - php-version: '7.0'
            phpunit-version: '9.0.0'
          - php-version: '7.0'
            phpunit-version: '8.5.0'
          - php-version: '7.0'
            phpunit-version: '8.4.0'
          - php-version: '7.0'
            phpunit-version: '8.3.0'
          - php-version: '7.0'
            phpunit-version: '8.2.0'
          - php-version: '7.0'
            phpunit-version: '8.1.0'
          - php-version: '7.0'
            phpunit-version: '8.0.0'
          - php-version: '7.0'
            phpunit-version: '7.5.0'
          - php-version: '7.0'
            phpunit-version: '7.4.0'
          - php-version: '7.0'
            phpunit-version: '7.3.0'
          - php-version: '7.0'
            phpunit-version: '7.2.0'
          - php-version: '7.0'
            phpunit-version: '7.1.0'
          - php-version: '7.0'
            phpunit-version: '7.0.0'

    name: PHPUnit ${{ matrix.phpunit-version }} on PHP ${{ matrix.php-version }}
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Install PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php-version }}

      - name: Install Dependencies
        run: composer require phpunit/phpunit:~${{ matrix.phpunit-version }} --no-interaction --no-progress
        env:
          COMPOSER_NO_SECURITY_BLOCKING: 1

      - name: PHPUnit
        run: vendor/bin/phpunit
