Download the PHP package scafera/kernel without Composer

On this page you can find all versions of the php package scafera/kernel. 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 kernel

scafera/kernel

Scafera Kernel is the execution core of the Scafera framework. It provides a minimal, controlled runtime environment and defines the boundaries within which applications operate.

Provides: The boot core of Scafera — discovers bundles, loads an architecture package, enforces structural boundaries, and hands off to Symfony. User projects never define a Kernel.

Depends on: A host project with a standard layout (public/, var/, config/), a Composer-installed architecture package implementing ArchitecturePackageInterface, Symfony 8 + FrameworkBundle, and an APP_SECRET provided via config/ overrides or OS env.

Extension points:

  • Contracts in Scafera\Kernel\Contract\ArchitecturePackageInterface (primary), ValidatorInterface, AdvisorInterface, GeneratorInterface, PathProviderInterface, ViewInterface
  • Attributes — #[Route] (HTTP), #[AsCommand] (CLI), #[Config] (env/parameter injection)
  • DI tags — scafera.validator, scafera.advisor, scafera.path_provider (auto-collected)

Not responsible for: Routing/commands/services without an architecture package · folder conventions (owned by architecture packages) · presentation (scafera/frontend) · persistence (scafera/database) · logging (scafera/log) · HTTP header/CORS customization · .env files · config/packages/ scanning · userland event dispatch.

Headless by design

The kernel is intentionally non-functional without an architecture package. Without one:

Install an architecture package (e.g. scafera/layered) to define structure, behavior, and rules.

Design principles

How it works

Dynamic bundle discovery

Bundles are discovered automatically from Composer's installed.json. Any installed package declaring "type": "symfony-bundle" is registered at boot — no config/bundles.php needed.

Configuration

User configuration goes in a single optional file:

This file can override any bundle configuration and set environment variables:

Secrets like APP_SECRET belong in config/config.local.yaml (git-ignored). The scaffold plugin generates this file with a random secret during composer create-project.

There is no config/packages/ directory — the kernel does not scan for it.

Environment bootstrap

The Bootstrap class handles environment setup before the Symfony runtime takes over:

  1. Sets APP_ENV and APP_DEBUG defaults (dev / 1)
  2. Reads the env: section from config/config.yaml if present
  3. Real OS environment variables always take precedence
  4. Validates that APP_SECRET is set

Contracts

The kernel defines contracts that architecture and capability packages implement:

Contract Purpose
ArchitecturePackageInterface Defines an architecture package
ValidatorInterface Hard validation rule (affects exit code)
AdvisorInterface Soft advisory check (never affects exit code)
GeneratorInterface Code generator for scafera make:* commands
PathProviderInterface Registers paths shown by info:paths
ViewInterface Template rendering (implemented by scafera/frontend)

HTTP types

Controllers use these types instead of Symfony's HTTP classes directly. The ControllerBoundaryPass enforces this at compile time.

Type Purpose
Scafera\Kernel\Http\Request Wraps the incoming HTTP request
Scafera\Kernel\Http\Response Plain HTTP response
Scafera\Kernel\Http\JsonResponse JSON HTTP response
Scafera\Kernel\Http\RedirectResponse Redirect HTTP response
Scafera\Kernel\Http\Route Attribute for defining routes
Scafera\Kernel\Http\ParameterBag Query and request parameters (typed getters)
Scafera\Kernel\Http\HeaderBag Request headers (case-insensitive)

All types live in Scafera\Kernel\Http\.

Console

Type Purpose
Scafera\Kernel\Console\Command Base command class with handle() method
Scafera\Kernel\Console\Input Command input wrapper
Scafera\Kernel\Console\Output Command output wrapper with success(), error(), warning()
Scafera\Kernel\Console\Attribute\AsCommand #[AsCommand] attribute

Testing

Type Purpose
Scafera\Kernel\Test\WebTestCase HTTP test base with get(), post(), etc.
Scafera\Kernel\Test\TestResponse Fluent assertions: assertOk(), assertJsonPath(), etc.
Scafera\Kernel\Test\CommandTestCase Console test base
Scafera\Kernel\Test\CommandResult Command output assertions

Example controller

Request

Properties:

Methods:

Response types

Route attribute

Class-level #[Route] sets a prefix for method-level routes. A class-level #[Route] with no method-level routes maps to __invoke.

ParameterBag

HeaderBag

Built-in commands

Scafera Packages

Architecture packages

Define folder structure, service discovery, and convention enforcement.

Package Description
scafera/layered Layered architecture conventions

Capability packages

Add optional functionality. Install only what you need.

Package Description
scafera/auth Authentication and access control
scafera/database Database persistence (Doctrine)
scafera/file File upload, validation, and storage
scafera/form Form handling and DTO validation
scafera/frontend Template rendering (Twig)
scafera/log Structured logging (PSR-3)
scafera/translate Translation and locale management

Tooling

Package Description
scafera/scaffold Composer plugin that scaffolds project files

Project templates

Package Description
scafera/layered-web Layered web application template

Requirements

License

MIT


All versions of kernel with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4
symfony/console Version ^8.0
symfony/framework-bundle Version ^8.0
symfony/runtime Version ^8.0
symfony/yaml Version ^8.0
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 scafera/kernel contains the following files

Loading the files please wait ...