What is New in Symfony 8
Symfony 8 was officially released in November 2025 after two years of development, with contributions from more than 615 developers and over 7,300 commits. It requires PHP 8.2 or higher and focuses on developer productivity, cleaner code, better performance, and smoother upgrades from previous versions.
Key Highlights and New Features
Multi-Step Forms
Create complex forms with guided steps, per-step validation, and conditional branching while reusing the familiar Symfony Form component.
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
$builder->addStep('personal', UserPersonalType::class);
$builder->addStep('professional', UserProfessionalType::class);
$builder->addStep('account', UserAccountType::class);
$builder->add('navigation', NavigationType::class);
New PHP Configuration Format
Symfony 8 drops XML/YAML configuration for most built-in bundles in favor of pure PHP arrays, making configuration type-safe and easier to read.
use Symfony\Config\FrameworkConfig;
return static function (FrameworkConfig $framework) {
$framework->secret('my-secret');
$framework->session()
->handlerId(null)
->cookieSamesite('lax');
};
Invokable Console Commands & Input Attributes
Write console commands as simple invokable classes and use PHP attributes for arguments and options - less boilerplate, cleaner code.
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Input\InputArgument;
#[AsCommand(name: 'app:create-user')]
class CreateUserCommand
{
public function __invoke(
#[InputArgument] string $email,
#[InputOption] bool $activate = false,
): void {
// ...
}
}
Twig Extension Attributes
Define Twig filters and functions directly with PHP attributes - no need to extend abstract classes anymore.
use Twig\Attribute\TwigFilter;
class AppExtension
{
#[TwigFilter('product_number')]
public function formatProductNumber(string $number): string
{
// ...
}
}
Improvements and Modernizations
| Area | What Changed |
|---|---|
| Code Size | Removed 7.7 million deprecations and trimmed 13,200 lines of code while keeping the codebase clean and modern. |
| Validation Constraints | Added new constraints: MAC address, ISBN, ISSN, phone numbers, BIC, and more built-in rules. |
| Asset Handling | Improved asset compression with Brotli and Gzip at build time, reducing runtime work. |
| Exception Messages | More helpful and contextual exception messages with copy-paste-ready code snippets. |
| Security Information | Security voters now clearly explain why access was denied. |
| CSRF Protection | Stateless CSRF support for HTTP clients, perfect for API and SPA applications. |
| Routing | Better route defaults, improved priority system, and cleaner controller argument resolution. |
| Single-File Applications | Full support for building entire Symfony apps in one PHP file. |
| Signed HTTP Messages | Cryptographically signed requests/responses for extra security. |
Backward Compatibility Smooth Upgrade
Symfony 8 is built on the same stable foundation as Symfony 7.4, passes all popular PHP project tests, and has been downloaded billions of times. The Symfony team provides detailed upgrade guides and automated tools to help projects move from older major versions to Symfony 8 with minimal effort.