skyyware / stage
A PHP framework for people and coding agents, with explicit application boundaries.
Requires
- php: ^8.4
- ext-json: *
Requires (Dev)
- deptrac/deptrac: ^4.0
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^12.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2026-10-01 17:51:46 UTC
README
Stage is a PHP framework for people and coding agents. Start with a request and a response. Keep your application rules in typed PHP objects, then compose more features as the application grows.
Requires PHP 8.4 or later within PHP 8. Stage is open source under MIT. Version 0.1 is an early release. The API can change between minor versions before 1.0. Read the changelog before updating.
Install with Composer
In an existing Composer project:
composer require skyyware/stage:^0.1
Composer installs the tagged package from Packagist.
No GitHub account or custom repository setting is required. Commit your application's composer.lock.
Run a small application
To run the included example and development checks:
git clone https://github.com/skyyware/stage.git
cd stage
composer install
php -S 127.0.0.1:8080 examples/hello.php
Open http://127.0.0.1:8080. The response is {"hello":"world"}.
The application is:
<?php declare(strict_types=1); use Stage\Http\Application; use Stage\Http\Response; use Stage\Http\Route; require dirname(__DIR__) . '/vendor/autoload.php'; (new Application( Route::get('/', fn () => Response::json(['hello' => 'world'])), ))->run();
Build with clear boundaries
- Pass dependencies through constructors. No global container is required.
- Parse external input into types before calling an operation.
- Check permissions inside the operation, including calls outside HTTP.
- Expose a feature contract when another feature needs it.
- Run
composer checkto validate types, behavior, and dependency rules.
There are no production Composer dependencies. Development uses PHPUnit, PHPStan at its strictest level, and Deptrac to check declared dependency rules. The checks include an intentionally forbidden import to prove the architecture rule can fail.
Read the HTTP reference, feature composition, working with agents, and the principles. Read the design for the core's responsibilities.
Choose a package
Install only the packages your application needs:
- Stage CMS adds editing, revisions, publication, and scoped agent access.
- Stage Chat defines a stateless chat contract without a provider dependency.
- Stage Chat Codex implements that contract with an isolated Codex CLI process.
Each package has its own installation guide, version, and MIT license.
Current scope
The initial core provides literal and named-parameter HTTP routes, immutable messages, bounded request bodies, JSON responses, and an optional caller permission value. Authentication, persistence, queues, templates, and agent integrations belong to application code until an independently tested package earns a place here.
The router buffers bodies. Worker lifecycle and performance under load have not been validated. See the design for the current boundaries.
License
MIT. See contributing before changing the API. Maintainers follow the package release guide.