Skip to content

Commit 983a6a9

Browse files
authored
Up minimal PHP version to 7.2 and integrate CodeStyle checking (#4)
1 parent 4311274 commit 983a6a9

File tree

4 files changed

+56
-12
lines changed

4 files changed

+56
-12
lines changed

.github/workflows/main.yml

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ on:
1010

1111
jobs: # Docs: <https://help.github.com/en/articles/workflow-syntax-for-github-actions>
1212
tests:
13-
name: PHP ${{ matrix.php }}, ${{ matrix.setup }} setup
13+
name: PHP ${{ matrix.php }} (${{ matrix.setup }} setup)
1414
runs-on: ubuntu-latest
1515
timeout-minutes: 10
1616
strategy:
1717
fail-fast: false
1818
matrix:
1919
setup: ['basic', 'lowest']
20-
php: ['7.1', '7.2', '7.3', '7.4']
20+
php: ['7.2', '7.3', '7.4']
2121
include:
22-
- php: '7.1'
22+
- php: '7.2'
2323
setup: 'basic'
2424
coverage: 'true'
2525
- php: '7.4'
@@ -60,7 +60,7 @@ jobs: # Docs: <https://help.github.com/en/articles/workflow-syntax-for-github-ac
6060
run: composer update --prefer-dist --no-interaction --no-suggest
6161

6262
- name: Show most important packages versions
63-
run: composer info | grep -e laravel/laravel -e phpunit/phpunit -e phpstan/phpstan
63+
run: composer info | grep -e laravel -e spiral -e phpunit/phpunit -e phpstan/phpstan
6464

6565
- name: Execute tests
6666
if: matrix.coverage != 'true'
@@ -76,3 +76,38 @@ jobs: # Docs: <https://help.github.com/en/articles/workflow-syntax-for-github-ac
7676
token: ${{ secrets.CODECOV_TOKEN }}
7777
file: ./coverage/clover.xml
7878
fail_ci_if_error: false
79+
80+
cs-check:
81+
name: Check Code Style
82+
runs-on: ubuntu-latest
83+
steps:
84+
- name: Check out code
85+
uses: actions/checkout@v2
86+
with:
87+
fetch-depth: 1
88+
89+
- name: Setup PHP, with composer and extensions
90+
uses: shivammathur/setup-php@master
91+
with:
92+
php-version: 7.4
93+
extensions: mbstring
94+
95+
- name: Get Composer Cache Directory
96+
id: composer-cache
97+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
98+
99+
- name: Cache dependencies
100+
uses: actions/cache@v1
101+
with:
102+
path: ${{ steps.composer-cache.outputs.dir }}
103+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
104+
restore-keys: ${{ runner.os }}-composer-
105+
106+
- name: Install Composer 'hirak/prestissimo' package
107+
run: composer global require hirak/prestissimo --update-no-dev
108+
109+
- name: Install Composer dependencies
110+
run: composer update --prefer-dist --no-interaction --no-suggest
111+
112+
- name: Execute check
113+
run: composer cs-check

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog][keepachangelog] and this project adheres to [Semantic Versioning][semver].
66

7+
## v3.4.0
8+
9+
### Added
10+
11+
- Source code style checking using `spiral/code-style` package [#3]
12+
13+
### Changed
14+
15+
- Minimal required PHP version now is `7.2` [#3]
16+
17+
[#3]:https://github.com/spiral/roadrunner-laravel/issues/3
18+
719
## v3.3.0
820

921
### Added

TODO.md

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

composer.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
}
1616
],
1717
"require": {
18-
"php": "^7.1.3",
18+
"php": "^7.2",
1919
"ext-mbstring": "*",
2020
"illuminate/contracts": "^5.5 || ~6.0 || ~7.0",
2121
"illuminate/support": "^5.5 || ~6.0 || ~7.0",
@@ -32,7 +32,8 @@
3232
"laravel/laravel": "^5.5 || ~6.0 || ~7.0",
3333
"mockery/mockery": "^1.3",
3434
"phpstan/phpstan": "~0.12",
35-
"phpunit/phpunit": "^6.4 || ~7.5"
35+
"phpunit/phpunit": "^6.4 || ~7.5",
36+
"spiral/code-style": "^1.0"
3637
},
3738
"autoload": {
3839
"psr-4": {
@@ -51,6 +52,8 @@
5152
"phpunit": "@php ./vendor/bin/phpunit --no-coverage --colors=always",
5253
"phpunit-cover": "@php ./vendor/bin/phpunit",
5354
"phpstan": "@php ./vendor/bin/phpstan analyze -c ./phpstan.neon.dist --no-progress --ansi",
55+
"cs-check": "@php ./vendor/bin/spiral-cs check ./bin ./src ./tests --ansi",
56+
"cs-fix": "@php ./vendor/bin/spiral-cs fix ./bin ./src ./tests --ansi",
5457
"test": [
5558
"@phpstan",
5659
"@phpunit"

0 commit comments

Comments
 (0)