Skip to content

phpstan: install PHP from setup-php's prebuilt builds on Blacksmith | SMTNC-3595 - #36

Merged
nikolaystrikhar merged 1 commit into
mainfrom
chore/setup-php-builds-cache
Nov 19, 2026
Merged

nikolaystrikhar merged 1 commit into
mainfrom
chore/setup-php-builds-cache

Conversation

@nikolaystrikhar

@nikolaystrikhar nikolaystrikhar commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Blacksmith runners report themselves as self-hosted, so setup-php apt-installs PHP from the Launchpad PPA on every PHPStan run. It fails with only Could not setup PHP 7.4 whenever Launchpad is slow or down: 259 such failed jobs in learndash-core since its move to Blacksmith on 2026-09-21. On Blacksmith this sets use_builds_cache, so setup-php downloads the prebuilt PHP that GitHub-hosted runners get. On other runners the value stays empty, because setup-php reads an explicit false as "use the PPA", even on GitHub-hosted runners.

Evidence

Companion change for learndash-core's own workflows: https://github.com/stellarwp/learndash-core/pull/3880

Summary by CodeRabbit

  • Chores
    • Updated the automated build configuration to apply PHP setup cache settings according to the runner environment. This internal maintenance change does not affect application features or behavior visible to users. No other user-facing changes are included in this update.

Blacksmith runners report themselves as self-hosted, so setup-php
apt-installed PHP from the Launchpad PPA on every run and failed with
only "Could not setup PHP 7.4" whenever Launchpad was slow or down.
use_builds_cache makes it download the prebuilt PHP that GitHub-hosted
runners get. It is set only on Blacksmith runners, so GitHub-hosted and
other self-hosted runners keep their current path.
@nikolaystrikhar

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@linear

linear Bot commented Nov 19, 2026

Copy link
Copy Markdown

SMTNC-3595

@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The PHPStan workflow now sets use_builds_cache to true when the runner name starts with blacksmith-. For other runners, it sets the value to an empty string.

Changes: PHPStan runner setup

Layer / File(s) Summary
Set runner-specific PHP setup value
.github/workflows/phpstan.yml
The PHP setup step sets use_builds_cache based on whether the runner name starts with blacksmith-. Comments describe the runner-specific setup behavior.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Possibly related PRs

Suggested reviewers: estevao90, pauloiankoski

Merge Risk: Minimal · up to 49ca1

This change makes PHPStan on Blacksmith runners install PHP from setup-php's prebuilt builds instead of the Launchpad PPA, and it leaves other runners unchanged. I found no concrete risk. It is a small, easily reverted workflow edit.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: PHPStan on Blacksmith installs PHP from setup-php's prebuilt builds instead of the Launchpad PPA. The raw summary confirms the workflow sets use_builds_cache to 'true'…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check

Explanation

The title names the main change: PHPStan on Blacksmith installs PHP from setup-php's prebuilt builds instead of the Launchpad PPA. The raw summary confirms the workflow sets use_builds_cache to 'true' for runners whose name starts with 'blacksmith-'. The objectives describe the same purpose, avoiding Launchpad PPA failures. The title is specific and matches the changeset.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 3251b832-99d5-44bb-9b87-575b8c04e9d7
Commits

Reviewing files that changed from the base of the PR and between beac87b and 49ca184.

Files selected for processing: 1

  • .github/workflows/phpstan.yml

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@nikolaystrikhar
nikolaystrikhar merged commit 55f229d into main Nov 19, 2026
3 checks passed
@nikolaystrikhar
nikolaystrikhar deleted the chore/setup-php-builds-cache branch November 19, 2026 10:27
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