Skip to content

Commit 07343c7

Browse files
s1lvermspirkov
andauthored
Replacing Psalm with PHPStan (#546)
Co-authored-by: Maksim Spirkov <63721828+mspirkov@users.noreply.github.com>
1 parent 8b201a0 commit 07343c7

47 files changed

Lines changed: 1405 additions & 238 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
/.git
33
/.dockerignore
44
/.editorconfig
5-
/.env.example
65
/.gitattributes
76
/.github
87
/.gitignore

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,7 @@ trim_trailing_whitespace = false
1818
indent_style = tab
1919

2020
[*.yml]
21+
indent_size = 2
22+
23+
[*.neon]
2124
indent_size = 2

.env.example

Lines changed: 0 additions & 2 deletions
This file was deleted.

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
.* export-ignore
33
*.dist export-ignore
44
*.xml export-ignore
5+
*.yml export-ignore
56
/docs export-ignore
67
/tests export-ignore
78
/Makefile export-ignore
9+
/Dockerfile export-ignore
810
/support export-ignore
911
/stubs export-ignore

.github/workflows/linter.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ on:
1818
- '.gitattributes'
1919
- '.editorconfig'
2020
- 'docker-compose.yml'
21+
- 'Dockerfile'
2122
- 'Makefile'
23+
- 'phpunit.xml.dist'
2224

2325
push: *ignore-paths
2426

.github/workflows/main.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,12 @@ on:
1414
- '.gitignore'
1515
- '.gitattributes'
1616
- '.editorconfig'
17+
- 'phpunit.xml.dist'
1718

1819
push:
1920
branches: [ 'master' ]
2021
paths-ignore: *ignore-paths
2122

22-
env:
23-
COMPOSE_PROJECT_NAME: yii2-queue
24-
COMPOSE_FILE: tests/docker-compose.yml
2523
jobs:
2624
phpunit:
2725
name: PHP ${{ matrix.php }}

.github/workflows/static.yml

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1+
name: static analysis
2+
3+
permissions:
4+
contents: read
5+
16
on:
2-
pull_request:
3-
paths-ignore: &ignore-paths
7+
pull_request: &ignore-paths
8+
paths-ignore:
49
- 'docs/**'
510
- '.github/CONTRIBUTING.md'
611
- '.github/FUNDING.yml'
@@ -12,31 +17,15 @@ on:
1217
- '.gitignore'
1318
- '.gitattributes'
1419
- '.editorconfig'
20+
- 'docker-compose.yml'
21+
- 'Dockerfile'
22+
- 'Makefile'
1523
- 'phpunit.xml.dist'
1624

17-
push:
18-
branches: [ 'master' ]
19-
paths-ignore: *ignore-paths
25+
push: *ignore-paths
2026

21-
name: static analysis
22-
23-
permissions:
24-
contents: read
25-
26-
env:
27-
COMPOSE_PROJECT_NAME: yii2-queue
28-
COMPOSE_FILE: tests/docker-compose.yml
2927
jobs:
30-
psalm:
31-
name: PHP ${{ matrix.php }}
32-
runs-on: ubuntu-latest
33-
strategy:
34-
fail-fast: false
35-
matrix:
36-
php: [ '8.3', '8.4', '8.5' ]
37-
steps:
38-
- name: Checkout.
39-
uses: actions/checkout@v2
40-
41-
- name: Run static analyzes for PHP ${{ matrix.php }}
42-
run: make static-analyze v=${{ matrix.php }}
28+
phpstan:
29+
uses: yiisoft/yii2-actions/.github/workflows/phpstan.yml@master
30+
with:
31+
extensions: amqp

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ composer.lock
1717
# PHP CS Fixer
1818
.php_cs.cache
1919

20-
# Env variables
21-
.env
22-
2320
# PHP Unit cache
2421
.phpunit.result.cache
2522
.phpunit.cache
23+
coverage.xml
24+
25+
runtime

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Yii2 Queue Extension Change Log
44
3.0.0 under development
55
---
66
- Enh #542: The minimum supported PHP version is 8.3 (@s1lver)
7-
- Enh #503: Added PSALM for static code analysis. Error level set to 1 (@s1lver)
7+
- Enh #503, #546: Added PHPStan for static code analysis. Error level set to 8 (@s1lver)
88
- Enh #503: Added strict typing (@s1lver)
99
- Enh #542: The `pda/pheanstalk` package of the Beanstalk driver has been updated to version 8.* (@s1lver)
1010
- Enh #503: Removed deprecated interfaces `RetryableJob`, `Job`, `Serializer` (@s1lver)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
3232
COPY . /code
3333
WORKDIR /code
3434

35-
ENTRYPOINT ["tests/docker/php/entrypoint.sh"]
35+
ENTRYPOINT ["tests/docker/entrypoint.sh"]
3636
CMD ["sleep", "infinity"]

0 commit comments

Comments
 (0)