Concept Core
Introduction
Concept Core is a strict-typed PHP engine for PHP 8.4+, built on PSR standards. It combines routing, DI, validation, database access, presentation, and CLI into one cohesive runtime system — without imposing unnecessary hidden conventions.
This documentation describes the Concept Core package — the foundation for Concept Skeleton and custom applications. Concept Core is not a CMS and not a full monolith framework: it is a kernel on which features are assembled through components and service providers.
New to Concept?
We recommend starting with Installation, then Setup, Configuration, and Request lifecycle.
Why Concept?
Concept Core offers framework-like convenience without the weight of a full monolith — explicit configuration, PSR compatibility, and modular composition instead of “magic”.
| What you get | Without Concept Core |
|---|---|
| Named routes, middleware, FormRequest, DTO casting | Every project assembles half a framework from scratch |
| Illuminate Database (Eloquent, migrations, pagination) | Pulling in all of Laravel just for ORM |
| Twig or Plates — your choice | Lock-in to one templating engine |
| Component registry — Auth, ACL, CMS as packages | Copying modules between repositories |
| PSR-7, PSR-11 container, PSR-15 middleware | Fighting legacy globals |
| Whoops in dev, safe fallback views in prod | White screens and silent failures |
Main libraries that core connects into one stack:
- League Container — dependency injection
- League Route — HTTP routing
- Rakit Validation — validation rules via FormRequest
- Valinor — mapping request data to DTOs
- Twig or Plates — templates
- Illuminate Database — Eloquent, migrations, pagination
Components
The main idea of Concept Core is components: vertical modules with their own routes,
migrations, seeders, views, console commands, and assets. Register a component class in config —
and ComponentsServiceProvider wires everything automatically.
Learn more: Component concept, Creating a component.
Official library documentation
Concept Core integrates these packages; API details are in their documentation:
| Library | Role in Concept Core | Documentation |
|---|---|---|
| League Container | DI, bindings, service providers | container.thephpleague.com |
| League Route | Routes, middleware, controller resolution | route.thephpleague.com |
| Laminas Diactoros | PSR-7 requests and responses | laminas-diactoros |
| Laminas HttpHandlerRunner | Emitting PSR-7 response to SAPI | laminas-httphandlerrunner |
| PSR-7 / PSR-11 / PSR-15 | HTTP messages, container, middleware | PSR-7, PSR-11, PSR-15 |
| Twig / Plates | HTML templates | Twig, Plates |
| Rakit Validation | FormRequest validation rules | rakit/validation |
| Valinor | DTO mapping, casting route params | cuyz/valinor |
| Illuminate Database | Eloquent / Capsule, migrations | Eloquent |
| Symfony HttpFoundation | Session, flash messages | HttpFoundation |
| Symfony Console | CLI commands (bin/console.php) |
Console |
| Monolog | Logging, query log | monolog/monolog |
| Whoops | Debug error pages in dev | filp/whoops |
| Noodlehaus Config | PHP config files | hassankhan/config |
| phpdotenv | .env → config |
vlucas/phpdotenv |
Learning Concept
Recommended path:
- Follow the Getting started section in this documentation.
- Clone Concept Skeleton and run the landing page locally.
- Review source code in
vendor/php-concept/coreor in thecode/coredirectory of this repository.