Download the PHP package php-concept/core without Composer

On this page you can find all versions of the php package php-concept/core. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package core

Concept Core

Concept Core is an aesthetic, strict-typed PHP engine built on PSR standards.

A strict-typed PHP application engine for builders who want ergonomics without the monolith.

Concept Core is the foundation of the Concept stack: a lean, PSR-native runtime that wires routing, DI, validation, database access, views, and CLI into a coherent whole — then gets out of your way. Applications are assembled from components: self-contained modules that ship their own routes, migrations, seeders, views, assets, and service providers.

Built for PHP 8.4+, every public API uses declare(strict_types=1) and is designed to be extended, not overridden.

No magic — no hidden conventions you cannot grep for.


Why Concept Core?

You get Without
Named routes, middleware, FormRequests, DTO casting Re-implementing half of a framework on every project
Illuminate Database (Eloquent, migrations, pagination) Dragging in all of Laravel
Twig or Plates, your choice Lock-in to one templating story
Component registry — drop in Auth, ACL, CMS as packages Copy-pasting modules between repos
PSR-7 HTTP, PSR-11 container, PSR-15 middleware Fighting legacy globals
Whoops in dev, safe fallbacks in prod White screens and silent failures
Built-in telemetry hooks Guessing what booted and when

Concept Core is not a CMS and not a full-stack framework. It is an engine: opinionated where it matters (request lifecycle, validation, errors), flexible everywhere else (authorization, business logic, UI).


Architecture at a glance

Request flow

  1. App boots service providers; ComponentsServiceProvider registers component routes, migrations, seeders, views, and commands.
  2. Router matches a route; middleware runs (CSRF, validation handler, view data, …).
  3. RouteStrategy invokes the handler: route interceptors first, then autowiring (FormRequest validation, route-param casting, ServerRequestInterface).
  4. Controller returns a PSR-7 response; SapiEmitter sends it.

Tech stack

Layer Library
HTTP messages laminas/laminas-diactoros
HTTP runner laminas/laminas-httphandlerrunner
Routing league/route
DI league/container
Database illuminate/database
Validation rakit/validation (via magewirephp/validation)
DTO mapping cuyz/valinor
Views twig/twig or league/plates
Console symfony/console
Sessions & flash symfony/http-foundation
Config hassankhan/config
Logging monolog/monolog
Errors (dev) filp/whoops
Env vlucas/phpdotenv

Quick start

Install

Requires PHP 8.4+ and extensions: pdo, json, mbstring, dom, xml.

Minimal bootstrap

Front controller (public/index.php)

Console entry (bin/console.php)


Components — the killer feature

A component is a vertical slice of your application: routes, providers, migrations, seeders, views, console commands, and publishable assets — bundled behind one class.

Register the component class in config (resolved from the container via ReflectionContainer):

ComponentsServiceProvider automatically:

ComponentInterface methods:

Method Returns
providers() Extra DI service provider classes
migrations() Migration directory paths
seeders() Seeder class names
commands() Symfony console command classes
viewPaths() Twig/Plates namespaces (@auth-admin/...)
viewContexts() URI prefix → layout namespace
viewExtensions() Twig extension classes
assets() Source → public publish map

Ship a feature once. Reuse it in every project.


HTTP layer

Routing

Routes live in plain PHP files. League Route gives you groups, middleware, and named routes:

Generate URLs anywhere:

List routes from CLI:

RouteStrategy — autowiring that actually helps

The controller instance is resolved from the container (constructor injection via ReflectionContainer). Action method parameters are filled by RouteStrategy:

Parameter type Resolved from
FormRequest subclass Container instance, validated, injected (throws ValidationException on failure)
ServerRequestInterface Current PSR-7 request (route vars already attached)
Route vars (int $id) URL segment, cast via Valinor (CasterInterface)
Parameters with defaults Default value
Anything else null

No manual $request->getAttribute('id') boilerplate for route parameters.

Route interceptors

Pre-controller hooks configured in config/routes.php:

Throw your own exceptions; core stays agnostic. Pair with middleware like HandleValidationExceptionMiddleware for redirects and JSON errors.

Built-in middleware

Middleware Role
VerifyCsrfTokenMiddleware CSRF verification on mutating requests
HandleValidationExceptionMiddleware Redirect back with errors / JSON 422
ShareViewDataMiddleware Flash, old input, CSRF token → view context
StorePreviousUrlMiddleware Tracks previous/current URL in session; sets safe_back_url for ResponseFactory::back()
ParseJsonBodyMiddleware JSON request bodies
ForceJsonResponseMiddleware API-style error responses

Response factory


Validation & DTOs

FormRequest

In the controller:

Features:

Valinor casting

Route parameters and DTOs are mapped with Valinor — cached mappers, scalar coercion, superfluous key tolerance. Route-param cast failures throw CastingException; DTO mapping via FormRequest::toDto() wraps failures as ValidationCastException.


Database

Illuminate Capsule + Eloquent without the Laravel kernel:

CLI

Migrations and seeders from all registered components are merged automatically.


Views

Switch engines via service provider — register one of:

Namespaces & contexts

App-level config (config/view.php) or component viewPaths() / viewContexts() / viewExtensions():

Render:

ShareViewDataMiddleware injects errors, old, flashes, and csrf_token into every view.


Configuration

PHP config files merged via Noodlehaus Config. Canonical keys live in Concept\Core\Foundation\ConfigKey:

.env support through vlucas/phpdotenv in the application skeleton.


Security

Authorization (ACL, policies, gates) is intentionally application-level via route interceptors and middleware — core provides the hook, you bring the rules.


Error handling

Errors are handled from the first line of bootstrap:

Environment Behaviour
APP_DEBUG=true Whoops Pretty Page (web)
CLI Plain text stack traces
Production web Branded fallback from errors_fallback_views path (bootstrap/paths.php; typically resources/views/errors/fallback)
JSON requests Whoops JsonResponseHandler when RequestFormat::expectsJson()

All paths log through PhpErrorLogHandler → Monolog. Before providers boot, early failures use resources/views/errors/fallback/500.php. Production handler never leaks stack traces to users.


Telemetry

When telemetry.enabled is true, the framework records bootstrap milestones:

Useful for debug bars and performance profiling. Access via TelemetryCollector in the container.


Logging

Monolog with rotating file handler (storage/logs). Configurable level, retention, and channel name. Database queries and validation payloads can be logged with automatic masking.


Locale

LocaleServiceProvider resolves the active locale from config or a custom LocaleResolverInterface (app.locale_resolver). Validation messages load from {validator_translations}/{locale}.php with app.fallback_locale fallback.


Service providers (built-in)

Providers live under Concept\Core\Providers\{Group}\*.

Provider Registers
Bootstrap\ConfigServiceProvider Config, PathManager, .env
Http\HttpServiceProvider Router, PSR-7 request, URL generator, responses
Http\SessionServiceProvider Symfony session & flash bag
Support\ValidationServiceProvider Rakit validator, translations
Support\CastingServiceProvider Valinor CasterInterface
Database\DatabaseServiceProvider Capsule, migrator, seeder manager
View\TwigServiceProvider / View\PlatesServiceProvider View engine
View\ViewRegistryServiceProvider Paths, extensions, contexts
Component\ComponentsServiceProvider Component boot (routes, migrations, …)
Console\ConsoleServiceProvider Symfony Console application
Logging\LogServiceProvider Monolog
Bootstrap\ErrorHandlerServiceProvider Whoops handlers per environment
Telemetry\TelemetryServiceProvider Telemetry collector
Support\DataMaskerServiceProvider Log redaction rules
Support\LocaleServiceProvider Locale resolution
Logging\DebugLoggerServiceProvider In-memory debug log (dev tools)

Register only what you need in bootstrap/providers/app.php.


Console commands (core)

Command Description
route:list All registered routes, middleware, handlers
db:migrate Run pending migrations
db:rollback Roll back last batch
migration:list Recent migrations from the database table
db:seed Run seeders (all or -c ClassName)
seeders:list Registered seeder classes
component:list Installed components
component:publish-assets Copy component assets to public/
view:clear Clear compiled Twig cache

Components can register their own commands the same way.


Development

The core ships with 70+ test classes covering routing, validation, providers, middleware, Whoops integration, and component boot sequences.


Design principles

  1. Strict types everywhere — fewer surprises at runtime.
  2. PSR first — interoperable HTTP, container, middleware.
  3. Composition over inheritance — components and providers, not base controller magic.
  4. Explicit configuration — no hidden conventions you cannot grep for.
  5. Fail loud in dev, safe in prod — Whoops vs fallback views.
  6. Batteries included, swappable — Twig or Plates.

Project layout (application skeleton)


Read the Documenation


License

MIT © Concept Framework contributors.


Concept Core — small kernel, sharp edges, infinite composition.
Build the app. Ship the component. Repeat.


All versions of core with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
league/route Version ^6.2
league/container Version ^5.1
laminas/laminas-diactoros Version ^3.8
laminas/laminas-httphandlerrunner Version ^2.13
filp/whoops Version ^2.18
monolog/monolog Version ^3.10
vlucas/phpdotenv Version ^5.6
hassankhan/config Version ^3.2
symfony/http-foundation Version ^8.0
twig/twig Version ^3.0
illuminate/database Version ^13.1
illuminate/events Version ^13.1
illuminate/pagination Version ^13.1
symfony/console Version ^8.0
illuminate/filesystem Version ^13.1
cuyz/valinor Version ^2.4
magewirephp/validation Version ^1.0
symfony/filesystem Version ^8.0
league/plates Version ^3.6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package php-concept/core contains the following files

Loading the files please wait ...