cursyx/framework

Cursyx — PSR-first HTTP, DI, routing, validation, database tooling, and console kernel

Maintainers

Package info

github.com/FallegaHQ/cursyx-framework

pkg:composer/cursyx/framework

Statistics

Installs: 7

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.1 2026-05-05 17:30 UTC

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/docs DATABASE.md and CONSOLE.md.
  • Slate views — First-party .slate templating with compile cache and explicit ViewFactory / engine swapping.
  • Native consoleCursyx\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/skeletoncomposer 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.