Repository navigation
fix: saveTarget() null configure + 2.0 doc sweep (2.0.1, audit YH-1/YH-2) - #40
Merged
Merged
Conversation
…opted target (YH-1); 2.0 doc sweep (YH-2)
|
@coderabbitai review |
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.
StorageKit 2.0.1: the two follow-ups of the pre-tag audit YH of 2.0.0. Patch, no BC break. Squash merge recommended (the second commit only removes a coverage report committed by mistake).
YH-1:
saveTarget()with a null$configureSync\StorageMove::saveTarget($target, $actor, $fields)without the fourth argument saved nothing for a saved target that the bundle loads again through its own manager (2.0StorageEntityManager::adopt()):$em->find()orgetReference()), oradopt()swapped in a fresh copy of the stored row, so the connection the caller set on the target was discarded. The call still returnedtrueand auditedmove_target_saved.Fix: when
$configureis null andadopt()returned another instance, the connection set on the target you passed is applied to the bundle's instance inside the same write unit, under the owner lock. That covers provider, enabled, endpoints, region, bucket, prefix, access key, path style, and the secret only when a new one was set. Without a new secret the stored one is kept, so it is never encrypted twice.Not affected: the Move page (it always passes
$configure), a new unsaved target, and a target already managed by the bundle.Test:
PrivateEntityManagerKernelTest::testSavingATargetWithoutConfigureKeepsTheConnectionSetOnItcovers four cases: a host instance with a new secret, a host instance with no new secret, an uninitialised host proxy, and a worker-mode bundle instance. It fails on 2.0.0 (the row is unchanged) and passes with the fix on SQLite, MySQL 8.4 and PostgreSQL 16.YH-2: stale docs
ImageUploader::upload()(upload section and the endpoint's PHP API); entities "on your default entity manager".nowo-tech/transaction-doctrine^1.9.1.FileDeliveryPortsPassdocblock: theFileDeliveryid is not deprecated, andrespond()is gone.[Unreleased]links pointed at 2.0.0 / 1.7.1 content; duplicated "To 1.8.1" / "To 1.8.0" headings merged; 2.0.1 note added.test-with-db: ran the removed 1.8 host-mode suites (STORAGE_KIT_TEST_HOST_EM). It now runs the CI database files.Gates (local, Docker)
REQ-RUNTIME-003: same unit and owner lock as before; the closure is local to the call (worker-safe, no service state).
🤖 Generated with Claude Code