diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a4fcc55c5e..bba33cee80 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -25,11 +25,10 @@ jobs: uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} - - name: Install php-cs-fixer - run: | - mkdir -p tools/php-cs-fixer - composer require --working-dir=tools/php-cs-fixer friendsofphp/php-cs-fixer --dev - composer require --working-dir=tools/php-cs-fixer ibexa/code-style:^1.0 --dev + - uses: "ramsey/composer-install@v3" + with: + working-directory: "tools/php-cs-fixer" + dependency-versions: highest - name: Run PHP CS Fixer run: tools/php-cs-fixer/vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php -v --show-progress=dots - name: Commit changes diff --git a/.gitignore b/.gitignore index 03836bc3de..d30a4f0faa 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,4 @@ __pycache__/* **/.idea/ .php-cs-fixer.cache composer.lock -tools/php-cs-fixer +tools/php-cs-fixer/vendor diff --git a/tools/php-cs-fixer/composer.json b/tools/php-cs-fixer/composer.json new file mode 100644 index 0000000000..f0e7e4f4bc --- /dev/null +++ b/tools/php-cs-fixer/composer.json @@ -0,0 +1,6 @@ +{ + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.59", + "ibexa/code-style": "^1.0" + } +}