Skip to content

chore: upgrade farzai/transport to v2.1#31

Merged
parsilver merged 7 commits intomainfrom
upgrade-transport-v2
Mar 2, 2026
Merged

chore: upgrade farzai/transport to v2.1#31
parsilver merged 7 commits intomainfrom
upgrade-transport-v2

Conversation

@parsilver
Copy link
Contributor

@parsilver parsilver commented Mar 2, 2026

Summary

Upgrade farzai/transport from ^1.2 to ^2.1 and migrate the codebase to the new Transport v2 API.

Changes

  • Dependencies: Bump farzai/transport to ^2.1, add guzzlehttp/guzzle as dev dependency
  • ClientBuilder: Migrate to new TransportBuilder fluent API (withBaseUri, setLogger)
  • PendingRequest: Replace deprecated Request class with RequestBuilder
  • AbstractResponseDecorator: Remove PsrResponseTrait, implement PSR-7 delegation directly, add jsonOrNull() and toArray() methods
  • ResponseWithValidateErrorCode: Update throw() return type to static for proper chaining
  • Typo fix: Rename isSuccessfull() to isSuccessful()
  • Config: Add .phpunit.cache to .gitignore

Test plan

  • Verify composer install succeeds with updated dependencies
  • Run vendor/bin/pest to confirm all tests pass
  • Test API calls against Bitkub endpoints to validate transport layer changes

parsilver and others added 2 commits March 2, 2026 11:58
- Update farzai/transport dependency from ^1.2 to ^2.1
- Migrate ClientBuilder to use new TransportBuilder API (withBaseUri, setLogger)
- Replace Request class with RequestBuilder in PendingRequest
- Remove PsrResponseTrait usage and implement PSR-7 delegation directly in AbstractResponseDecorator
- Add jsonOrNull() and toArray() methods to AbstractResponseDecorator
- Fix typo: isSuccessfull() → isSuccessful()
- Fix throw() return type to static for proper chaining
- Add guzzlehttp/guzzle as dev dependency
- Add .phpunit.cache to .gitignore
@parsilver parsilver changed the title Upgrade farzai/transport to v2.1 chore: upgrade farzai/transport to v2.1 Mar 2, 2026
PHP 8.1 is EOL and pestphp/pest ^2.15 can no longer resolve
dependencies on PHP 8.1 with --prefer-lowest due to
brianium/paratest requiring PHP 8.2+.
@codecov
Copy link

codecov bot commented Mar 2, 2026

Codecov Report

❌ Patch coverage is 53.12500% with 30 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.36%. Comparing base (bde58e7) to head (b7d51d1).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
src/Responses/AbstractResponseDecorator.php 31.70% 28 Missing ⚠️
src/WebSocket/Engine.php 33.33% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main      #31      +/-   ##
============================================
- Coverage     85.10%   82.36%   -2.74%     
- Complexity      137      155      +18     
============================================
  Files            21       21              
  Lines           443      482      +39     
============================================
+ Hits            377      397      +20     
- Misses           66       85      +19     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

pestphp/pest ^2 cannot resolve dependencies on PHP 8.5 with
--prefer-lowest due to brianium/paratest version conflicts.
pestphp/pest ^2 does not support PHP 8.5 in any version.
- AbstractResponseDecorator: test jsonOrNull, toArray, PSR-7 delegation
- ResponseWithValidateErrorCode: test null error code, throw chaining
- ClientBuilder: test setHttpClient, setLogger, setRetries
- PendingRequest: test string body, no-options request, path normalization, createResponse
@parsilver parsilver merged commit 38266cc into main Mar 2, 2026
26 of 28 checks passed
@parsilver parsilver deleted the upgrade-transport-v2 branch March 2, 2026 05:21
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.

1 participant