Skip to content

ci(phpstan): add caching to speed up the CI#1029

Merged
JohnVillalovos merged 1 commit intodevelopfrom
jlvillal/phpstan_cache
Feb 16, 2026
Merged

ci(phpstan): add caching to speed up the CI#1029
JohnVillalovos merged 1 commit intodevelopfrom
jlvillal/phpstan_cache

Conversation

@JohnVillalovos
Copy link
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings February 16, 2026 15:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR speeds up the PHP analysis CI job by enabling PHPStan’s persistent cache directory and persisting it between CI runs via GitHub Actions cache, reducing repeated work across runs.

Changes:

  • Configure PHPStan to use a project-local cache directory (var/cache/phpstan) in both phpstan.neon and phpstan_next.neon.
  • Add a GitHub Actions cache step to restore/save var/cache/phpstan keyed by OS, PHP version, lockfile, and PHPStan config files.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
phpstan.neon Sets tmpDir to a stable path so PHPStan can reuse caches.
phpstan_next.neon Same tmpDir change for the “next level” PHPStan run.
.github/workflows/lint-and-analyse-php.yml Adds Actions cache restore/save for PHPStan cache directory in the analysis job.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@JohnVillalovos JohnVillalovos force-pushed the jlvillal/phpstan_cache branch 3 times, most recently from 2a566a5 to 959bc3c Compare February 16, 2026 15:53
@JohnVillalovos JohnVillalovos merged commit daf5166 into develop Feb 16, 2026
12 checks passed
@JohnVillalovos JohnVillalovos deleted the jlvillal/phpstan_cache branch February 16, 2026 16:13
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.

1 participant