Skip to content

Commit cf5912d

Browse files
committed
Revert "Next-gen coding standard workflow"
This reverts commit 4255c03.
1 parent 4255c03 commit cf5912d

File tree

9 files changed

+464
-21
lines changed

9 files changed

+464
-21
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ tmp export-ignore
66
.gitattributes export-ignore
77
.gitignore export-ignore
88
Makefile export-ignore
9+
phpcs.xml export-ignore
910
phpstan.neon export-ignore
1011
phpunit.xml export-ignore

.github/renovate.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
"enabled": true,
1515
"groupName": "root-composer"
1616
},
17+
{
18+
"matchPaths": ["build-cs/**"],
19+
"enabled": true,
20+
"groupName": "build-cs"
21+
},
1722
{
1823
"matchPaths": [".github/**"],
1924
"enabled": true,

.github/workflows/build.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
- name: "Lint"
4343
run: "make lint"
4444

45-
coding-standard:
45+
coding-standards:
4646
name: "Coding Standard"
4747

4848
runs-on: "ubuntu-latest"
@@ -51,28 +51,18 @@ jobs:
5151
- name: "Checkout"
5252
uses: actions/checkout@v3
5353

54-
- name: "Checkout build-cs"
55-
uses: actions/checkout@v3
56-
with:
57-
repository: "phpstan/build-cs"
58-
path: "build-cs"
59-
6054
- name: "Install PHP"
6155
uses: "shivammathur/setup-php@v2"
6256
with:
6357
coverage: "none"
64-
php-version: "8.2"
58+
php-version: "8.0"
6559

6660
- name: "Validate Composer"
6761
run: "composer validate"
6862

6963
- name: "Install dependencies"
7064
run: "composer install --no-interaction --no-progress"
7165

72-
- name: "Install build-cs dependencies"
73-
working-directory: "build-cs"
74-
run: "composer install --no-interaction --no-progress"
75-
7666
- name: "Lint"
7767
run: "make lint"
7868

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/src/GeneratedConfig.php
2-
/build-cs
32
/vendor
43
/composer.lock
54
.phpunit.result.cache

Makefile

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,13 @@ lint:
66
php vendor/bin/parallel-lint --colors \
77
src
88

9-
.PHONY: cs-install
10-
cs-install:
11-
git clone https://github.com/phpstan/build-cs.git || true
12-
git -C build-cs fetch origin && git -C build-cs reset --hard origin/main
13-
composer install --working-dir build-cs
14-
159
.PHONY: cs
1610
cs:
17-
php build-cs/vendor/bin/phpcs --standard=build-cs/phpcs.xml src
11+
composer install --working-dir build-cs && php build-cs/vendor/bin/phpcs
1812

1913
.PHONY: cs-fix
2014
cs-fix:
21-
php build-cs/vendor/bin/phpcbf --standard=build-cs/phpcs.xml src
15+
php build-cs/vendor/bin/phpcbf
2216

2317
.PHONY: phpstan
2418
phpstan:

build-cs/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/vendor

build-cs/composer.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"require-dev": {
3+
"consistence-community/coding-standard": "^3.11.0",
4+
"dealerdirect/phpcodesniffer-composer-installer": "^1.0.0",
5+
"slevomat/coding-standard": "^8.8.0",
6+
"squizlabs/php_codesniffer": "^3.5.3"
7+
},
8+
"config": {
9+
"allow-plugins": {
10+
"dealerdirect/phpcodesniffer-composer-installer": true
11+
}
12+
}
13+
}

0 commit comments

Comments
 (0)