language: php

php:
    - 7.3
    - 7.4
    - 8.0

env:
    - ECS_VERSION="^9.0"
    - ECS_VERSION="^8.0"

cache:
    directories:
        - ~/.composer/cache/files

before_install:
    - phpenv config-rm xdebug.ini || true

install:
    - composer require symplify/easy-coding-standard:$ECS_VERSION --no-update --no-scripts
    - composer update

script:
    - composer validate --strict

    - vendor/bin/ecs check --config ecs.php tests ecs.php
