PHPackages                             php-skir/runtime - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. php-skir/runtime

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

php-skir/runtime
================

PHP runtime support for Skir serialization and descriptors.

v0.1.2(1mo ago)0192MITPHP ^8.3

Since Jul 6Compare

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

READMEChangelogDependencies (6)Versions (5)Used By (2)

Laravel Skir Runtime
====================

[](#laravel-skir-runtime)

Framework-agnostic PHP runtime support for Skir serialization and descriptors.

This package is intentionally small. Laravel-specific routing and client behavior live in separate packages.

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

[](#installation)

```
composer require php-skir/runtime
```

What it provides
----------------

[](#what-it-provides)

- `DenseJson` for encoding and decoding Skir dense JSON values.
- `Cbor` helpers for optional CBOR bodies and SkirRPC envelopes.
- `Type`, `Field`, and `Variant` descriptors for generated DTO metadata.
- `EnumValue` for Skir enum constants and wrapper variants.
- `MethodDescriptor` for generated SkirRPC method metadata.
- Package-local `SkirRuntimeException` exceptions for invalid Skir values.

Dense JSON
----------

[](#dense-json)

```
use Skir\Runtime\DenseJson;
use Skir\Runtime\Field;
use Skir\Runtime\Type;

$user = Type::struct([
    Field::value('id', 0, Type::int32()),
    Field::value('name', 1, Type::string()),
]);

$json = DenseJson::toJson($user, [
    'id' => 1,
    'name' => 'Jane',
]);

$data = DenseJson::fromJson($user, $json);
```

Struct values are encoded as field-number indexed arrays. Removed fields and sparse field numbers are preserved so generated DTOs can stay compatible with existing Skir schemas.

CBOR
----

[](#cbor)

CBOR support is optional and requires `spomky-labs/cbor-php` in the consuming app:

```
composer require spomky-labs/cbor-php
```

The runtime helper keeps CBOR wrapping shared between server and client packages:

```
use Skir\Runtime\Cbor;

$body = Cbor::encodeEnvelope($methodDescriptor, $request);
$payload = Cbor::decodeEnvelope($body);
```

Current scope
-------------

[](#current-scope)

This runtime does not register routes, discover procedures, or make HTTP calls. Those concerns belong in the `php-skir/server` and `php-skir/client` packages.

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance93

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community8

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

Total

3

Last Release

35d ago

### Community

Maintainers

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

---

Tags

phplaravelrpcserializationskir

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

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

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

###  Alternatives

[ajthinking/archetype

Programmatically edit PHP and Laravel files.

2724.0M21](/packages/ajthinking-archetype)[rumenx/php-sitemap

Framework-agnostic Sitemap generator for PHP, Laravel, and Symfony.

1.3k29.9k1](/packages/rumenx-php-sitemap)[rajentrivedi/tokenizer-x

TokenizerX calculates required tokens for given prompt

92261.6k3](/packages/rajentrivedi-tokenizer-x)

PHPackages © 2026

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