PHPackages                             rpungello/sdk-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. rpungello/sdk-client

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

rpungello/sdk-client
====================

Generic client for creating PHP-based SDKs using Spatie's DTOs for data transfer

2.2.0(1mo ago)15.2k—3.8%1[1 PRs](https://github.com/rpungello/sdk-client/pulls)1MITPHPPHP ^8.1CI passing

Since Aug 8Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/rpungello/sdk-client)[ Packagist](https://packagist.org/packages/rpungello/sdk-client)[ Docs](https://github.com/rpungello/sdk-client)[ GitHub Sponsors](https://github.com/rpungello)[ RSS](/packages/rpungello-sdk-client/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (14)Versions (31)Used By (1)

PHP SDK Client
==============

[](#php-sdk-client)

[![Latest Version on Packagist](https://camo.githubusercontent.com/53990daf06c0ba057f2fa12e8d7db3123162fbb14bc31080b311e44ab1235669/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7270756e67656c6c6f2f73646b2d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rpungello/sdk-client)[![Tests](https://camo.githubusercontent.com/26331c6a3c2fa22aa128dcfd8a0fea48e70872928019fcbe665230c2fbaf2340/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7270756e67656c6c6f2f73646b2d636c69656e742f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/rpungello/sdk-client/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/b33f270052ffd1a5d9a689bc6cebf5c1f5d25124748a8a5d5475fac8243feb97/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7270756e67656c6c6f2f73646b2d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rpungello/sdk-client)

Generic client for creating PHP-based SDKs using Spatie's DTOs for data transfer.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require rpungello/sdk-client
```

Usage
-----

[](#usage)

### Instantiate the client

[](#instantiate-the-client)

```
$client = new Rpungello\SdkClient('https://example.com');
```

### GET requests

[](#get-requests)

```
// Returns a Psr\Http\Message\ResponseInterface response
$response = $client->get('/api/v1/users');

// Specify a query string
$response = $client->get('/api/v1/users', [
    'page' => 1,
    'limit' => 10,
]);

// Returns a json-decoded array from the response body
$response = $client->getJson('/api/v1/users');

// Takes the JSON data returned and wraps it in a DTO for static typing
$response = $client->getDto('/api/v1/users/1', UserDto::class);

// Takes the JSON data returned and converts it to an array of DTOs for static typing
$response = $client->getDtoArray('/api/v1/users', UserDto::class);
```

### PUT/POST/PATCH requests

[](#putpostpatch-requests)

```
// Returns a Psr\Http\Message\ResponseInterface response
$response = $client->post('/api/v1/users', [
    'name' => 'John Doe',
    'email' => 'john@example.com',
]);

// Returns a json-decoded array from the response body
$response = $client->postJson('/api/v1/users', [
    'name' => 'John Doe',
    'email' => 'john@example.com',
]);

// Takes the JSON data returned and wraps it in a DTO for static typing
$user = new UserDto([
    'name' => 'John Doe',
    'email' => 'john@example.com',
]);
$response = $client->postDto('/api/v1/users', $user);
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Rob Pungello](https://github.com/rpungello)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

51

—

FairBetter than 96% of packages

Maintenance89

Actively maintained with recent releases

Popularity25

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 86.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~33 days

Recently: every ~40 days

Total

30

Last Release

55d ago

Major Versions

1.14.0 → 2.0.12025-10-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/5a690a16dfab0dcfd9d326e1ee3619832e586b1ac53fb52faa6ab00246eefb7a?d=identicon)[rpungello](/maintainers/rpungello)

---

Top Contributors

[![rpungello](https://avatars.githubusercontent.com/u/3287663?v=4)](https://github.com/rpungello "rpungello (125 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (12 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (5 commits)")[![edurodriguesdias](https://avatars.githubusercontent.com/u/24960126?v=4)](https://github.com/edurodriguesdias "edurodriguesdias (2 commits)")

---

Tags

rpungellosdk-client

###  Code Quality

TestsPest

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/rpungello-sdk-client/health.svg)

```
[![Health](https://phpackages.com/badges/rpungello-sdk-client/health.svg)](https://phpackages.com/packages/rpungello-sdk-client)
```

###  Alternatives

[ashallendesign/favicon-fetcher

A Laravel package for fetching website's favicons.

190272.4k3](/packages/ashallendesign-favicon-fetcher)[omniphx/forrest

A Laravel library for Salesforce

2724.4M8](/packages/omniphx-forrest)[glhd/conveyor-belt

14797.0k](/packages/glhd-conveyor-belt)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[spatie/laravel-rdap

Perform RDAP queries in a Laravel app

72108.3k2](/packages/spatie-laravel-rdap)[crescat-io/saloon-sdk-generator

Simplified SDK Scaffolding for Saloon

13130.9k7](/packages/crescat-io-saloon-sdk-generator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
