Download the PHP package flytachi/winter-kernel without Composer
On this page you can find all versions of the php package flytachi/winter-kernel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download flytachi/winter-kernel
More information about flytachi/winter-kernel
Files in flytachi/winter-kernel
Package winter-kernel
Short Description The kernel of the Winter framework โ a PHP 8.4 library that turns a directory of classes into a running application on a resident Swoole runtime.
License MIT
Homepage https://winterframe.net
Informations about the package winter-kernel
Winter Kernel
๐ winterframe.net/docs ยท Install ยท Quick start ยท Key concepts
Every link here points at
winterframe.netand is language-neutral โ the site serves the page in your language, RU or EN. Both are complete.
The kernel of the Winter framework: the package you install, and the only one you install directly. It turns a directory of classes into a running application โ routing, request binding and validation, responses, dependency injection, managed processes and daemons, scheduling, localization, diagnostics and the console.
It is a library, not a skeleton. There is nothing to scaffold and no directory tree to create: you add it to a project, write one class saying what the application contains, and run it.
What is not in it
The database layer and the Redis client are separate packages, installed on demand. The kernel knows just enough about them to find your classes and hand them over when the package is there โ an application that talks only to an external API should not carry an ORM, a connection pool and a migration engine it never loads.
| Package | What it adds | Docs |
|---|---|---|
flytachi/winter-ppa |
Repositories, entities, query builder, migrations, DB pool | PPA |
flytachi/winter-redis |
Pooled Redis: prefixed stores, hashes, lists, streams | Redis |
See Ecosystem for the full picture, including the libraries the kernel already brings with it (DI, logger, CDO, thread).
Requirements
| PHP | 8.4+ |
| Required extensions | pcntl, posix, fileinfo |
| For the HTTP server | swoole โ coroutines, connection pooling, static files |
| Optional | pdo (database) ยท bcmath, decimal (exact numbers) ยท simplexml (XML bodies) |
Everything else comes from composer. Details: Installation.
Install
Mini start โ two files
bootstrap.php โ loads the autoloader and declares what the application contains:
call โ the single entry point for everything, the server included
(chmod +x call once):
chdir() is not decoration: it ties .env, storage/ and resources/ to the project
rather than to wherever the command was typed, which is what makes calls from cron,
systemd and docker exec predictable.
That is a working project โ no .env, no directories. The kernel creates what it needs
when it needs it.
Add a controller anywhere under the project; the scan finds it, no registration:
Walk-through with a path variable, a query parameter and the JSON it returns: Quick start.
What the application contains โ #[Enable*]
The attributes on the application class are the manifest. Each adds a component; declare none and boot fails rather than starting an application that does nothing.
| Attribute | Effect | Docs |
|---|---|---|
#[EnableWeb] |
the Swoole HTTP server | Routing |
#[EnableScheduler] |
runs #[Scheduled] methods on their triggers |
Scheduler |
#[EnableProcess(Foo::class)] |
a managed worker beside the server | Processes |
#[EnableDaemon(Bar::class)] |
a supervised fleet of workers | Daemons |
#[EnableAsync] |
proxies #[Async] methods so they run off the request |
Async |
#[EnableActuator] |
/actuator โ health, pools, metrics, mappings |
Actuator |
#[Import('vendor/pkg', '/prefix')] |
mounts a package under a URL prefix | Packages |
Everything else is an ordinary class the scan finds โ there are no configuration hooks to override:
Full list and the rules: Components.
Documentation map
The whole reference lives at winterframe.net. The tree below mirrors the site's own navigation.
1. Introduction โ what this is, and whether it fits you
2. Getting started โ from an empty directory to a served request
3. Web basics โ everything between the request and the response
- Routing
- Web-layer configuration
- Controllers
- Middleware
- Requests and parameter binding
- Validation
- Responses
- Cookies
- Views
- Error handling
4. Background components โ work that outlives a request
5. Database (PPA) โ needs flytachi/winter-ppa
6. Redis โ needs flytachi/winter-redis
7. CLI โ the call command and everything under it
- Overview
- make โ generate a component
- cfg โ
.env, keys, Docker, completion - run โ serve the application
- db โ ping, migrate, SQL preview, pools
- mapping โ the route table
- storage โ service directories
- script โ your own commands
- di โ scanner cache and
#[Async]proxies - process โ start, stop, status
- daemon โ fleets of workers
- schedule โ the scheduler
8. Advanced โ the parts you reach for later
- Logging
- Localization
- Asynchronous calls
- Actuator / Health
- File storage
- Packages
- Runtimes (FPM and Swoole)
License
MIT โ see LICENSE.
All versions of winter-kernel with dependencies
flytachi/winter-di Version ^2.0
flytachi/winter-base Version ^3.0
flytachi/winter-logger Version ^1.0
flytachi/winter-thread Version ^3.0
flytachi/winter-cdo Version ^4.0
flytachi/file-store Version ^2.0
vlucas/phpdotenv Version ^5.6
ext-pcntl Version *
ext-posix Version *
ext-fileinfo Version *