fix: preserve quoted multipart ETags#25
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses COS multipart completion failures by ensuring quoted multipart ETags are serialized as plain text (not wrapped/altered by the XML builder), and aligns the codebase with existing Pint formatting expectations.
Changes:
- Replace
markUploadAsCompleted()XML generation with a DOM-based builder to preserve quoted ETags. - Add a regression test asserting quoted ETags remain quoted in the Complete Multipart Upload XML body.
- Apply Pint-driven formatting changes (including test method renames and small style-only updates across src/ and tests/).
Reviewed changes
Copilot reviewed 18 out of 22 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/SignatureTest.php | Rename tests to Pint-preferred snake_case. |
| tests/ServiceClientTest.php | Rename test to snake_case for Pint compliance. |
| tests/ObjectClientTest.php | Update multipart completion expectations and add regression coverage for quoted ETags. |
| tests/JobClientTest.php | Rename tests to snake_case for Pint compliance. |
| tests/Http/ResponseTest.php | Rename tests to snake_case for Pint compliance. |
| tests/ConfigTest.php | Rename tests to snake_case for Pint compliance. |
| tests/ClientTest.php | Rename tests to snake_case for Pint compliance. |
| tests/CiClientTest.php | Rename tests to snake_case for Pint compliance. |
| tests/BucketClientTest.php | Rename tests to snake_case for Pint compliance. |
| src/Traits/CreatesHttpClient.php | Style-only formatting change (brace alignment). |
| src/Signature.php | Constructor formatting tightened (single-line empty body). |
| src/ServiceClient.php | Style-only formatting change (brace alignment). |
| src/ObjectClient.php | Implement DOM-based Complete Multipart Upload XML builder and wire it into markUploadAsCompleted(). |
| src/Middleware/CreateRequestSignature.php | Constructor formatting tightened (single-line empty body). |
| src/Http/Response.php | Inline no-op ArrayAccess mutators for formatting consistency. |
| src/Exceptions/InvalidConfigException.php | Convert empty exception class body to one-liner. |
| src/Exceptions/InvalidArgumentException.php | Convert empty exception class body to one-liner. |
| src/Exceptions/Exception.php | Convert empty exception class body to one-liner. |
| src/Config.php | Constructor formatting tightened (single-line empty body) + style-only brace alignment. |
| src/Client.php | Import Mockery interfaces, adjust return types, and minor instantiation style change. |
| src/BucketClient.php | Style-only formatting change (brace alignment). |
| composer.json | Style-only formatting change (brace alignment). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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 #24
Tests