Skip to content

Commit

Permalink
Move PHP-CS-Fixer to CI (bamarni#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
theofidry committed Jul 10, 2022
1 parent 1b22452 commit 917e1b8
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 12 deletions.
10 changes: 0 additions & 10 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ jobs:
php-version: "${{ matrix.php }}"
tools: "composer"

# It is not used in the CI and the PHP constraints may not match
# the CI.
- name: "Remove PHP-CS-Fixer"
run: composer remove --dev --no-update php-cs-fixer/shim

- name: "Install Composer dependencies"
uses: "ramsey/composer-install@v2"
with:
Expand Down Expand Up @@ -66,11 +61,6 @@ jobs:
php-version: "${{ matrix.php }}"
tools: "composer"

# It is not used in the CI and the PHP constraints may not match
# the CI.
- name: "Remove PHP-CS-Fixer"
run: composer remove --dev --no-update php-cs-fixer/shim

- name: "Correct bin plugin version for e2e scenarios (PR-only)"
if: github.event_name == 'pull_request'
run: find e2e -maxdepth 1 -mindepth 1 -type d -exec bash -c "cd {} && composer require --dev bamarni/composer-bin-plugin:dev-${GITHUB_SHA} --no-update" \;
Expand Down
1 change: 1 addition & 0 deletions .phive/phars.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
<phive xmlns="https://phar.io/phive">
<phar name="composer-normalize" version="^2.28.3" installed="2.28.3" location="./tools/composer-normalize" copy="false"/>
<phar name="infection" version="^0.26.13" installed="0.26.13" location="./tools/infection" copy="false"/>
<phar name="php-cs-fixer" version="^3.8.0" installed="3.8.0" location="./tools/php-cs-fixer" copy="false"/>
</phive>
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ PHPUNIT = php -d zend.enable_gc=0 $(PHPUNIT_BIN)
PHPUNIT_COVERAGE = XDEBUG_MODE=coverage $(PHPUNIT) --group default --coverage-xml=$(COVERAGE_DIR)/coverage-xml --log-junit=$(COVERAGE_DIR)/phpunit.junit.xml
PHPSTAN_BIN = vendor/bin/phpstan
PHPSTAN = $(PHPSTAN_BIN) analyse src tests
PHP_CS_FIXER_BIN = vendor/bin/php-cs-fixer
PHP_CS_FIXER_BIN = tools/php-cs-fixer
PHP_CS_FIXER = $(PHP_CS_FIXER_BIN) fix --ansi --verbose --config=.php-cs-fixer.php
COMPOSER_NORMALIZE_BIN=tools/composer-normalize
COMPOSER_NORMALIZE = ./$(COMPOSER_NORMALIZE_BIN)
Expand Down Expand Up @@ -114,6 +114,7 @@ $(COVERAGE_DIR): $(PHPUNIT_BIN) src tests phpunit.xml.dist
$(TOUCH) "$@"

$(PHP_CS_FIXER_BIN): vendor
phive install php-cs-fixer
$(TOUCH) "$@"

$(PHPSTAN_BIN): vendor
Expand Down
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"require-dev": {
"ext-json": "*",
"composer/composer": "^2.0",
"php-cs-fixer/shim": "^3.8",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^1.8",
"phpstan/phpstan-phpunit": "^1.1",
Expand Down

0 comments on commit 917e1b8

Please sign in to comment.