diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0b08b2d..d4ef9f6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,18 +4,17 @@ on: push jobs: php-tests: - strategy: matrix: - php: [ '7.4', '8.0', '8.1', '8.2' ] - prefer: [ 'lowest', 'stable' ] + php: ["7.4", "8.0", "8.1", "8.2", "8.3"] + prefer: ["lowest", "stable"] name: Test on PHP ${{ matrix.php }} with ${{ matrix.prefer }} composer prefer option runs-on: ubuntu-latest steps: - name: Checkout Code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install PHP uses: shivammathur/setup-php@v2 @@ -27,7 +26,7 @@ jobs: - name: Cache Composer packages id: composer-cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: vendor key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}-${{ matrix.prefer }}- @@ -46,8 +45,14 @@ jobs: runs-on: ubuntu-latest steps: + # Master branch should be available for the linter + - name: Checkout Code + uses: actions/checkout@v4 + with: + ref: master + - name: Checkout Code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install PHP uses: shivammathur/setup-php@v2 @@ -58,8 +63,11 @@ jobs: run: composer update --prefer-stable --prefer-dist --no-progress - name: Lint Code - uses: github/super-linter@v4 + uses: super-linter/super-linter@v7 env: FILTER_REGEX_EXCLUDE: .*vendor.* GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + VALIDATE_CHECKOV: false + VALIDATE_JSCPD: false VALIDATE_PHP_PSALM: false + VALIDATE_YAML_PRETTIER: false diff --git a/README.md b/README.md index 2fbc906..fc12ae3 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,8 @@ [![Packagist Version](https://img.shields.io/packagist/v/timeweb/phpstan-enum)](https://packagist.org/packages/timeweb/phpstan-enum) ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/timeweb/phpstan-enum/CI) -* [PHPStan](https://phpstan.org/) -* [PHP Enum](https://github.com/myclabs/php-enum) +- [PHPStan](https://phpstan.org/) +- [PHP Enum](https://github.com/myclabs/php-enum) This extension defines dynamic methods for `MyCLabs\Enum\Enum` subclasses. diff --git a/composer.json b/composer.json index 29bd926..95a5987 100644 --- a/composer.json +++ b/composer.json @@ -1,36 +1,39 @@ { - "name": "timeweb/phpstan-enum", - "description": "Enum class reflection extension for PHPStan", - "type": "phpstan-extension", - "keywords": ["enum", "phpstan"], - "license": "MIT", - "require": { - "php": "^7.4|^8.0", - "myclabs/php-enum": "^1.2", - "phpstan/phpstan": "^2.0" - }, - "require-dev": { - "phpunit/phpunit": "^7.0|^9.0" - }, - "autoload": { - "psr-4": { - "Timeweb\\PHPStan\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "Timeweb\\Tests\\PHPStan\\": "tests/" - } - }, - "scripts": { - "test": "phpunit" - }, - "extra": { - "phpstan": { - "includes": [ - "extension.neon", - "rules.neon" - ] - } + "name": "timeweb/phpstan-enum", + "description": "Enum class reflection extension for PHPStan", + "type": "phpstan-extension", + "keywords": [ + "enum", + "phpstan" + ], + "license": "MIT", + "require": { + "php": "^7.4|^8.0", + "myclabs/php-enum": "^1.2", + "phpstan/phpstan": "^2.0" + }, + "require-dev": { + "phpunit/phpunit": "^7.0|^9.0" + }, + "autoload": { + "psr-4": { + "Timeweb\\PHPStan\\": "src/" } + }, + "autoload-dev": { + "psr-4": { + "Timeweb\\Tests\\PHPStan\\": "tests/" + } + }, + "scripts": { + "test": "phpunit" + }, + "extra": { + "phpstan": { + "includes": [ + "extension.neon", + "rules.neon" + ] + } + } } diff --git a/tools/composer b/tools/composer index 2a8f4a4..0497759 100755 --- a/tools/composer +++ b/tools/composer @@ -5,8 +5,8 @@ mkdir -p "$HOME/.composer/cache/" test -t 1 && USE_TTY="--tty" docker run --rm --interactive "${USE_TTY}" \ - --user $UID:$UID \ - --volume "$PWD":/app \ - --volume "$HOME/.composer":/tmp/.composer \ - --env COMPOSER_HOME=/tmp/.composer \ - timeweb/phpstan-enum composer "$@" + --user $UID:$UID \ + --volume "$PWD":/app \ + --volume "$HOME/.composer":/tmp/.composer \ + --env COMPOSER_HOME=/tmp/.composer \ + timeweb/phpstan-enum composer "$@" diff --git a/tools/php b/tools/php index c9021ff..43e34d7 100755 --- a/tools/php +++ b/tools/php @@ -3,6 +3,6 @@ test -t 1 && USE_TTY="--tty" docker run --rm --init --interactive "${USE_TTY}" \ - --user $UID:$UID \ - --volume "$PWD:/app" \ - timeweb/phpstan-enum php "$@" + --user $UID:$UID \ + --volume "$PWD:/app" \ + timeweb/phpstan-enum php "$@" diff --git a/tools/phpdbg b/tools/phpdbg index 4579b9a..ed6b75b 100755 --- a/tools/phpdbg +++ b/tools/phpdbg @@ -3,6 +3,6 @@ test -t 1 && USE_TTY="--tty" docker run --rm --init --interactive "${USE_TTY}" \ - --user $UID:$UID \ - --volume "$PWD:/app" \ - timeweb/phpstan-enum phpdbg "$@" + --user $UID:$UID \ + --volume "$PWD:/app" \ + timeweb/phpstan-enum phpdbg "$@"