PHPackages                             php-skir/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. [API Development](/categories/api)
4. /
5. php-skir/client

ActiveLibrary[API Development](/categories/api)

php-skir/client
===============

Laravel SkirRPC client package powered by Saloon.

v0.1.3(1mo ago)0151MITPHP ^8.3

Since Jul 6Compare

[ Source](https://github.com/php-skir/client)[ Packagist](https://packagist.org/packages/php-skir/client)[ Docs](https://github.com/php-skir/client)[ RSS](/packages/php-skir-client/feed)WikiDiscussions Synced 1w ago

READMEChangelogDependencies (18)Versions (6)Used By (1)

Laravel Skir Client
===================

[](#laravel-skir-client)

Laravel package for consuming SkirRPC services with Saloon.

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

[](#installation)

```
composer require php-skir/client
```

Publish the config if you want Laravel container resolution:

```
php artisan vendor:publish --tag=skir-client-config
```

```
SKIR_CLIENT_BASE_URL=https://example.com/api/skir
SKIR_CLIENT_ENDPOINT=/
SKIR_CLIENT_CODEC=dense_json
```

Usage
-----

[](#usage)

Use generated `MethodDescriptor` objects from `skir-php-generator` or `skir-laravel-data-generator`:

```
use App\Skir\Admin\SkirMethods;
use Skir\Client\SkirClient;

$client = new SkirClient('https://example.com/api/skir');

$user = $client->invoke(
    SkirMethods::getUser(),
    [
        'id' => 42,
        'name' => 'Maxim',
    ],
);
```

In Laravel, resolve the configured client from the container:

```
$user = app(SkirClient::class)->invoke(SkirMethods::getUser(), $payload);
```

Generated typed client adapters wrap this lower-level transport:

```
use App\Skir\Admin\GetUserRequestData;
use App\Skir\Admin\SkirRpcClient;
use Skir\Client\SkirClient;

$client = new SkirRpcClient(app(SkirClient::class));

$user = $client->getUser(new GetUserRequestData(
    userId: 42,
));
```

Generation
----------

[](#generation)

The package includes an Artisan wrapper for the Skir compiler:

```
php artisan skir:generate-client
```

Use `skir-php-generator` for standard PHP DTOs or `skir-laravel-data-generator` for Spatie Laravel Data DTOs in your `skir.yml`.

Example `skir.yml` for Laravel Data clients:

```
generators:
  - mod: skir-laravel-data-generator
    outDir: app/SkirGenerated
    config:
      namespace: App\Skir
```

The command runs:

```
node node_modules/skir/dist/compiler.js gen --root
```

Configure the executable paths with:

```
SKIR_CLIENT_NODE=node
SKIR_CLIENT_SKIR_BIN=/absolute/path/to/node_modules/skir/dist/compiler.js
SKIR_CLIENT_ROOT=/absolute/path/to/project
```

The command validates the configured project root and compiler file before spawning Node, then streams compiler output back through Artisan. Typed PHP objects, method descriptors, and typed RPC client adapters are produced by the Skir generator packages configured in `skir.yml`; this package provides the transport and the Laravel command to run that generation flow.

Codecs
------

[](#codecs)

Dense JSON is the default and matches the default server endpoint:

```
use App\Skir\Admin\SkirRpcClient;
use Skir\Client\SkirClient;

$transport = new SkirClient('https://example.com', '/api/skir');
$client = new SkirRpcClient($transport);
```

For readable JSON endpoints, configure both sides as standard JSON:

```
use Skir\Client\Codecs\SkirClientCodecs;
use Skir\Client\SkirClient;

$transport = new SkirClient(
    baseUrl: 'https://example.com',
    endpoint: '/api/skir',
    codec: SkirClientCodecs::standardJson(),
);
```

For base64-encoded dense JSON endpoints:

```
$transport = new SkirClient(
    baseUrl: 'https://example.com',
    endpoint: '/api/skir',
    codec: SkirClientCodecs::base64DenseJson(),
);
```

For binary CBOR endpoints:

```
$transport = new SkirClient(
    baseUrl: 'https://example.com',
    endpoint: '/api/skir',
    codec: SkirClientCodecs::cbor(),
);
```

CBOR support is optional. Install `spomky-labs/cbor-php` in the consuming app before using `SkirClientCodecs::cbor()` or `SKIR_CLIENT_CODEC=cbor`.

Container configuration supports:

```
SKIR_CLIENT_CODEC=dense_json
SKIR_CLIENT_CODEC=standard_json
SKIR_CLIENT_CODEC=base64_dense_json
SKIR_CLIENT_CODEC=cbor
```

The selected client codec must match the server endpoint codec.

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance93

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

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 ~4 days

Total

4

Last Release

34d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/91a724ec7e90c57050c6fa0fa34f9faeec7041896866d4f8ddc85ed00b0f8887?d=identicon)[happyDemon](/maintainers/happyDemon)

---

Tags

phplaravelrpcserializationsaloonskir

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/php-skir-client/health.svg)

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

###  Alternatives

[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k99.8M359](/packages/laravel-horizon)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

79227.1M246](/packages/laravel-mcp)[illuminate/queue

The Illuminate Queue package.

20433.0M1.8k](/packages/illuminate-queue)[spatie/laravel-health

Monitor the health of a Laravel application

88212.7M190](/packages/spatie-laravel-health)[illuminate/console

The Illuminate Console package.

13046.6M7.4k](/packages/illuminate-console)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.4M354](/packages/psalm-plugin-laravel)

PHPackages © 2026

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