Skip to content

Commit 150818d

Browse files
authored
Lint sources on PHP 7.x via Github Action (#4016)
* Lint sources on PHP 7.x via Github Action * Skip PHP8 only files * Fix PHP7 compat in rc/Component/PharUpdate/Update.php * Simplify workflow * Simplify even more
1 parent 4487612 commit 150818d

File tree

4 files changed

+28
-3
lines changed

4 files changed

+28
-3
lines changed

.github/workflows/lint.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: test
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
types: [opened, synchronize, reopened, ready_for_review]
8+
9+
jobs:
10+
unit:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
php-versions: [ '7.4' ]
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Setup PHP
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: ${{ matrix.php-versions }}
22+
tools: cs2pr, parallel-lint
23+
24+
- name: Lint sources
25+
run: composer exec --no-interaction -- parallel-lint bin/ contrib/ recipe/ src/ tests/ --checkstyle | cs2pr

src/Component/PharUpdate/Update.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public function copyTo(string $file): void
101101
);
102102
}
103103

104-
$mode = 0o755;
104+
$mode = 0755;
105105

106106
if (file_exists($file)) {
107107
$mode = fileperms($file) & 511;

src/Documentation/DocGen.php

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

33
declare(strict_types=1);
44

tests/legacy/recipe/named_arguments.php

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

33
namespace Deployer;
44

0 commit comments

Comments
 (0)