Skip to main content
Welcome to the Winter Boot documentation. Winter Boot is a modern PHP 8 microservices framework inspired by Spring Boot, bringing attribute-driven dependency injection, AOP, REST routing, async task execution, caching, transactions, and scheduling to the PHP ecosystem. Whether you are migrating from a Spring Boot project or starting fresh, this documentation covers everything you need to build, configure, and deploy production-ready PHP microservices.

Quick Start

Install Winter Boot, create your first service and REST controller, and have a running Swoole HTTP server in minutes.

Core Concepts

Understand the application context, bean lifecycle, dependency injection, and AOP weaving that power every Winter Boot service.

Web & REST

Map HTTP routes with #[RestController], handle path variables and request bodies, and return typed ResponseEntity objects.

Data Access

Connect datasources, run schema migrations, and manage transactions declaratively with #[Transactional].

Async & Scheduling

Offload work with #[Async] coroutines and schedule recurring jobs with cron-style #[Scheduled] tasks.

Operations

Add caching, distributed locking, structured logging, Prometheus metrics, and OpenTelemetry tracing to your services.

Get Up and Running in Four Steps

Follow these steps to go from a blank directory to a live HTTP service.
1

Install Winter Boot via Composer

Create a new project directory, initialise Composer, and require the core framework package. Install the Swoole extension for the built-in async HTTP server.
2

Configure application.yml

Create a config/ directory and add application.yml. At minimum, set the server port and give your service a name.
config/application.yml
3

Write Your First Service and Controller

Annotate a plain PHP class with #[Service] to register it as a managed bean, then expose it over HTTP with a #[RestController].
src/HelloService.php
src/HelloController.php
4

Run the Application

Create the entry-point class with #[WinterBootApplication], then start the server. Swoole forks worker processes and begins accepting connections on your configured port.
Application.php
Test your endpoint: