chore(release): Prepare 2.4.0 - #52
Conversation
…2.3.0 chore(release): Sync master v2.3.0 back into develop
#47) Bumps [github/codeql-action/upload-sarif](https://github.com/github/codeql-action) from 4.36.3 to 4.37.4. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@54f647b...f205ea1) --- updated-dependencies: - dependency-name: github/codeql-action/upload-sarif dependency-version: 4.37.4 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 7.0.0 to 7.0.1. - [Release notes](https://github.com/actions/checkout/releases) - [Commits](actions/checkout@v7...v7.0.1) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 7.0.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viet Vu <jooservices@gmail.com>
…ith 6 updates (#42) Bumps the dev-dependencies group with 5 updates in the / directory: | Package | From | To | | --- | --- | --- | | [friendsofphp/php-cs-fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) | `3.95.15` | `3.95.18` | | [laravel/pint](https://github.com/laravel/pint) | `1.29.3` | `1.30.0` | | [phpstan/phpstan](https://github.com/phpstan/phpstan-phar-composer-source) | `2.2.5` | `2.2.7` | | [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) | `13.2.4` | `13.2.6` | | [symfony/var-dumper](https://github.com/symfony/var-dumper) | `8.1.1` | `8.1.2` | Updates `friendsofphp/php-cs-fixer` from 3.95.15 to 3.95.18 - [Release notes](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/releases) - [Changelog](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/CHANGELOG.md) - [Commits](PHP-CS-Fixer/PHP-CS-Fixer@v3.95.15...v3.95.18) Updates `laravel/pint` from 1.29.3 to 1.30.0 - [Release notes](https://github.com/laravel/pint/releases) - [Changelog](https://github.com/laravel/pint/blob/main/CHANGELOG.md) - [Commits](laravel/pint@v1.29.3...v1.30.0) Updates `phpstan/phpstan` from 2.2.5 to 2.2.7 - [Commits](https://github.com/phpstan/phpstan-phar-composer-source/commits) Updates `phpunit/phpunit` from 13.2.4 to 13.2.6 - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/13.2.6/ChangeLog-13.2.md) - [Commits](sebastianbergmann/phpunit@13.2.4...13.2.6) Updates `symfony/filesystem` from 7.4.11 to 7.4.15 - [Release notes](https://github.com/symfony/filesystem/releases) - [Changelog](https://github.com/symfony/filesystem/blob/8.2/CHANGELOG.md) - [Commits](symfony/filesystem@v7.4.11...v7.4.15) Updates `symfony/var-dumper` from 8.1.1 to 8.1.2 - [Release notes](https://github.com/symfony/var-dumper/releases) - [Changelog](https://github.com/symfony/var-dumper/blob/8.2/CHANGELOG.md) - [Commits](symfony/var-dumper@v8.1.1...v8.1.2) --- updated-dependencies: - dependency-name: friendsofphp/php-cs-fixer dependency-version: 3.95.18 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev-dependencies - dependency-name: laravel/pint dependency-version: 1.30.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dev-dependencies - dependency-name: phpstan/phpstan dependency-version: 2.2.7 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev-dependencies - dependency-name: phpunit/phpunit dependency-version: 13.2.6 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev-dependencies - dependency-name: symfony/filesystem dependency-version: 7.4.15 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev-dependencies - dependency-name: symfony/var-dumper dependency-version: 8.1.2 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev-dependencies ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viet Vu <jooservices@gmail.com>
Bumps [guzzlehttp/guzzle](https://github.com/guzzle/guzzle) from 8.0.0 to 8.0.1. - [Release notes](https://github.com/guzzle/guzzle/releases) - [Changelog](https://github.com/guzzle/guzzle/blob/8.0/CHANGELOG.md) - [Commits](guzzle/guzzle@8.0.0...8.0.1) --- updated-dependencies: - dependency-name: guzzlehttp/guzzle dependency-version: 8.0.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viet Vu <jooservices@gmail.com>
) Bumps [squizlabs/php_codesniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer) from 4.0.1 to 4.0.2. - [Release notes](https://github.com/PHPCSStandards/PHP_CodeSniffer/releases) - [Changelog](https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/4.x/CHANGELOG-4.x.md) - [Commits](PHPCSStandards/PHP_CodeSniffer@4.0.1...4.0.2) --- updated-dependencies: - dependency-name: squizlabs/php_codesniffer dependency-version: 4.0.2 dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viet Vu <jooservices@gmail.com>
Bumps [actions/labeler](https://github.com/actions/labeler) from 6 to 7. - [Release notes](https://github.com/actions/labeler/releases) - [Commits](actions/labeler@v6...v7) --- updated-dependencies: - dependency-name: actions/labeler dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.4.3 to 2.4.4. - [Release notes](https://github.com/ossf/scorecard-action/releases) - [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md) - [Commits](ossf/scorecard-action@4eaacf0...2d11466) --- updated-dependencies: - dependency-name: ossf/scorecard-action dependency-version: 2.4.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Viet Vu <jooservices@gmail.com>
* chore(deps): upgrade Composer dependencies * test(bench): dedupe handler-stack bypass helper and clarify magic numbers * ci: add Codacy security scan and Fortify AST workflows * ci: bump setup-php pin and cap coverage artifact retention * ci: harden release/labeler workflows and add Codacy badge * fix: address PR review feedback on handler bypass and stale docs
…e support (#50) * feat(transport): add native ext-curl transport with builder middleware support * docs(guide): Document the uppercase PR-title subject requirement * fix(transport): Fix CI failures and address review feedback on the cURL transport * chore(codacy): Move nosemgrep suppressions inline and simplify guidance prose * docs(claude): Split remaining compound bullet and remove ambiguous pronoun * test(transport): Cover duplicate multipart names, string/invalid query, auth-type fallback, and UA case-insensitivity * fix(transport): Register buffered multipart temp file before writing to it
* feat(curl): Add portable cURL transport enhancements * test(curl): Cover portable transport edge cases * fix(curl): Address PR review feedback for transport enhancements * test(coverage): Raise class and method coverage above 95% * fix(guzzle): Guard on_headers for Guzzle 7 MockHandler throwables * chore(codacy): Exclude tests from Codacy static analysis * fix(middleware): Prevent same-name insert from corrupting pipeline order
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
Not up to standards ⛔🟢 Coverage
|
| Metric | Results |
|---|---|
| Coverage variation | Report missing for 13fe6ea1 |
| Diff coverage | ✅ 99.15% diff coverage |
Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (13fe6ea) Report Missing Report Missing Report Missing Head commit (2a15ec2) 3041 3032 99.70% Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>
Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#52) 937 929 99.15% Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
1 Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #52 +/- ##
============================================
+ Coverage 98.84% 99.73% +0.89%
- Complexity 1023 1473 +450
============================================
Files 76 88 +12
Lines 2430 3460 +1030
============================================
+ Hits 2402 3451 +1049
+ Misses 28 9 -19
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Prepares the JOOservices Client 2.4.0 release by introducing an optional native synchronous ext-curl transport (with a shared portable-options catalog), adding download safety/resume features, extending the HTTP client API with HEAD helpers, and aligning tests/benchmarks/docs/CI for the release.
Changes:
- Add native
ext-curltransport + portable request option catalog, including redirect hardening and errno-to-exception mapping. - Add portable download features (
max_size,resume) across transports, plus HEAD/HEAD-async convenience APIs. - Update tests, docs, benchmarks, and GitHub workflows for the 2.4.0 release surface and security tooling.
Reviewed changes
Copilot reviewed 76 out of 77 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Unit/Support/FinalCoverageTest.php | Adjust pipeline stack construction to use MockHandler/typed stacks. |
| tests/Unit/Support/CoverageBoostTest.php | Add broad unit coverage for new/edge-path behaviors (downloads, logging, curl helpers). |
| tests/Unit/Signing/HmacSha256SignerTest.php | Add tests for chunked hashing + stream rewind behavior. |
| tests/Unit/Middleware/MiddlewarePipelineTest.php | Use helper to inject malformed handlers for guard-path testing. |
| tests/Unit/Middleware/MiddlewarePipelineCoverageTest.php | Extend pipeline coverage (same-name insert behavior, stack creation adjustments). |
| tests/Unit/Middleware/CacheMiddlewareTest.php | Add test ensuring cache bypass when sink is present. |
| tests/Unit/Client/HttpClientTest.php | Tighten assertions around options shape for transfer stats hook. |
| tests/Unit/Client/HttpClientHeadTest.php | Add unit tests for new head() / headAsync() helpers. |
| tests/Unit/Client/HttpClientDownloadTest.php | Add tests for max_size normalization, resume Range header, and guard helpers. |
| tests/Unit/Client/HttpClientDownloadMaxSizeIntegrationTest.php | Add integration-style test validating max-size abort before writing bytes. |
| tests/Unit/Client/ClientBuilderTest.php | Expand builder tests for custom adapters + middleware composition + UA casing behavior. |
| tests/Unit/Adapters/MiddlewareTransportAdapterTest.php | Add unit coverage for middleware-wrapping transport adapter behavior. |
| tests/Unit/Adapters/CurlRequestBodyBuilderTest.php | Add unit tests for curl body-building across json/form/multipart/body cases. |
| tests/Unit/Adapters/CurlHttpClientAdapterTest.php | Add unit tests for curl adapter option validation and header safety. |
| tests/Unit/Adapters/CurlErrorMapperTest.php | Add unit tests for curl errno mapping + message sanitization. |
| tests/TestCase.php | Add shared helper to force malformed Guzzle handler injection for tests. |
| tests/Integration/Adapters/fixtures/router.php | Add local PHP server router to support curl transport integration tests. |
| tests/Integration/Adapters/fixtures/functions.php | Add tiny helpers for integration test server env access. |
| tests/Integration/Adapters/CurlHttpClientAdapterIntegrationTest.php | Add end-to-end integration suite for curl transport behavior via local server. |
| tests/Benchmark/CoreBench.php | Switch benchmark handler to MockHandler with prefilled responses. |
| src/Support/PortableRequestOptions.php | Introduce shared portable/unsupported request-option catalogs for curl parity. |
| src/Support/DownloadSizeGuard.php | Add normalization + transport-specific hooks for portable max_size. |
| src/Signing/HmacSha256Signer.php | Switch signer to streaming HMAC (chunked) and preserve stream position. |
| src/Middleware/MiddlewarePipeline.php | Fix same-name insert corruption + add synchronous pipeline builder. |
| src/Middleware/LoggingMiddleware.php | Minor coverage-ignore annotation adjustment. |
| src/Middleware/CacheMiddleware.php | Bypass cache when sink is used; minor coverage-ignore annotation adjustment. |
| src/Logging/RequestLogDocumentBuilder.php | Refine coverage-ignore annotations and unreachable fallbacks. |
| src/Logging/LogSanitizer.php | Add coverage-ignore guard around unexpected preg_replace outcome. |
| src/Exceptions/TransportBusyException.php | Add exception for re-entrancy on single-inflight transports (curl). |
| src/Exceptions/DownloadSizeExceededException.php | Add exception for max-size download enforcement. |
| src/Exceptions/AsyncTransportNotSupportedException.php | Add exception for async usage on sync-only transports. |
| src/Contracts/HttpClientInterface.php | Add head() to sync client contract. |
| src/Contracts/AsyncHttpClientInterface.php | Add headAsync() to async client contract. |
| src/Client/HttpClient.php | Add HEAD helpers; centralize download option prep (sink/max_size/resume). |
| src/Client/ClientBuilder.php | Add curl transport selection + sync build; enable middleware with custom adapters via wrapper. |
| src/Cache/FilesystemCache.php | Minor coverage-ignore annotation adjustment around filesystem edge cases. |
| src/Adapters/MiddlewareTransportAdapter.php | Add adapter wrapper to apply sync middleware pipeline to injected transports. |
| src/Adapters/Guzzle/GuzzleHttpClientAdapter.php | Add resume sink handling, max-size header checks, and better exception rethrowing. |
| src/Adapters/Curl/CurlRequestConfigurator.php | Add core curl option translation (timeouts, redirects, sink, max_size, resume, etc.). |
| src/Adapters/Curl/CurlRequestBodyBuilder.php | Add curl POSTFIELDS builder for portable body/json/form/multipart inputs. |
| src/Adapters/Curl/CurlProtocolRestrictor.php | Restrict protocols to HTTP(S) and validate redirect protocol allowlist. |
| src/Adapters/Curl/CurlNetworkOptionsConfigurator.php | Apply portable HTTP version + forced IP resolve options. |
| src/Adapters/Curl/CurlHttpClientAdapter.php | Add native synchronous curl transport implementation with portable-options validation. |
| src/Adapters/Curl/CurlHeaderBuilder.php | Add safe header merging + default UA + CRLF injection protection. |
| src/Adapters/Curl/CurlErrorMapper.php | Add errno mapping to package exceptions with sanitized messages. |
| src/Adapters/Curl/CurlClientCertificateConfigurator.php | Add portable cert/ssl_key option handling for mTLS. |
| src/Adapters/Curl/CurlAuthConfigurator.php | Add portable auth option handling with supported auth types. |
| README.md | Document curl transport usage and portability matrix; add Codacy badge. |
| phpstan-tests-baseline.neon | Remove no-longer-needed ignores after test refactors. |
| docs/05-maintenance/BACKLOG-POST-2.0.md | Update backlog notes for post-curl parity items. |
| docs/05-maintenance/03-external-ci-integrations.md | Document optional Codacy integration and excluded paths behavior. |
| docs/04-development/glossary.md | Update glossary entries for new transports/wrapper adapter. |
| docs/03-examples/README.md | List new curl transport example. |
| docs/03-examples/07-curl-transport.php | Add runnable example for curl transport + buildSync(). |
| docs/02-user-guide/troubleshooting.md | Add troubleshooting guidance for curl option/async rejections and busy transport. |
| docs/02-user-guide/classes-reference.md | Update class reference for new builder/transport APIs. |
| docs/02-user-guide/api-reference.md | Add API docs for curl transport selection and buildSync(). |
| docs/01-getting-started/installation.md | Note ext-curl as optional dependency for curl transport. |
| docs/01-getting-started/basic-concepts.md | Update library description and release target for 2.4.0. |
| docs/00-architecture/business-context-and-goals.md | Update deliberate limits to mention curl transport (needs correctness tweak). |
| docs/00-architecture/04-modules-and-domains.md | Update architecture module bullets for curl/custom transport options. |
| docs/00-architecture/01-project-overview.md | Update release target and adapter layer description to include curl. |
| CONTRIBUTING.md | Document PR title semantic rules/capitalization enforcement. |
| composer.json | Bump jooservices/exceptions constraint; document ext-curl suggestion. |
| CLAUDE.md | Update AI guidance to reflect curl transport and PR title rules. |
| CHANGELOG.md | Add 2.4.0 release notes detailing new transports/options/APIs. |
| AGENTS.md | Update repo instructions summary with curl transport + portable options note. |
| .github/workflows/semantic-pr.yml | Pin semantic PR action by SHA. |
| .github/workflows/secret-scanning.yml | Bump/pin checkout action SHA. |
| .github/workflows/scorecard.yml | Bump/pin actions SHAs for scorecard and SARIF upload. |
| .github/workflows/release.yml | Tighten permissions and pin actions; add composer validate/audit steps. |
| .github/workflows/pr-labeler.yml | Use base SHA checkout to prevent PR-controlled labeler config execution. |
| .github/workflows/fortify.yml | Add optional Fortify AST scan workflow with credential gating. |
| .github/workflows/codacy.yml | Add Codacy CLI SARIF scan workflow with upload normalization. |
| .github/workflows/ci.yml | Pin actions, add optional Codacy coverage upload, adjust artifact retention. |
| .codacy.yml | Add Codacy repository config excluding tests/vendor/coverage and size-based engines. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 76 out of 77 changed files in this pull request and generated no new comments.
Suppressed comments (1)
src/Client/HttpClient.php:176
- When
resumeis enabled, this unconditionally adds aRangeheader without removing any user-suppliedrange/Rangevariants. Because request headers are merged case-sensitively elsewhere, callers can accidentally send duplicate Range headers (e.g. pre-existingrangeplus injectedRange), which can lead to undefined server behavior.
Summary
developchanges.ext-curltransport, portable request options, sync builder API, download resume support, and HEAD convenience methods.Impact
This backward-compatible minor release adds an optional native cURL transport and related portable HTTP-client capabilities. Existing Guzzle-based integrations remain supported.
Validation
composer validate --strictcomposer checkcomposer ci