mirror of
https://github.com/doctrine/.github.git
synced 2026-03-23 22:32:09 +01:00
Bumps [ramsey/composer-install](https://github.com/ramsey/composer-install) from 3 to 4. - [Release notes](https://github.com/ramsey/composer-install/releases) - [Commits](https://github.com/ramsey/composer-install/compare/v3...v4) --- updated-dependencies: - dependency-name: ramsey/composer-install dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
56 lines
1.7 KiB
YAML
56 lines
1.7 KiB
YAML
|
|
name: "Static Analysis with PHPStan"
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
php-version:
|
|
description: "The PHP version to use when running the job"
|
|
default: "8.5"
|
|
required: false
|
|
type: "string"
|
|
composer-root-version:
|
|
description: "The version of the package being tested, in case of circular dependencies."
|
|
required: false
|
|
type: "string"
|
|
composer-dependency-versions:
|
|
description: "whether the job should install the locked, highest, or lowest versions of Composer dependencies."
|
|
default: "highest"
|
|
required: false
|
|
type: "string"
|
|
composer-options:
|
|
description: "Additional flags for the composer install command."
|
|
default: "--prefer-dist"
|
|
required: false
|
|
type: "string"
|
|
|
|
jobs:
|
|
phpstan:
|
|
name: "PHPStan (PHP: ${{ inputs.php-version }})"
|
|
runs-on: "ubuntu-22.04"
|
|
|
|
steps:
|
|
- name: "Checkout code"
|
|
uses: "actions/checkout@v6"
|
|
|
|
- name: "Install PHP"
|
|
uses: "shivammathur/setup-php@v2"
|
|
with:
|
|
coverage: "none"
|
|
ini-file: development
|
|
php-version: "${{ inputs.php-version }}"
|
|
|
|
- name: "Set COMPOSER_ROOT_VERSION"
|
|
run: |
|
|
echo "COMPOSER_ROOT_VERSION=${{ inputs.composer-root-version }}" >> $GITHUB_ENV
|
|
if: "${{ inputs.composer-root-version }}"
|
|
|
|
- name: "Install dependencies with Composer"
|
|
uses: "ramsey/composer-install@v4"
|
|
with:
|
|
dependency-versions: "${{ inputs.composer-dependency-versions }}"
|
|
composer-options: "${{ inputs.composer-options }}"
|
|
|
|
- name: "Run a static analysis with phpstan/phpstan"
|
|
run: "vendor/bin/phpstan analyse -v"
|