Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
17cdbc1
Speed up local checks and silence warnings
spawnia Oct 25, 2026
28e5b9e
Add parameter and return types to RoleFactory closures
spawnia Oct 25, 2026
8f4effe
Ignore only argument.type for chr in RoleFactory
spawnia Oct 25, 2026
d2c1052
Bump GitHub Actions and local PHP and Node images
spawnia Oct 25, 2026
319a50c
Pin prettier_action to v4.6
spawnia Oct 25, 2026
5b54018
Prettify docs
spawnia Oct 25, 2026
2928d73
Keep Rector and prettier caches between runs
spawnia Oct 25, 2026
3f7b3c8
Revert "Prettify docs"
spawnia Oct 25, 2026
3cad96e
Run prettier from docs/package.json in CI
spawnia Oct 25, 2026
8e17205
Skip gitignored paths in php-cs-fixer
spawnia Oct 25, 2026
96b0f22
Remove unused dev dependencies predis and algolia
spawnia Oct 25, 2026
59463c5
Remove duplicate PHPStan excludePaths entry
spawnia Oct 25, 2026
482a303
Remove permission for nonexistent make target up
spawnia Oct 25, 2026
311299a
Remove composer --no-suggest, a no-op since Composer 2
spawnia Oct 25, 2026
410d921
Remove checkout ref github.head_ref from workflows without pull_request
spawnia Oct 25, 2026
2cc553f
Remove unused env and single-value os matrix from validate workflow
spawnia Oct 25, 2026
0b54ca1
Stop installing the unused mysqli extension
spawnia Oct 25, 2026
dcc53a1
Stop ignoring build, which no tool writes
spawnia Oct 25, 2026
14ffdd0
Remove commented-out PHPStan option and self-evident matrix comments
spawnia Oct 25, 2026
ad05451
Export-ignore remaining dev-only files
spawnia Oct 25, 2026
003b25f
Inline single-value matrices in coverage and benchmarks jobs
spawnia Oct 25, 2026
7020827
Format with PHP 8.5 to match CI and php.dockerfile
spawnia Oct 25, 2026
57a9c86
Share one node image between node-docs and node-tools
spawnia Oct 25, 2026
611bf74
Report unmatched PHPStan ignore patterns
spawnia Oct 25, 2026
ec02b47
Share proto update and install steps between Makefile and workflows
spawnia Oct 25, 2026
00440a3
Define the shared job matrix once in validate workflow
spawnia Oct 25, 2026
f0e0889
Link the PHPStan level TODO to its tracking issue
spawnia Oct 25, 2026
9b5b37a
Restore algolia/algoliasearch-client-php for PHPStan
spawnia Oct 25, 2026
49fc035
Remove PHPStan ignores that match nothing in any CI job
spawnia Oct 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .ai/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"Bash(docker compose up:*)",
"Bash(make setup)",
"Bash(make it)",
"Bash(make up)",
"Bash(make build)",
"Bash(make test)",
"Bash(make stan)",
Expand Down
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
* text=auto

/.ai export-ignore
/.github export-ignore
/bin export-ignore
/benchmarks export-ignore
/docs export-ignore
/tests export-ignore
Expand All @@ -9,6 +11,8 @@
/.gitattributes export-ignore
/.gitignore export-ignore
/.php-cs-fixer.php export-ignore
/.worktreeinclude export-ignore
/buf.gen.yaml export-ignore
/CHANGELOG.md export-ignore
/CONTRIBUTING.md export-ignore
/docker-compose.yml export-ignore
Expand All @@ -18,7 +22,9 @@
/node.dockerfile export-ignore
/php.dockerfile export-ignore
/phpbench.json export-ignore
/phpstan-bootstrap.php export-ignore
/phpstan.neon export-ignore
/phpunit.xml.dist export-ignore
/rector.php export-ignore
/SECURITY.md export-ignore
/UPGRADE.md export-ignore
41 changes: 21 additions & 20 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,59 +8,60 @@ jobs:
composer-normalize:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- uses: actions/checkout@v7

- uses: shivammathur/setup-php@v2
with:
php-version: 8.3
php-version: 8.5
coverage: none
extensions: mbstring

- run: composer install --no-interaction --no-progress --no-suggest
- run: composer install --no-interaction --no-progress

- run: composer normalize

- uses: stefanzweifel/git-auto-commit-action@v4
- uses: stefanzweifel/git-auto-commit-action@v7
with:
commit_message: Normalize composer.json

prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- uses: actions/setup-node@v7
with:
ref: ${{ github.head_ref }}
node-version: 24
cache: yarn
cache-dependency-path: docs/yarn.lock

- run: yarn install --frozen-lockfile
working-directory: docs

- uses: creyD/prettier_action@v2.2
- run: yarn run prettify
working-directory: docs

- uses: stefanzweifel/git-auto-commit-action@v7
with:
prettier_version: 2.8.8
prettier_options: --write --tab-width=2 docs/**/**/*.md docs/**/*.js
branch: ${{ github.head_ref }}
commit_message: Prettify docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

php-cs-fixer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- uses: actions/checkout@v7

- uses: shivammathur/setup-php@v2
with:
php-version: 8.3
php-version: 8.5
coverage: none
extensions: mbstring

- run: composer install --no-interaction --no-progress --no-suggest
- run: composer install --no-interaction --no-progress

- run: vendor/bin/php-cs-fixer fix

- run: git pull

- uses: stefanzweifel/git-auto-commit-action@v4
- uses: stefanzweifel/git-auto-commit-action@v7
with:
commit_message: Apply php-cs-fixer changes
14 changes: 5 additions & 9 deletions .github/workflows/generate-proto-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,18 @@ jobs:
generate-proto-code:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- uses: actions/checkout@v7

- uses: bufbuild/buf-action@v1
with:
setup_only: true

- run: |
buf generate
rm -rf src/Tracing/FederatedTracing/Proto
mv proto-tmp/Nuwave/Lighthouse/Tracing/FederatedTracing/Proto src/Tracing/FederatedTracing/Proto
rm -rf proto-tmp
- run: buf generate

- run: bin/install-generated-proto.sh

- run: git pull

- uses: stefanzweifel/git-auto-commit-action@v5
- uses: stefanzweifel/git-auto-commit-action@v7
with:
commit_message: Apply proto changes
14 changes: 3 additions & 11 deletions .github/workflows/update-reports-proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,11 @@ jobs:
update-reports-proto:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- run: curl -sSfo src/Tracing/FederatedTracing/reports.proto https://usage-reporting.api.apollographql.com/proto/reports.proto
- uses: actions/checkout@v7

- run: |
sed -i 's/ \[(js_use_toArray) = true]//g' src/Tracing/FederatedTracing/reports.proto
sed -i 's/ \[(js_preEncoded) = true]//g' src/Tracing/FederatedTracing/reports.proto
sed -i '3 i option php_namespace = "Nuwave\\\\Lighthouse\\\\Tracing\\\\FederatedTracing\\\\Proto";' src/Tracing/FederatedTracing/reports.proto
sed -i '4 i option php_metadata_namespace = "Nuwave\\\\Lighthouse\\\\Tracing\\\\FederatedTracing\\\\Proto\\\\Metadata";' src/Tracing/FederatedTracing/reports.proto
- run: bin/update-reports-proto.sh

- uses: peter-evans/create-pull-request@v5
- uses: peter-evans/create-pull-request@v8
with:
title: Update `reports.proto`
commit-message: Update `reports.proto`
Expand Down
94 changes: 24 additions & 70 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ on:
- master

env:
REQUIRED_PHP_EXTENSIONS: mbstring, mysqli, pdo_mysql, redis
LIGHTHOUSE_TEST_DB_USER: root
REQUIRED_PHP_EXTENSIONS: mbstring, pdo_mysql, redis
LIGHTHOUSE_TEST_DB_PASSWORD: root
LIGHTHOUSE_TEST_DB_HOST: 127.0.0.1
LIGHTHOUSE_TEST_REDIS_HOST: 127.0.0.1
Expand All @@ -21,7 +20,7 @@ jobs:

strategy:
fail-fast: false
matrix:
matrix: &matrix
php-version:
- "8.0"
- "8.1"
Expand All @@ -39,7 +38,7 @@ jobs:
- name: lowest
arg: "--prefer-lowest --prefer-stable"
- name: highest
arg: "" # No args added as highest is default
arg: ""
exclude:
- php-version: "8.0"
laravel-version: "^10"
Expand All @@ -59,7 +58,7 @@ jobs:
laravel-version: "^13"

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- uses: shivammathur/setup-php@v2
with:
Expand All @@ -68,10 +67,10 @@ jobs:
extensions: ${{ env.REQUIRED_PHP_EXTENSIONS }}

- name: "Cache composer dependencies"
uses: actions/cache@v3
uses: actions/cache@v6
with:
path: ~/.composer/cache
key: php-${{ matrix.php-version }}-composer-${{ matrix.laravel-version }}-os-${{ matrix.os }}-composer-${{ matrix.composer.name }}
key: php-${{ matrix.php-version }}-composer-${{ matrix.laravel-version }}-composer-${{ matrix.composer.name }}

- name: "Remove conflicting dependencies that are not needed here"
run: composer remove --dev --no-update phpbench/phpbench rector/rector
Expand All @@ -93,48 +92,11 @@ jobs:

tests:
name: PHPUnit on PHP ${{ matrix.php-version }} with Laravel ${{ matrix.laravel-version }} and ${{ matrix.composer.name }} dependencies
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php-version:
- "8.0"
- "8.1"
- "8.2"
- "8.3"
- "8.4"
- "8.5"
laravel-version:
- "^9"
- "^10"
- "^11"
- "^12"
- "^13"
os:
- ubuntu-latest
composer:
- name: lowest
arg: "--prefer-lowest --prefer-stable"
- name: highest
arg: "" # No args added as highest is default
exclude:
- php-version: "8.0"
laravel-version: "^10"
- php-version: "8.0"
laravel-version: "^11"
- php-version: "8.1"
laravel-version: "^11"
- php-version: "8.0"
laravel-version: "^12"
- php-version: "8.1"
laravel-version: "^12"
- php-version: "8.0"
laravel-version: "^13"
- php-version: "8.1"
laravel-version: "^13"
- php-version: "8.2"
laravel-version: "^13"
matrix: *matrix

services:
mysql:
Expand All @@ -152,7 +114,7 @@ jobs:
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- uses: shivammathur/setup-php@v2
with:
Expand All @@ -162,10 +124,10 @@ jobs:
ini-values: zend.assertions=1

- name: "Cache composer dependencies"
uses: actions/cache@v3
uses: actions/cache@v6
with:
path: ~/.composer/cache
key: php-${{ matrix.php-version }}-composer-${{ matrix.laravel-version }}-os-${{ matrix.os }}-composer-${{ matrix.composer.name }}
key: php-${{ matrix.php-version }}-composer-${{ matrix.laravel-version }}-composer-${{ matrix.composer.name }}

- name: "Remove conflicting dependencies that are not needed here"
run: composer remove --dev --no-update phpstan/phpstan-mockery phpbench/phpbench
Expand All @@ -188,11 +150,6 @@ jobs:
coverage:
runs-on: ubuntu-latest

strategy:
matrix:
php-version: ["8.5"]
laravel-version: ["^13"]

services:
mysql:
image: mysql:5.7
Expand All @@ -209,53 +166,50 @@ jobs:
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
php-version: "8.5"
coverage: pcov
extensions: ${{ env.REQUIRED_PHP_EXTENSIONS }}
ini-values: zend.assertions=1

- name: "Cache composer dependencies"
uses: actions/cache@v3
uses: actions/cache@v6
with:
path: ~/.composer/cache
key: php-${{ matrix.php-version }}-composer-${{ matrix.laravel-version }}
key: php-8.5-composer-^13

- run: composer remove --dev phpbench/phpbench --no-update

- run: composer require laravel/framework:${{ matrix.laravel-version }} --no-interaction --prefer-dist --no-progress
- run: composer require laravel/framework:^13 --no-interaction --prefer-dist --no-progress

- run: vendor/bin/phpunit --coverage-clover=coverage.xml

- name: "Upload to Codecov"
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}

benchmarks:
runs-on: ubuntu-latest

strategy:
matrix:
php-version: ["8.5"]
laravel-version: ["^13"]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
php-version: "8.5"
coverage: none
extensions: ${{ env.REQUIRED_PHP_EXTENSIONS }}

- name: "Cache composer dependencies"
uses: actions/cache@v3
uses: actions/cache@v6
with:
path: ~/.composer/cache
key: php-${{ matrix.php-version }}-composer-${{ matrix.laravel-version }}
key: php-8.5-composer-^13

- run: composer require laravel/framework:${{ matrix.laravel-version }} --no-interaction --prefer-dist --no-progress
- run: composer require laravel/framework:^13 --no-interaction --prefer-dist --no-progress

- run: vendor/bin/phpbench run --progress=none --report=aggregate
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ docs/superpowers
# Generated files
.phpunit.result.cache
.php-cs-fixer.cache
build
phpstan-tmp-dir
rector-tmp-dir
proto-tmp

# composer
Expand Down
5 changes: 2 additions & 3 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
->in(__DIR__)
->name('*.php')
->notPath('src/Tracing/FederatedTracing/Proto')
->notPath('vendor')
->notPath('phpstan-tmp-dir')
->ignoreDotFiles(false)
->ignoreVCS(true);
->ignoreVCS(true)
->ignoreVCSIgnored(true);

return MLL\PhpCsFixerConfig\risky($finder, [
'general_phpdoc_annotation_remove' => [
Expand Down
Loading
Loading