Skip to content

Update tooling and speed up local checks - #2810

Merged
spawnia merged 29 commits into
masterfrom
tooling
Oct 25, 2026
Merged

spawnia merged 29 commits into
masterfrom
tooling

Conversation

@spawnia

@spawnia spawnia commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator
  • Added or updated tests
  • Documented user facing changes

Changes

make took 68s and printed Rector warnings and 22 PHPUnit notices.
Now it takes 35s and runs clean.
GitHub Actions and the local PHP and Node images are on their latest majors.

Xdebug is off by default in the PHP image, which halves test time

Xdebug ran in develop mode on every run.
Tests dropped from 50s to 29s with xdebug.mode=off.
CONTRIBUTING.md shows how to enable it with XDEBUG_MODE=debug, and replaces the Xdebug 2 setting XDEBUG_REMOTE_HOST with XDEBUG_CONFIG="client_host=<ip>".

CI runs prettier from docs/package.json, like make prettier

creyD/prettier_action@v4 ignores prettier_version and formats with prettier 3, which conflicts with the local prettier 2.8.8.
The job now runs yarn run prettify in docs and commits through git-auto-commit-action.

Rector and prettier keep their caches between runs

Rector cached into the temporary directory of the removed container, so it now writes to rector-tmp-dir.
Prettier runs with --cache.
Rector dropped from 8s to 1s, prettier from 4s to 1s.

Actions with changed inputs got matching config

codecov/codecov-action@v7 gets the CODECOV_TOKEN secret, which newer versions require.
The other actions keep their inputs.

Local images run PHP 8.5 and Node 24, matching the newest CI versions

On PHP 8.5, PHPStan types chr() as int<0, 255>, so RoleFactory keeps a targeted @phpstan-ignore argument.type.

Tests use stubs where they configure no expectations

PHPUnit 12 flags mocks without expectations.
createStub replaces createMock in the subscription tests, and SubscriptionTest registers a plain resolver instead of mockResolverExpects($this->any()).

Dead tooling config is gone
  • Dev dependency predis/predis: tests use the phpredis extension.
  • The mysqli extension in CI and the PHP image: Laravel connects through pdo_mysql.
  • LIGHTHOUSE_TEST_DB_USER in CI: tests read LIGHTHOUSE_TEST_DB_USERNAME.
  • The single-value os matrix in the test job, which the job name does not include.
  • ref: ${{ github.head_ref }} in workflows without pull_request events, where it is always empty.
  • composer install --no-suggest, a no-op since Composer 2.
  • 8 phpstan.neon patterns and 25 inline @phpstan-ignore comments that match nothing in any CI job. reportUnmatchedIgnoredErrors stays off, because 55 inline ignores are needed only on some versions and have no per-comment opt-out.
  • A duplicate PHPStan excludePaths entry, a commented-out PHPStan option, the build entry in .gitignore and the permission for the nonexistent make up.
  • php-cs-fixer skips all gitignored paths, so it does not scan the Rector cache.
Rector skips 5 fewer rules

Rector reported them as deprecated or never registered.

Breaking changes

None.

Changelog

None.

🤖 Generated with Claude Code

spawnia and others added 6 commits October 25, 2026 10:54
Disable Xdebug by default in the PHP image, remove deprecated Rector skips
and use stubs instead of mocks without expectations.

🤖 Generated with Claude Code
🤖 Generated with Claude Code
Update all actions to their latest majors, pass the Codecov token
and move the prettier token to the github_token input.
Run PHP 8.5 and Node 24 locally to match the newest CI versions.

🤖 Generated with Claude Code
The action publishes no floating v4 tag.

🤖 Generated with Claude Code
@spawnia
spawnia requested a balanced review from Copilot October 25, 2026 10:07
Rector cached into the temporary directory of the removed container.

🤖 Generated with Claude Code
This reverts commit 5b54018.
prettier_action v4 ignores prettier_version and formats with prettier 3,
which conflicts with the local prettier 2.8.8.

🤖 Generated with Claude Code

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

It scanned the PHP files of the new Rector cache in rector-tmp-dir.

🤖 Generated with Claude Code
Tests connect to Redis through the phpredis extension
and set the Scout driver to null.

🤖 Generated with Claude Code
🤖 Generated with Claude Code
🤖 Generated with Claude Code
GitHub sets head_ref only for pull_request events, so it was always empty.

🤖 Generated with Claude Code
Tests read LIGHTHOUSE_TEST_DB_USERNAME, not LIGHTHOUSE_TEST_DB_USER.

🤖 Generated with Claude Code
Laravel connects to MySQL through pdo_mysql.

🤖 Generated with Claude Code
🤖 Generated with Claude Code
🤖 Generated with Claude Code
🤖 Generated with Claude Code
🤖 Generated with Claude Code
With older Scout versions, Larastan fails without the Algolia client.

🤖 Generated with Claude Code
Turn reportUnmatchedIgnoredErrors off again: inline ignores have no
per-comment opt-out, and 55 of them are needed only on some versions.

🤖 Generated with Claude Code
@spawnia
spawnia marked this pull request as ready for review October 25, 2026 11:44
@spawnia
spawnia merged commit e5cf1d9 into master Oct 25, 2026
94 of 95 checks passed
@spawnia
spawnia deleted the tooling branch October 25, 2026 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants