Skip to content

Commit b21f8d3

Browse files
committed
Do not run php-cs-fixer on PHP 8 until it is supported
1 parent 26a0bf3 commit b21f8d3

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ jobs:
3434

3535
- name: Test & package
3636
if: matrix.deps == 'high'
37-
run: make install test -o cs
37+
run: make install test
3838

39-
# Separate CS and package step until PHP 8.0 is supported
39+
# Separate package step until PHP 8.0 is supported
4040
- name: Coding standards
4141
if: matrix.php != '8.0'
42-
run: make cs package
42+
run: make package
4343

4444
- name: Test & package (min)
4545
if: matrix.deps == 'low'

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
IS_PHP8:=$(shell php -r 'echo (int)version_compare(PHP_VERSION, "8.0", ">=");')
2+
13
default: build
24

35
build: install test
@@ -29,12 +31,20 @@ test-package: test-package-tools
2931
cd tests/phar && ./tools/phpunit
3032
.PHONY: test-package
3133

34+
ifeq ($(IS_PHP8),1)
35+
cs:
36+
else
3237
cs: tools/php-cs-fixer
3338
tools/php-cs-fixer --dry-run --allow-risky=yes --no-interaction --ansi fix
39+
endif
3440
.PHONY: cs
3541

42+
ifeq ($(IS_PHP8),1)
43+
cs-fix:
44+
else
3645
cs-fix: tools/php-cs-fixer
3746
tools/php-cs-fixer --allow-risky=yes --no-interaction --ansi fix
47+
endif
3848
.PHONY: cs-fix
3949

4050
phpunit: tools/phpunit

0 commit comments

Comments
 (0)