Skip to content
@php-skir

Skir - PHP flavor

Skir riding the PHP elephant

Bring Skir's type-safe workflow to PHP.

Generate PHP contracts from .skir schemas, expose them from Laravel, and consume them with typed PHP or TypeScript clients.

Get started with Laravel · Explore Skir

What is Skir?

Skir is a schema language for defining data models and APIs once, then generating idiomatic, type-safe code across your stack. php-skir brings that workflow to PHP with code generators, Laravel server and client integrations, and a TypeScript runtime for generated clients and services.

How it fits together

  1. Define models and RPC methods in .skir files.
  2. Generate typed PHP data objects and contracts.
  3. Serve procedures through ordinary Laravel controllers.
  4. Consume them from typed PHP or TypeScript clients.

Laravel integrations

Repository Use it to
php-skir/server Expose generated SkirRPC methods from Laravel controllers.
php-skir/client Consume SkirRPC services through a typed Laravel client powered by Saloon.

PHP generators

Repository Generates
skir-laravel-data-generator Spatie Laravel Data objects, typed RPC clients, and server contracts.
skir-php-generator Framework-agnostic PHP objects, typed RPC clients, and server contracts.
skir-simple-data-objects-generator Immutable DTOs built on std-out/simple-data-objects, typed RPC clients, and server contracts.

TypeScript

@php-skir/skir-client is the runtime used by generated TypeScript clients and services. It supports Skir's default transport as well as opt-in CBOR request and response bodies.

Note

CBOR is a php-skir ecosystem extension and is not part of upstream Skir's standard RPC transport. Enable it on both sides of a connection; otherwise, keep the default transport for upstream compatibility.

Pinned Loading

  1. server server Public

    Laravel SkirRPC server package.

    PHP

  2. client client Public

    Laravel SkirRPC client package powered by Saloon.

    PHP

  3. skir-php-generator skir-php-generator Public

    Skir code generator for standard PHP data objects

    TypeScript

  4. skir-laravel-data-generator skir-laravel-data-generator Public

    Skir code generator for Spatie Laravel Data objects.

    TypeScript

  5. typescript-client typescript-client Public

    Forked from gepheum/skir-typescript-client

    Runtime dependency for TypeScript code generated from .skir files

    TypeScript

  6. runtime runtime Public

    PHP runtime support for Skir serialization and descriptors

    PHP

Repositories

Showing 9 of 9 repositories

Top languages

Loading…

Most used topics

Loading…