Minimal approach to remove metastore_resource_mapper_new_revision - #4751
Draft
dafeder wants to merge 1 commit into
Draft
Minimal approach to remove metastore_resource_mapper_new_revision#4751dafeder wants to merge 1 commit into
dafeder wants to merge 1 commit into
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.
This is a more minimal approach to #4750. Also copilot-generated, please ignore until I've come back to this, just bookmarking an experiment while I go back to other things.
Need to look at this carefully, I really don't remember exactly why we needed this originally; where the thread was getting lost in the workflow.
Copilot's explanation of changes:
Implemented an incremental transition path that runs both mechanisms in parallel: explicit decision propagation is now supported, while the legacy static flag remains the fallback and source of backward compatibility.
Changed files:
What this incremental path looks like:
onPreReferencenow:MetastoreItemInterface{ item, createNewResourceVersion }should_create_new_resource_versionas before.metastore_resource_mapper_new_revision) for existing callers.createNewResourceVersiononto event payload for new callers.referenceMetadatanow:itemand nullablecreateNewResourceVersion.createNewResourceVersionif subscriber sets it.?bool $createNewResourceVersion = NULLthroughreference,referenceProperty,referenceMultiple,referenceSingle,distributionHandling,registerWithResourceMapper, andhandleExistingResource.NULL,handleExistingResourcefalls back toResourceMapper::newRevision()exactly as before.Validation run:
ddev phpunit DatastoreSubscriberTest.php --stop-on-errorpassed.ddev phpunit ReferencerTest.php --stop-on-errorpassed.ddev phpunit OnPreReferenceTest.php --stop-on-errorpassed.This gives you a safe bridge state:
If you want, next I can do the follow-up phase that removes the static fallback from Referencer.php only after adding one targeted test that proves explicit-only behavior.
Completed: Fix subscriber unit tests for constructor signature change (1/4)
Made changes.