Repository navigation
fix: merge module config by source priority and correct config docs - #707
Merged
Merged
Conversation
… and job docs Module config now merges vendor, then modules/, then app/ modules (load order within a tier), then the project-root config/. Previously it followed plain dependency load order, so a vendor module loading after an app module overrode the app module's config. ConfigModuleOrder applies the ordering for both the live boot and the discovery cache. Docs: document the four-step config order and drop the non-existent app/config/ location; fix readonly Event/Job subclass examples that were a fatal error; remove the string-based events claim from architecture.md. Closes #691, #692, #693, #706 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017KaHtX9QzJB5ZedzkiVS1X
Add a "Which Config Location to Use" section to the configuration guide: module config/ ships defaults with the code, the project-root config/ holds installation settings, with a table of where each kind of value goes. Link it from config.md's Merge Priority and fix the vendor path glob there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017KaHtX9QzJB5ZedzkiVS1X
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.
Summary
Fixes module config override priority and corrects the config, event and job docs.
Module config merges by source priority (#706) — breaking
Module config merged in plain dependency load order, so a vendor module that loaded after an app module overrode the app module's config (e.g.
vendor/marko/cache/config/cache.phpbeatapp/my-app/config/cache.phpwhen the app module didn't requiremarko/cache). Bindings and global middleware already rank by source; config now does too:modules/modulesapp/modulesconfig/(wins)Load order decides only within a tier. The new
Marko\Config\ConfigModuleOrderapplies this usingBindingRegistry::SOURCE_PRIORITY.module.php(live boot) andConfigCacheContributor(discovery:cache) both use it, so live and cached boots merge the same way.Breaking: an app module's config now overrides a vendor module's config regardless of dependency order. Apps that relied on a vendor config winning should move that value to the project-root
config/.Config docs (#692)
config.mdandgetting-started/configuration.mdgive the four-step order.app/config/, which was never a config location, is gone from the examples and error messages.config/ships defaults with the code, while the project-rootconfig/holds installation settings. Includes a table of where each kind of value goes..claude/architecture.md,debugbar.mdandcoming-from-magento.mdmatch the four-step order.Readonly event and job examples (#691)
readonly class X extends Event|Jobis a fatal error, becauseEventandJobaren't readonly. The examples inconcepts/events.md,guides/queues.mdandpackages/queue.mdnow use readonly promoted properties instead.String-based events claim (#693)
.claude/architecture.mdnow says events are classes extendingMarko\Core\Event\Event, dispatched throughEventDispatcherInterface::dispatch().Test plan
ConfigModuleOrder, the cache contributor and themodule.phpbindingcomposer ci: 14445 passed, 439 skipped; lint, PHPStan and docs lint cleanEvent/Job; each fixed one runsCloses #691
Closes #692
Closes #693
Closes #706
🤖 Generated with Claude Code
https://claude.ai/code/session_017KaHtX9QzJB5ZedzkiVS1X