Skip to main content
Winter is a PHP 8 microservices ecosystem built around Winter Boot, a Spring Boot-inspired framework for attribute-driven services, and a small family of optional libraries that plug into it for databases, caching, messaging, storage, search, and service discovery. This page introduces the pieces so you can pick what you need before diving into the framework or a specific library.

The ecosystem at a glance

Winter is deliberately modular. You install the framework, then add only the libraries that match your infrastructure.

See the Libraries tab

Full catalog of official libraries, with per-need guidance and links to each integration’s dedicated page.

What is Winter Boot?

Winter Boot turns a plain PHP class into a fully managed application context with a single attribute. The framework scans your namespaces at startup, registers beans, wires dependencies, maps HTTP routes via Swoole, and exposes every cross-cutting concern through attributes rather than boilerplate configuration files. The result is lean, readable service code that focuses on business logic instead of framework plumbing.
Application.php
Winter Boot requires PHP 8.4 or later; the official libraries pin to PHP 8.5. The Swoole extension (pecl install swoole) is required for the built-in HTTP server (WinterWebSwooleApplication), the async and scheduled tasks (#[Async], #[Scheduled]), and several libraries (Memdb, Eureka, Kafka, DTCE). Non-Swoole framework features work without it.

Key features

Explore what Winter Boot can do for your microservices project.

Quickstart

Install the package, write your first service and REST controller, and have a running HTTP server in minutes.

Dependency Injection

Attribute-driven DI with #[Service], #[Component], #[Autowired], #[Qualifier], and #[Bean] factories.

REST Controllers

Map HTTP routes with #[RestController], #[RequestMapping], #[GetMapping], #[PostMapping], and more.

AOP & Custom Stereotypes

Implement cross-cutting concerns with custom attributes and aspect-oriented interceptors.

Databases & Transactions

Manage datasources, run SQL migrations, and control transactions declaratively with #[Transactional].

Caching

Add response and method-level caching with a single attribute, backed by any cache provider.

Async & Scheduling

Run background work with #[Async] and cron-style scheduling with #[Scheduled].

Module System

Extend the framework with community libraries or build your own by implementing WinterModule.

Requirements

Before you install Winter Boot, make sure your environment meets these prerequisites. Install the Swoole extension via PECL:
Confirm both PHP and Swoole are available:

Spring Boot inspiration

If you have built services with Spring Boot, Winter Boot will feel immediately familiar. Stereotype attributes map directly to their Spring counterparts; only the language changes. The application context lifecycle, property externalisation via application.yml, and the concept of a single annotated entry-point class all follow the same patterns as Spring Boot.

PHP 8 attributes and dependency injection

Winter Boot’s DI container is built entirely on native PHP 8 attributes. There are no XML files, no code-generation steps, and no service locators to call manually. Declare a class with #[Service] or #[Component], mark a property with #[Autowired], and the container resolves the dependency graph automatically at startup.
src/UserServiceImpl.php

Aspect-oriented programming

Cross-cutting concerns such as caching, transactions, retries, and custom interceptors are expressed as attributes applied to methods and classes. The AOP weaving happens at container startup, with no proxy code to write and no separate aspect files to maintain.
See the AOP & Custom Stereotypes page for a full walkthrough of defining aspects, join points, and custom stereotype attributes.

Microservices focus

Winter Boot is optimised for the microservice deployment model: stateless HTTP workers managed by Swoole, an optional in-process key-value store and task queue, built-in Prometheus metrics via the Actuator, and an extensible module system for integrations with Redis, Kafka, Doctrine ORM, Amazon SQS/S3, OpenSearch, and service-discovery solutions such as Consul and Netflix Eureka. See the Libraries overview for the full catalog and guidance on choosing the right library.