cursyx / framework
Cursyx — PSR-first HTTP, DI, routing, validation, database tooling, and console kernel
Requires
- php: >=8.4
- ext-fileinfo: *
- ext-intl: *
- ext-pdo: *
- illuminate/database: ^11.0
- illuminate/events: ^11.0
- monolog/monolog: ^3
- nyholm/psr7: ^1.8
- nyholm/psr7-server: ^1.1
- predis/predis: ^2.3
- psr/container: ^2.0
- psr/http-client: ^1.0
- psr/http-message: ^2.0
- psr/http-server-handler: ^1.0
- psr/http-server-middleware: ^1.0
- psr/log: ^3.0
- psr/simple-cache: ^3.0
- vlucas/phpdotenv: ^5.6
Requires (Dev)
- brianium/paratest: ^7.8
- filp/whoops: ^2.15
- phpstan/phpstan: ^2
- phpstan/phpstan-phpunit: ^2.0
- phpunit/phpunit: ^13
Suggests
- filp/whoops: Pretty error pages in debug mode (^2.15)
This package is auto-updated.
Last update: 2026-05-05 17:31:31 UTC
README
Cursyx is a PHP web application framework delivered as the cursyx/framework Composer package. It provides
routing, named routes and URL generation, a PSR-7 / PSR-15 middleware pipeline, a PSR-11 service container,
configuration (config() / env()), input validation, RFC 9457 Problem JSON and pluggable HTML error rendering,
Slate templating (.slate), internationalization (trans(), catalogues), Illuminate-based database access with
migrations and a native Cursyx\Console\* CLI kernel (commands, migrations, and maintenance operations). The public
surface is the Cursyx\* code in src/; optional PHPStan rules ship under extensions/phpstan/, and
tests/ run PHPUnit against the library.
This is not a deployable site: applications add public/index.php, bootstrap/, config/,
routes/, and App\* code (for example via cursyx/skeleton) and require cursyx/framework as a dependency.
Key capabilities
- PSR-first HTTP — PSR-7 messages and PSR-15 middleware without hiding request flow behind magic globals.
- Explicit container — PSR-11 container with reflection wiring and config-driven discovery. Extension points are documented
in
cursyx/docs(PACKAGES.md,PUBLIC_API.md). - Honest errors — RFC 9457 Problem Details for JSON consumers; HTML paths that stay debuggable; structured logging hooks.
- Validation and input — Registry-based rules, strict vs loose modes, discoverable custom rules under your app.
- Database story — Illuminate Database integration with a thin Cursyx surface: manager, transactions, migrations,
seeding — see
cursyx/docsDATABASE.mdandCONSOLE.md. - Slate views — First-party
.slatetemplating with compile cache and explicitViewFactory/ engine swapping. - Native console —
Cursyx\Console\*kernel: typed commands,invoke()for tests and automation, generator commands where they help.
Documentation
End-user guides live in cursyx/docs repository (static Markdown: README.md, DOCUMENTATION.md,
and topic files such as ROUTING.md, ERRORS.md, CONSOLE.md). This repository’s CHANGELOG.md records
library-only semver-relevant changes.
Layout
| Path | Role |
|---|---|
src/ |
Framework implementation (Cursyx\*) and src/Support/helpers.php (global helpers when bootstrapped). |
extensions/phpstan/ |
First-party PHPStan rules for framework conventions (e.g. literal config() / url() usage). |
tests/ |
PHPUnit: Unit\ for isolated components, Kernel\ where a minimal app shell is required. |
config/ |
Test / package-default PHP config used by the framework’s own tests. |
routes/ |
Minimal route stubs for tests and OpenAPI-style commands. |
phpunit.xml, phpstan.neon |
Local quality gates. |
CHANGELOG.md |
Release history for this package. |
Who depends on this
| Use case | Repository |
|---|---|
| Greenfield MIT application | cursyx/skeleton — composer create-project cursyx/skeleton …. |
| Reference integration + demos | cursyx/demo |
Pin cursyx/framework with normal Composer semver (e.g. ^1.0) in application composer.json.
Development (from this directory)
composer install composer test # PHPUnit composer test:parallel # ParaTest (optional / CI) composer analyse # PHPStan composer analyse:max # Stricter probe
Continuous integration: .github/workflows/ci.yml runs the same PHPUnit, ParaTest, and PHPStan steps on pushes and pull requests to main / master.
License
Mozilla Public License 2.0 (MPL-2.0) — see LICENSE. File-level copyleft: you can ship larger applications on
top; modifications to MPL-covered files you distribute must remain available under MPL-2.0. (Not legal advice.)
For MIT-licensed application shells, use cursyx/skeleton so greenfield app code is not forced into the
same license posture as the core library.