Skip to content

Commit 65a71ff

Browse files
committed
ci: fix failing workflows
code-quality.yml — dependencies job: - Add composer install --no-scripts before check-platform-reqs (check-platform-reqs fails without an installed vendor/ on libraries that do not commit composer.lock) - Add Composer cache (keyed on composer.json since no lock file) - Drop --no-dev flag on check-platform-reqs (dev deps are installed) ci.yml — build-phar job: - Remove wget humbug/box step (box replaced by bin/build-phar.php) - Add --no-scripts to composer install - Replace 'box compile --config=box.json' with 'php -d phar.readonly=0 bin/build-phar.php'
1 parent c2f3da3 commit 65a71ff

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,11 @@ jobs:
4848
extensions: phar, zlib
4949
ini-values: phar.readonly=0
5050

51-
- name: Install humbug/box
52-
run: |
53-
wget -q -O box https://github.com/box-project/box/releases/latest/download/box.phar
54-
chmod +x box
55-
sudo mv box /usr/local/bin/box
56-
5751
- name: Install dependencies
58-
run: composer install --no-interaction --prefer-dist --optimize-autoloader
52+
run: composer install --no-interaction --prefer-dist --optimize-autoloader --no-scripts
5953

6054
- name: Compile PHAR
61-
run: php -d phar.readonly=0 box compile --config=box.json
55+
run: php -d phar.readonly=0 bin/build-phar.php
6256

6357
- name: Verify PHAR
6458
run: |

.github/workflows/code-quality.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,22 @@ jobs:
3232
- name: Validate composer.json
3333
run: composer validate --strict --no-check-lock
3434

35+
- name: Get Composer cache directory
36+
id: composer-cache
37+
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"
38+
39+
- name: Cache dependencies
40+
uses: actions/cache@v4
41+
with:
42+
path: ${{ steps.composer-cache.outputs.dir }}
43+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
44+
restore-keys: ${{ runner.os }}-composer-
45+
46+
- name: Install dependencies
47+
run: composer install --prefer-dist --no-progress --no-scripts
48+
3549
- name: Check platform requirements
36-
run: composer check-platform-reqs --no-dev
50+
run: composer check-platform-reqs
3751

3852
# ============================================================================
3953
# SECURITY AUDIT

0 commit comments

Comments
 (0)