Skip to content

Introduction to Winter: PHP Microservices Ecosystem

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.

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

Package What it gives you When to reach for it
suvera/winter-boot The framework core: DI, AOP, REST, PDBC, transactions, migrations, async, scheduling, actuator, telemetry Always
suvera/winter-doctrine Doctrine ORM and DBAL plus multi-tenant datasources You need ORM entities or Doctrine DBAL
suvera/winter-modules Integration modules for Kafka, SQS, S3, OpenSearch, Redis, Memcache, and DTCE You integrate with those systems
suvera/winter-eureka Service discovery via Consul or Netflix Eureka You run multiple service instances behind discovery
suvera/winter-memdb Embedded in-memory servers (Redis, Ignite, Memcached, Hazelcast) launched by the app (experimental) You want the app to manage the cache/database server

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 the built-in server, 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
<?php
require_once __DIR__ . '/vendor/autoload.php';
use dev\winterframework\stereotype\WinterBootApplication;
use dev\winterframework\core\app\WinterWebSwooleApplication;
#[WinterBootApplication(
configDirectory: [__DIR__ . '/config'],
scanNamespaces: [['com\\example\\myapp', __DIR__ . '/src']]
)]
class MyApplication
{
public static function main(): void
{
(new WinterWebSwooleApplication())->run(MyApplication::class);
}
}
MyApplication::main();
Requirement Version / Notes
PHP 8.5 or later
winter_boot extension Always required (bundled with the framework)
swoole extension Required for the HTTP server, #[Async], #[Scheduled], and several libraries
Composer 2.x

The Installation guide covers both the Docker path (recommended) and a manual install.

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.

Spring Boot (Java) Winter Boot (PHP)
@SpringBootApplication #[WinterBootApplication]
@Service #[Service]
@Component #[Component]
@RestController #[RestController]
@Autowired #[Autowired]
@Value #[Value]
@Configuration #[Configuration]
@Bean #[Bean]
@Transactional #[Transactional]
@Cacheable #[Cacheable]
@Async #[Async]
@Scheduled #[Scheduled]

The application context lifecycle, property externalization via application.yml, and the concept of a single annotated entry-point class all follow the same patterns as Spring Boot.

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
<?php
use dev\winterframework\stereotype\Service;
use dev\winterframework\stereotype\Autowired;
#[Service]
class UserServiceImpl implements UserService
{
#[Autowired]
private UserRepository $repository;
public function findById(int $id): User
{
return $this->repository->findById($id);
}
}

Cross-cutting concerns such as caching, transactions, locking, and your own custom checks are expressed as attributes applied to methods and classes. The framework weaves them in at startup, so there is no proxy code to write.

Winter Boot is optimized for the microservice deployment model: stateless HTTP workers managed by the built-in server, 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.