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 and Laravel server and client integrations.

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.

Other languages

The Laravel server speaks the standard SkirRPC protocol, so clients generated by any upstream Skir generator can call it. For TypeScript, use skir-typescript-gen with the upstream skir-client runtime.

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 archive

    Forked from gepheum/skir-typescript-client

    Deprecated: use upstream skir-client from npm

    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…