Skip to content

Commit 8b201a0

Browse files
s1lvermspirkov
andauthored
Apply Yii2 coding standards, raise min version to PHP 7.4, prepare to 3.0 version (#545)
Co-authored-by: Maksim Spirkov <63721828+mspirkov@users.noreply.github.com>
1 parent 95631f5 commit 8b201a0

151 files changed

Lines changed: 2747 additions & 2396 deletions

File tree

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
@@ -7,7 +7,6 @@
77
/.github
88
/.gitignore
99
/.php_cs.cache
10-
/.travis.yml
1110
/composer.lock
1211
/tests/runtime/*
1312
/vendor

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@ trim_trailing_whitespace = false
1616

1717
[Makefile]
1818
indent_style = tab
19+
20+
[*.yml]
21+
indent_size = 2

.env.example

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,2 @@
11
COMPOSE_PROJECT_NAME=yii2-queue
22
COMPOSE_FILE=tests/docker-compose.yml
3-
4-
AWS_SQS_ENABLED=
5-
AWS_SQS_URL=
6-
AWS_KEY=
7-
AWS_SECRET=
8-
AWS_REGION=
9-
AWS_SQS_FIFO_ENABLED=
10-
AWS_SQS_FIFO_URL=
11-
AWS_SQS_FIFO_MESSAGE_GROUP_ID=

.gitattributes

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
# Ignore all test and documentation for archive
2-
/.github export-ignore
2+
.* export-ignore
3+
*.dist export-ignore
4+
*.xml export-ignore
35
/docs export-ignore
46
/tests export-ignore
5-
/.dockerignore export-ignore
6-
/.editorconfig export-ignore
7-
/.env.example export-ignore
8-
/.gitattributes export-ignore
9-
/.gitignore export-ignore
10-
/.php_cs export-ignore
11-
/.travis.yml export-ignore
127
/Makefile export-ignore
13-
/phpunit.xml.dist export-ignore
8+
/support export-ignore
9+
/stubs export-ignore

.github/ISSUE_TEMPLATE.md

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

.github/PULL_REQUEST_TEMPLATE.md

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

.github/workflows/linter.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: linter
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
pull_request: &ignore-paths
8+
paths-ignore:
9+
- 'docs/**'
10+
- '.github/CONTRIBUTING.md'
11+
- '.github/FUNDING.yml'
12+
- '.github/SECURITY.md'
13+
- 'README.md'
14+
- 'CHANGELOG.md'
15+
- 'LICENSE.md'
16+
- 'UPGRADE.md'
17+
- '.gitignore'
18+
- '.gitattributes'
19+
- '.editorconfig'
20+
- 'docker-compose.yml'
21+
- 'Makefile'
22+
23+
push: *ignore-paths
24+
25+
jobs:
26+
phpcs:
27+
uses: yiisoft/yii2-actions/.github/workflows/linter.yml@master
28+
with:
29+
directories: src/ tests/
30+
extensions: 'amqp'

.github/workflows/main.yml

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,44 @@
11
name: build
22

3-
on: [push, workflow_dispatch, pull_request]
3+
on:
4+
pull_request:
5+
paths-ignore: &ignore-paths
6+
- 'docs/**'
7+
- '.github/CONTRIBUTING.md'
8+
- '.github/FUNDING.yml'
9+
- '.github/SECURITY.md'
10+
- 'README.md'
11+
- 'CHANGELOG.md'
12+
- 'LICENSE.md'
13+
- 'UPGRADE.md'
14+
- '.gitignore'
15+
- '.gitattributes'
16+
- '.editorconfig'
17+
18+
push:
19+
branches: [ 'master' ]
20+
paths-ignore: *ignore-paths
421

522
env:
623
COMPOSE_PROJECT_NAME: yii2-queue
724
COMPOSE_FILE: tests/docker-compose.yml
8-
AWS_SQS_ENABLED: ${{ secrets.AWS_SQS_ENABLED }}
9-
AWS_SQS_URL: ${{ secrets.AWS_SQS_URL }}
10-
AWS_KEY: ${{ secrets.AWS_KEY }}
11-
AWS_SECRET: ${{ secrets.AWS_SECRET }}
12-
AWS_REGION: ${{ secrets.AWS_REGION }}
13-
AWS_SQS_FIFO_ENABLED: ${{ secrets.AWS_SQS_FIFO_ENABLED }}
14-
AWS_SQS_FIFO_URL: ${{ secrets.AWS_SQS_FIFO_URL }}
15-
AWS_SQS_FIFO_MESSAGE_GROUP_ID: ${{ secrets.AWS_SQS_FIFO_MESSAGE_GROUP_ID }}
1625
jobs:
1726
phpunit:
1827
name: PHP ${{ matrix.php }}
1928
runs-on: ubuntu-latest
2029
strategy:
2130
fail-fast: false
2231
matrix:
23-
php: [ '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0' ]
32+
php: [ '8.3', '8.4', '8.5' ]
2433
steps:
25-
- name: Checkout
34+
- name: Checkout.
2635
uses: actions/checkout@v2
36+
2737
- name: PHP Unit tests for PHP ${{ matrix.php }}
2838
run: make test v=${{ matrix.php }}
39+
40+
- name: Upload coverage to Codecov.
41+
uses: codecov/codecov-action@v5
42+
with:
43+
files: ./coverage.xml
44+
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/static.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
on:
2+
pull_request:
3+
paths-ignore: &ignore-paths
4+
- 'docs/**'
5+
- '.github/CONTRIBUTING.md'
6+
- '.github/FUNDING.yml'
7+
- '.github/SECURITY.md'
8+
- 'README.md'
9+
- 'CHANGELOG.md'
10+
- 'LICENSE.md'
11+
- 'UPGRADE.md'
12+
- '.gitignore'
13+
- '.gitattributes'
14+
- '.editorconfig'
15+
- 'phpunit.xml.dist'
16+
17+
push:
18+
branches: [ 'master' ]
19+
paths-ignore: *ignore-paths
20+
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
29+
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 }}

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,7 @@ composer.lock
1919

2020
# Env variables
2121
.env
22+
23+
# PHP Unit cache
24+
.phpunit.result.cache
25+
.phpunit.cache

0 commit comments

Comments
 (0)