diff --git a/.github/workflows/phpcs.yml b/.github/workflows/phpcs.yml index f4d2625406..ec9de46285 100644 --- a/.github/workflows/phpcs.yml +++ b/.github/workflows/phpcs.yml @@ -1,4 +1,4 @@ -name: PHPCS check +name: PHPCS permissions: actions: read @@ -15,20 +15,27 @@ permissions: on: pull_request: push: - branches: [ master ] + branches: [master] jobs: phpcs: name: PHPCS - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + php-version: ['7.2'] steps: - - uses: actions/checkout@v2 - - name: Install dependencies - run: composer install --dev --prefer-dist --no-progress --no-suggest --ignore-platform-reqs - - name: Setup PHP + - uses: actions/checkout@v4 + - name: Install PHP uses: shivammathur/setup-php@v2 with: - php-version: '7.2' - tools: cs2pr - - name: Run phpcs - run: ./vendor/bin/phpcs -q --report=checkstyle | cs2pr + php-version: ${{ matrix.php-version }} + tools: composer:v2, cs2pr + - name: "Composer install" + run: | + composer install --dev --prefer-dist --no-progress --no-suggest + - name: PHPCS / PHP ${{ matrix.php-version }} + run: | + php -v + ./vendor/bin/phpcs -q --report=checkstyle | cs2pr diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index ab1482444c..add8914846 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -3,7 +3,7 @@ name: PHPUnit on: pull_request: push: - branches: [ master ] + branches: [master] permissions: actions: read @@ -48,8 +48,8 @@ jobs: extensions: memcached - name: "Composer install" run: | - composer install --ignore-platform-reqs - composer require doctrine/cache ~1.2 --ignore-platform-reqs + composer install + composer require doctrine/cache ~1.2 - name: PHPUnit / PHP ${{ matrix.php-version }} run: | php -v diff --git a/.gitignore b/.gitignore index fbf9f5df16..3640cfb77a 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ composer.phar .buildpath .project .settings +.phpunit.result.cache diff --git a/composer.json b/composer.json index 46d7dda060..d4ee3873a7 100644 --- a/composer.json +++ b/composer.json @@ -23,17 +23,17 @@ "exclude-from-classmap": ["Tests/"] }, "require": { - "php": "^7.2|^8.0", + "php": "^7.2 || ^8.0", "mustangostang/spyc": "*" }, "require-dev": { - "phpunit/phpunit": "^8.5.8", - "psr/cache": "^1.0.1", - "psr/simple-cache": "^1.0.1", + "phpunit/phpunit": "^8.5.8 || ^9 || ^10 || ^11", + "psr/cache": "^1.0.1 || ^2.0 || ^3.0", + "psr/simple-cache": "^1.0.1 || ^2.0 || ^3.0", "matthiasmullie/scrapbook": "^1.4.7", "phpstan/phpstan": "^1.10.44", "mayflower/mo4-coding-standard": "^v9.0.0", - "symfony/yaml": "^5.1.7" + "symfony/yaml": "^5.1.7 || ^5.4 || ^6.3 || ^7.0" }, "suggest": { "doctrine/cache": "Can directly be used for caching purpose",