Skip to content

Conversation

@fredrikekelund
Copy link
Contributor

Related issues

Proposed Changes

  • Added a studio site set-php-version command, which updates the appdata file and restarts the site if running.

Testing Instructions

  1. Run npm run cli:build
  2. Run node dist/cli/main.js site set-php-version true --path PATH_TO_SITE (where PATH_TO_SITE is the path to a Studio site)
  3. Ensure that it succeeds
  4. Run node dist/cli/main.js site start --path PATH_TO_SITE
  5. Run node dist/cli/main.js site set-php-version 8.2 --path PATH_TO_SITE
  6. Ensure that the site restarts successfully (assuming the site wasn't already running PHP 8.2, in which case it will return an error)

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@fredrikekelund fredrikekelund requested review from a team and bcotrim November 28, 2025 14:25
@fredrikekelund fredrikekelund self-assigned this Nov 28, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 28, 2025

📊 Performance Test Results

Comparing 67a338e vs trunk

site-editor

Metric trunk 67a338e Diff Change
load 8687.00 ms 8858.00 ms +171.00 ms 🔴 2.0%

site-startup

Metric trunk 67a338e Diff Change
siteCreation 15174.00 ms 13345.00 ms -1829.00 ms 🟢 -12.1%
siteStartup 5014.00 ms 5954.00 ms +940.00 ms 🔴 18.7%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change

Copy link
Contributor

@bcotrim bcotrim left a comment

Choose a reason for hiding this comment

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

Code LGTM and works as described.

While reviewing, I wondered if we should have a studio site update command instead of separate set-* commands.

Advantages:

  1. Consistent with studio create - Same option names (--php, --domain, --https)
  2. Batch updates - One command, one restart instead of potentially 3
  3. Less code - Shared boilerplate (load site → lock appdata → update → restart if running)

What do you think?

@fredrikekelund
Copy link
Contributor Author

While reviewing, I wondered if we should have a studio site update command instead of separate set-* commands.

I like that idea 👍 I have a whole train of PRs waiting to merge here, though (#2151, this, and #2155). I'd prefer to land all three and then circle back to refactor the set-* commands into a single one.

Base automatically changed from f26d/cli-site-set-domain-https to trunk December 2, 2025 13:48
@fredrikekelund fredrikekelund merged commit ea85c39 into trunk Dec 2, 2025
8 of 9 checks passed
@fredrikekelund fredrikekelund deleted the f26d/cli-set-php-version branch December 2, 2025 14:01
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.

3 participants