fix: support partial memento settings with full null - #46
Open
elpete wants to merge 5 commits into
Open
Conversation
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
Mementifier treated missing per-entity memento options as null by directly dereferencing each option. On full-null runtimes, a partial memento struct omits those keys and Adobe throws an undefined-element exception before the entity can be decorated.
This change resolves settings from an explicitly key-aware entity memento struct, preserves the previous fallback for explicit null values, and safely handles the lazy entity-name lookup used by ORM auto-includes.
Supports coldbox-modules/quick#154 and coldbox-modules/quick#312.
Regression coverage
defaultIncludesconfigured, the module interceptor decorates it, and the test calls the injected publicgetMemento()API.processMemento()and verifiesgetMemento().Before the source fix, Adobe failed at
interceptors/Mementifier.cfc:89withElement MEMENTO is undefined. The same focused bundle passes after the fix.Existing Adobe baseline repair
Current Adobe 2023/2025 patches derive ORM fixture component names from GitHub Actions' physical checkout path as
mementifier.test-harness.models.*, then fail to resolve that generated path. This is independent of the source change: the latestdevelopmentbaseline run failed identically before this branch, while the same matrix was green in June on the preceding Adobe patches.CI now initializes the test application directly and creates an Adobe-only filesystem alias for that generated ORM path. The standalone full-null regression remains separate and passes before the full ORM suite runs, so framework setup cannot mask the Mementifier regression.
Validation
GitHub Actions runs 32617297951 and 32617300183 both passed.
Every engine row reports 21 passed, 0 failed, 0 errored, 0 skipped:
Local validation also covered:
git diff --checkpassedThe full integration suite also exposed a separate cbORM lazy-state issue. That dependency fix, with its own public-API regressions, is in coldbox-modules/cborm#87.