Download the PHP package horizom/app without Composer
On this page you can find all versions of the php package horizom/app. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package app
The lightness PHP framework — fast, minimal, PSR-compliant.
Overview
Horizom is a lightweight PHP micro-framework built on PSR standards. It provides a clean, expressive foundation for building web applications and REST APIs without the overhead of a full-stack framework.
Core packages:
| Package | Role |
|---|---|
horizom/core |
Application container, configuration, lifecycle |
horizom/routing |
PSR-15 router powered by FastRoute |
horizom/http |
PSR-7 request/response helpers |
Requirements
- PHP 8.0 or higher
- Composer 2.x
Installation
Start the built-in development server:
Project Structure
Configuration
All sensitive values must be set in your .env file and are never committed to version control.
Access config values anywhere with the config() helper:
Routing
Web routes (routes/web.php)
API routes (routes/api.php)
Use explicit HTTP verbs — avoid any() as it widens the attack surface.
Controllers
Controllers are final classes. They return a PSR-7 ResponseInterface.
Middleware
Registering middleware
Global middleware is registered in bootstrap/dependencies.php:
CORS (CorsMiddleware)
Handles preflight OPTIONS requests directly — returns 204 without invoking the next handler — and attaches CORS headers to all other responses.
To restrict allowed origins in production, edit the $allowedOrigins property:
Error handling (ErrorHandlerMiddleware)
Maps exceptions to structured HTTP responses:
| Exception | Status |
|---|---|
NotFoundException |
404 Not Found |
MethodNotAllowedException |
405 Method Not Allowed |
Any other Throwable |
500 Internal Server Error |
XHR / AJAX requests receive a JSON payload; browser requests receive an HTML error page.
Stack traces are only included when
app.pretty_debug = true. Never expose them in production.
Built-in API Endpoints
| Method | Path | Description |
|---|---|---|
GET |
/api |
Health check alias |
GET |
/api/status |
Returns { "status": "UP" } |
GET |
/api/version |
Returns the framework version |
Views
Templates use the Blade engine. Layouts live in resources/views/.
Available helpers inside templates:
Testing
Tests use PHPUnit 11 and live in tests/Unit/.
Security
| Concern | Mitigation |
|---|---|
| Secrets in source code | Use .env for all credentials — never hardcode |
| Stack trace exposure | Only shown when app.pretty_debug = true |
| CORS wildcard in production | Replace ['*'] with an explicit origin list |
| Over-broad HTTP verbs | API routes use GET only; avoid any() |
| Type safety | All classes declare strict_types=1 |
Learning Horizom
The full Horizom documentation covers installation, routing, middleware, templating, and more.
License
The Horizom framework is open-sourced software licensed under the MIT license.
All versions of app with dependencies
horizom/core Version ^3.1
horizom/http Version ^3.1
horizom/routing Version ^3.1