Skip to content

fix: preserve quoted multipart ETags#25

Merged
overtrue merged 2 commits into
masterfrom
fix/issue-24-etag-xml
May 22, 2026
Merged

fix: preserve quoted multipart ETags#25
overtrue merged 2 commits into
masterfrom
fix/issue-24-etag-xml

Conversation

@overtrue

Copy link
Copy Markdown
Owner

Summary

  • Build Complete Multipart Upload XML with DOM text nodes so quoted ETags stay as plain text.
  • Add regression coverage for quoted multipart ETags.
  • Run Pint formatting to satisfy the existing git hooks.

Fixes #24

Tests

  • composer test
  • composer check-style

Copilot AI review requested due to automatic review settings May 22, 2026 08:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/ObjectClient.php
@overtrue overtrue merged commit e66935d into master May 22, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ObjectClient markUploadAsCompleted 报错 InvalidPart

2 participants