Repository navigation
Rebuild the 5.x baseline for Craft 6 beta - #215
Merged
Merged
Conversation
- Move to the CraftCms\Cloud namespace - Run queued jobs with bref/laravel-bridge's QueueHandler - Run platform commands with a Guzzle-based CommandSqsHandler - Give the Valkey connection 1-second timeouts - Force stderr logging and database sessions on Cloud - Read CRAFT_CLOUD_* through one Cloud class - Test with Orchestra Testbench booting Craft - Release with release-it, matching 3.x Amp-Thread-ID: https://ampcode.com/threads/T-5e08134f-736d-4bda-8b28-d21654023ef7 Co-authored-by: Amp <amp@ampcode.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f2c8729630
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The callback post no longer throws when both attempts fail at the transport layer, so SQS won't redeliver and rerun a completed command. Output that isn't valid UTF-8 is substituted instead of failing to encode, as in 3.x. Amp-Thread-ID: https://ampcode.com/threads/T-5e08134f-736d-4bda-8b28-d21654023ef7 Co-authored-by: Amp <amp@ampcode.com>
The workbench serves a Craft 6 site with this package installed, on SQLite, from Testbench's skeleton. `composer build` installs Craft and `composer serve` serves it. In Amp orbs, .agents/setup installs PHP 8.5 and dependencies and .amp/services.yaml runs the workbench behind a portal. Also relocks craftcms/cms and craftcms/cms-assets at 6.0.0-beta.1, now that Packagist has indexed the cms-assets tag. Amp-Thread-ID: https://ampcode.com/threads/T-5e08134f-736d-4bda-8b28-d21654023ef7 Co-authored-by: Amp <amp@ampcode.com>
- Read CRAFT_CLOUD_REDIS_URL, which is what cloud-api sets. CRAFT_CLOUD_CACHE_SRV was never set, so Valkey was never used. This also drops the per-boot DNS lookup. - Give console commands the invocation's remaining time, less a buffer to send the result, instead of assuming a 900-second function timeout. - Drop bref/extra-php-extensions. It only ships serverless.yml layer metadata, and Cloud's builder copies the extension images itself. Amp-Thread-ID: https://ampcode.com/threads/T-5e08134f-736d-4bda-8b28-d21654023ef7 Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-5e08134f-736d-4bda-8b28-d21654023ef7 Co-authored-by: Amp <amp@ampcode.com>
This was referenced Nov 19, 2026
The failover cache now uses the database, then memory. Amp-Thread-ID: https://ampcode.com/threads/T-55bba2ca-8b70-4e4b-b792-799738d8cb80
- Require PHP ^8.5 and narrow minimum-stability to beta - Update dependencies within constraints (Craft 6.0.0-beta.3, Mago 1.62) - Migrate phpunit.xml.dist to the PHPUnit 12.5 schema - Bump actions/checkout to v7 and ramsey/composer-install to v4 - Remove the unused tests/Arch and tests/Unit directories Amp-Thread-ID: https://ampcode.com/threads/T-55bba2ca-8b70-4e4b-b792-799738d8cb80
Pest 5 brings PHPUnit 13, so phpunit.xml.dist moves to the 13.4 schema. Amp-Thread-ID: https://ampcode.com/threads/T-55bba2ca-8b70-4e4b-b792-799738d8cb80
Releases run through `npm run release` instead of an unpinned npx. Amp-Thread-ID: https://ampcode.com/threads/T-55bba2ca-8b70-4e4b-b792-799738d8cb80
The baseline isn't meant to run on Craft Cloud yet, only to be a base for feature PRs, so it shouldn't assume how the platform will work. - Remove Cloud, the command and queue Lambda handlers, and their tests - Apply the provider's config unconditionally, without a Craft Cloud check - Always use database sessions - Drop guzzlehttp/guzzle and symfony/process, which only the handlers used Amp-Thread-ID: https://ampcode.com/threads/T-55bba2ca-8b70-4e4b-b792-799738d8cb80
"${self::CONST}" is a variable-variable in PHP, not constant interpolation,
so the store was registered under an empty key.
- Remove the queue tests and CRAFT_CLOUD_SQS_URL from the test env
- Remove the .husky and AGENTS.md export-ignore lines
Amp-Thread-ID: https://ampcode.com/threads/T-55bba2ca-8b70-4e4b-b792-799738d8cb80
- Replace Mago with Pint (laravel preset) and PHPStan with Larastan (level 6) - Rename Composer scripts to cms's tests, phpstan and ci - Add sort-packages and platform.php 8.5 to Composer config - Require craftcms/cms ^6.0.0-beta.3 - Run CI on PHP 8.5 and 8.6 Amp-Thread-ID: https://ampcode.com/threads/T-55bba2ca-8b70-4e4b-b792-799738d8cb80
--ci makes a stray ->only() run the whole suite instead of one test. Amp-Thread-ID: https://ampcode.com/threads/T-55bba2ca-8b70-4e4b-b792-799738d8cb80
release-it only drafted a GitHub release, which one gh command does. This removes the package's last Node tooling. Amp-Thread-ID: https://ampcode.com/threads/T-55bba2ca-8b70-4e4b-b792-799738d8cb80
Craft's database backups, which craft:up runs, shell out to the sqlite3 CLI. The health check uses / because Craft 6 returns 500 on control panel requests without a User-Agent header, which Amp's probe doesn't send. Amp-Thread-ID: https://ampcode.com/threads/T-55bba2ca-8b70-4e4b-b792-799738d8cb80
The provider overrode cache, session and log config on every machine, including local dev and CI. Check AWS_LAMBDA_RUNTIME_API first, as bref/laravel-bridge does. Amp-Thread-ID: https://ampcode.com/threads/T-5e08134f-736d-4bda-8b28-d21654023ef7
Laravel merges its default cache stores into every app, so its own failover store (database, then memory) replaces the copy. Tests now re-register the provider over project config instead of juggling environment variables, run on an in-memory database instead of the workbench's, and check that the cache actually fails over. Amp-Thread-ID: https://ampcode.com/threads/T-5e08134f-736d-4bda-8b28-d21654023ef7
- Drop LOG_LEVEL=critical from the phpstan script: logs no longer go to stderr off Lambda. - Run Pint with Composer's PHP in the ci script, and group the stability keys after scripts, as craftcms/cms does. - Let the PHP 8.6 prerelease job fail without blocking merges. - Drop Testbench's default discovers keys and a stray blank line. - Keep the platform-wide CHANGELOG.md out of the package archive. - Remove the README's release command for now. - Describe the workbench in AGENTS.md. Amp-Thread-ID: https://ampcode.com/threads/T-5e08134f-736d-4bda-8b28-d21654023ef7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR rebuilds
5.xas a minimal base for the Craft 6 feature PRs (disk, transformer, static cache). It's maintenance: the package isn't meant to run on Craft Cloud yet, and it avoids assumptions about how the platform will work.What's in it
CraftCms\Cloud, matchingCraftCms\Cms.CloudServiceProvideris the only source file. On Lambda (AWS_LAMBDA_RUNTIME_APIset, the same check bref/laravel-bridge uses) it applies this config, and elsewhere it does nothing:failoverstore, database then memory.databasedriver.^8.5,craftcms/cms ^6.0.0-beta.3,bref/bref ^3,bref/laravel-bridge ^3.1.7(GHSA-qmwm-25jf-8mpw).Removed from
5.xsrc/bref/handlers/*),CraftCliEntrypointandCurlClient.CRAFT_CLOUD_CACHE_SRV. Valkey is left out for now.bref/extra-php-extensionsandext-curl.Development
composer serveruns Craft 6 with this package on SQLite..agents/setupand.amp/services.yamlfor Amp orbs.tests,phpstanandciComposer scripts.composer validate --strict, Pint, PHPStan and the tests on PHP 8.5 and 8.6. The 8.6 job is allowed to fail while 8.6 is a prerelease.Releases
This removes the unused semantic-release config, which would have numbered from
3.1.0, the newest tag in this branch's history, and collided with 3.x releases. Releases are drafted by hand with the GitHub CLI instead, so the package has no Node tooling:Infra
cloud-api still points the queue and command functions at the handler paths this PR removes. No Craft 6 site runs on
5.xyet, so this matters only once one does.Related