Download the PHP package 1d98/framework without Composer
On this page you can find all versions of the php package 1d98/framework. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download 1d98/framework
More information about 1d98/framework
Files in 1d98/framework
Package framework
Short Description Universal zero-dependency PHP 8.5 framework skeleton
License MIT
Homepage https://github.com/1d98/framework
Informations about the package framework
Framework
A universal zero-dependency PHP 8.5 framework skeleton. Immutability by default, strict types everywhere, and PHPStan max from day one.
Why?
Most PHP frameworks drag in a hundred transitive dependencies and lock you into abstractions. This one is the opposite: a thin, opinionated core with no runtime dependencies, written for the modern PHP 8.5 feature set.
- Zero runtime deps. Only
phpunitandphpstanfor dev. - Final readonly value objects — no setters, no surprises.
- PSR-4 autoloading under the
Framework\namespace. - PHPStan level max passes on the entire codebase.
- Immutable Config with
with()for safe overrides. - DI Container with autowiring via reflection.
- HTTP stack with a tiny router, middleware pipeline, RFC 7807 errors, and exception-aware kernel.
- Production-safe by default — generic exception messages are hidden, opt in to debug mode to expose them. Test count is tracked by CI.
See the CI workflow for the current number.
Requirements
- PHP 8.5 or higher
- Composer 2.x
Installation
Quick start (CLI)
Quick start (Web)
Set APP_DEBUG=1 to enable debug mode (exposes exception messages and traces).
Then open http://localhost:8000. Try:
| URL | What it does |
|---|---|
/ |
HTML landing page |
/json |
JSON response echoing the request |
/hello/{name} |
Path parameter — try /hello/world |
/api/v1/users |
Grouped route (JSON list) |
/api/v1/echo (POST) |
JSON body parser — send {"hello":"world"} |
/api/v1/form (POST) |
Form body parser — send name=Alice&age=30 |
/boom |
Throws NotFoundHttpException → 404 problem details |
/missing |
404 problem details |
Hello, World
The router sorts routes by specificity (static beats {param}),
and patterns are compiled on Route construction.
Streaming responses
For bodies too large or too long-lived to buffer in memory — Server-Sent Events, NDJSON exports, large-file downloads — return a StreamedResponse from the handler. The body is produced at send() time by a Closure(resource): void emitter; Transfer-Encoding: chunked is handled automatically. Static helpers cover the common wire formats:
See docs/streaming-response.md for the SSE / NDJSON / large-file-download recipes, deployment gotchas (PHP-FPM output_buffering = Off, nginx X-Accel-Buffering: no, Apache mod_buffer), and PHPUnit testing patterns.
Project structure
For the full module layout, see docs/README.md.
Documentation
See docs/README.md for the full index.
Development
Contributing
See CONTRIBUTING.md.
License
MIT