Skip to content

Commit 1d0d3ad

Browse files
committed
Lint on all PHP versions
1 parent 1dca53a commit 1d0d3ad

File tree

3 files changed

+41
-2
lines changed

3 files changed

+41
-2
lines changed

.github/workflows/build.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,45 @@ env:
1212
COMPOSER_ROOT_VERSION: "0.12.x-dev"
1313

1414
jobs:
15+
lint:
16+
name: "Lint"
17+
18+
runs-on: "ubuntu-latest"
19+
20+
strategy:
21+
matrix:
22+
php-version:
23+
- "7.1"
24+
- "7.2"
25+
- "7.3"
26+
- "7.4"
27+
28+
steps:
29+
- name: "Checkout"
30+
uses: "actions/checkout@v2.0.0"
31+
32+
- name: "Install PHP"
33+
uses: "shivammathur/setup-php@1.8.2"
34+
with:
35+
coverage: "none"
36+
php-version: "${{ matrix.php-version }}"
37+
38+
- name: "Validate Composer"
39+
run: "composer validate"
40+
41+
- name: "Cache dependencies"
42+
uses: "actions/cache@v1.1.2"
43+
with:
44+
path: "~/.composer/cache"
45+
key: "php-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}"
46+
restore-keys: "php-${{ matrix.php-version }}-composer-"
47+
48+
- name: "Install dependencies"
49+
run: "composer update --no-interaction --no-progress --no-suggest"
50+
51+
- name: "Lint"
52+
run: "vendor/bin/phing lint"
53+
1554
coding-standards:
1655
name: "Coding Standard"
1756

tests/PHPStan/Rules/Variables/data/isset-native-property-types.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php
1+
<?php // lint >= 7.4
22

33
namespace IssetNativePropertyTypes;
44

tests/PHPStan/Rules/Variables/data/variable-certainty-null-assign.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php
1+
<?php // lint >= 7.4
22

33
function (): void {
44
$scalar = 3;

0 commit comments

Comments
 (0)