diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 82f8810..f3f5ae7 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -12,6 +12,7 @@ env: jobs: phpstan: + name: PHPStan runs-on: ubuntu-latest steps: - name: Check out code @@ -45,3 +46,37 @@ jobs: run: vendor/bin/phpstan analyse --error-format=github + + require-checker: + name: Require checker + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + + - name: Get Composer Cache Directory + id: composer-cache + run: | + echo "::set-output name=dir::$(composer config cache-files-dir)" + + - name: Cache Composer packages + uses: actions/cache@v3 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: | + ${{ runner.os }}-composer- + + - name: Install dependencies + run: composer update + --no-ansi + --no-interaction + --no-progress + --no-suggest + --prefer-dist + + - name: Composer require-checker + run: vendor/bin/composer-require-checker check diff --git a/composer.json b/composer.json index 2941d1c..a64c724 100644 --- a/composer.json +++ b/composer.json @@ -28,6 +28,7 @@ "php": "^7.3 || ^8.0" }, "require-dev": { + "maglnet/composer-require-checker": "^2.0 || ^3.0 || ^4.0", "mheap/phpunit-github-actions-printer": "^1.5", "phpstan/phpstan": "^1.0", "phpstan/phpstan-phpunit": "^1.0", diff --git a/src/Example.php b/src/Example.php new file mode 100644 index 0000000..f29e087 --- /dev/null +++ b/src/Example.php @@ -0,0 +1,23 @@ +message = $message; + } +}