Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run static analysis with DBAL 4@dev #9742

Merged
merged 5 commits into from
May 8, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Run static analysis with DBAL 4@dev
  • Loading branch information
morozov committed May 8, 2022
commit 2e856599b36293c60cc3208422721bf01734acb8
71 changes: 64 additions & 7 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

name: "Static Analysis"
name: Static Analysis

on:
pull_request:
@@ -10,8 +9,66 @@ on:
- "*.x"

jobs:
static-analysis:
name: "Static Analysis"
uses: "doctrine/.github/.github/workflows/static-analysis.yml@1.4.1"
with:
php-version: "8.1"
static-analysis-phpstan:
name: Static Analysis with PHPStan
runs-on: ubuntu-20.04

strategy:
matrix:
include:
- dbal-version: default
config: phpstan.neon
- dbal-version: 4@dev
config: phpstan-dbal4.neon

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: "8.1"
tools: cs2pr

- name: Require specific DBAL version
run: "composer require doctrine/dbal ^${{ matrix.dbal-version }} --no-update"
if: "${{ matrix.dbal-version != 'default' }}"

- name: Install dependencies with Composer
uses: ramsey/composer-install@v1

- name: Run static analysis with phpstan/phpstan
run: "vendor/bin/phpstan analyse -c ${{ matrix.config }} --error-format=checkstyle | cs2pr"

static-analysis-psalm:
name: Static Analysis with Psalm
runs-on: ubuntu-20.04

strategy:
matrix:
dbal-version:
- default
- 4@dev

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: "8.1"
tools: cs2pr

- name: Require specific DBAL version
run: "composer require doctrine/dbal ^${{ matrix.dbal-version }} --no-update"
if: "${{ matrix.dbal-version != 'default' }}"

- name: Install dependencies with Composer
uses: ramsey/composer-install@v1

- name: Run static analysis with Vimeo Psalm
run: vendor/bin/psalm --shepherd
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@
"ext-ctype": "*",
"doctrine/collections": "^1.5",
"doctrine/common": "^3.3",
"doctrine/dbal": "^3.3",
"doctrine/dbal": "^3.4@dev",
"doctrine/deprecations": "^0.5.3 || ^1",
"doctrine/event-manager": "^1.1",
"doctrine/inflector": "^1.4 || ^2.0",