Repository navigation
Conversation
`acorn optimize` bakes one config array from a single WP-CLI boot and every site on the install reads it, so per-site config (child theme config, WP_HOME, the blog id) freezes on whichever site built it. Bind an anonymous subclass of Acorn's LoadConfiguration in the boot file that re-reads the config files after a cached boot and keeps the cached provider list, which is where a cached boot gets the withProviders() providers from. Replaces App\Bootstrap\LoadConfiguration where a site had it, so every repo carries the same block. AcornConfigCacheTest bakes a real cache and checks both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Closing: a single site reads its own config cache, so it isn't exposed. The override is going to multisites only. |
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.
acorn optimize(deployer-genero'scache:wp:acorn) bakes one config array from a single WP-CLI boot, and every site on the install reads it. On a multisite that freezes per-site config (a child theme's ownconfig/, anything derived fromWP_HOMEor the blog id) on whichever site built the cache. Single sites aren't exposed today, but every repo now carries the same block so a site that grows a second blog is already covered.The boot file binds an anonymous subclass of Acorn's
LoadConfigurationthat, after a cached boot:app.providers, since a cached boot only gets thewithProviders()providers from the cache (re-readingapp.phpalone drops them, as happened in https://github.com/generoi/pellervo/pull/265).Where the repo had
App\Bootstrap\LoadConfiguration, this replaces it with the inline block, and class-only tests are swapped fortest/unit/AcornConfigCacheTest.php. That test bakes a real cache with one stale value and an extra provider, then boots from it.Same change as https://github.com/generoi/pellervo/pull/266, https://github.com/generoi/holmasto/pull/223 and https://github.com/generoi/steripolar/pull/308, all verified on production. The block was audited against Acorn 3.3, 4.3, 5.0 and 6.3.
🤖 Generated with Claude Code