Zum Inhalt springen

Symfony Release Notes

Einträge
74
Quellen
1
Zuletzt aktualisiert

Folge Symfony, um die Release Notes in deinen Feed zu holen.

Symfony

Symfony 8.2: neue Features und SymfonyCon Warsaw 2026

In dieser Woche wurden neue Artikel zu Symfony 8.2-Features veröffentlicht, unter anderem zu gezieltem Cache-Control, relativer Reihenfolge für Listener und Services, dem kompilierten Event-Dispatcher, neuen Validierungs-Constraints und einmaligen signierten URLs, während die Entwicklung mit Workflows per PHP-Attributen, einem Lock-Attribut und dem RecorderHttpClient fortgesetzt wurde.

This week, we published new articles about upcoming Symfony 8.2 features, including targeted Cache-Control, relative ordering for listeners and services, the compiled event dispatcher, the three new validation constraints, and single-use signed URLs. Meanwhile, Symfony 8.2 development continued at a rapid pace, introducing features such as workflows defined with PHP attributes, a new Lock attribute to reject or delay concurrent requests, and a RecorderHttpClient to record and replay HTTP exchanges. Finally, we unveiled more talks for SymfonyCon Warsaw 2026.

Symfony development highlights …

Originalquelle(öffnet in neuem Tab)Problem melden

Symfony

Symfony 8.2: Einmalige und sicherere signierte URLs

Symfony 8.2 fügt einen Versionsparameter für signierte URLs hinzu, sodass diese nur gültig bleiben, solange der Wert unverändert ist, und einmalige Links wie Passwort-Reset-Links unterstützt werden.

Signed URLs let you share links that can't be tampered with, such as password reset links, email confirmation links or download links. Symfony provides the UriSigner utility to create and check them, and login links to log in users without a password. Symfony 8.2 makes both more secure and flexible.

Single-Use Signed URLs

Kevin Bond

Contributed by Kevin Bond in #64408

A signed URL stays valid until it expires, no matter how many times it's used. This is a problem for links like password resets, which should stop working once they do their job. Until now, you had to implement your own invalidation logic for these links (e.g. storing some token in the database).

In Symfony 8.2, the sign(), check(), checkRequest() and verify() methods of UriSigner accept a new $version argument. Its value is added to the signature (but not to the URL), so the URL is valid only while that value stays the same. Use a value that changes once the link is used, like the hash of the user password:

use Symfony\Component\HttpFoundation\UriSigner;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface; …

Originalquelle(öffnet in neuem Tab)Problem melden

Symfony

SymfonyCon Warschau 2026: API für KI-Agenten

Auf der SymfonyCon Warschau 2026 hält Antoine Bluchet einen Vortrag darüber, wie APIs für KI-Agenten bereitgestellt werden können.

Nl Blog Banner

Ready to take your PHP and Symfony skills to the next level? SymfonyCon Warsaw 2026 lands in Poland on November 26-27! Gather with developers worldwide for two high-impact days offering 3 parallel tracks and exciting community events. Mark your calendar and lock in your tickets now!


🎤 Speaker announcement

We are thrilled to announce Antoine Bluchet, Lead developper, Les-Tilleuls.coop, for the talk "Exposing Your API to AI Agents". We’re excited to bring this expertise to the stage!

"Picture this: you connect an AI agent to your API and, all at once, dozens of "tools" pile into its context before it's done a thing. There has to be a better way, and there are a few, each with its own trade-offs. …

Originalquelle(öffnet in neuem Tab)Problem melden

Symfony

Neu in Symfony 8.2: EntityExists-, Cron- und Audio-Constraints

Symfony 8.2 fügt dem Validator drei neue Constraints hinzu: EntityExists, Cron und Audio.

The Symfony Validator component provides over 80 built-in constraints to validate all kinds of data. Symfony 8.2 adds three new constraints for some common needs that previously required custom validation code.

EntityExists Constraint

Evgen Yurchenko

Contributed by Evgen Yurchenko in #63483

When your application receives entity identifiers in DTOs (e.g. from an API request or a form), you usually have to repeat the same logic: look up the entity, check if it exists and throw an error otherwise. The new EntityExists constraint handles this check and reports a missing entity as a validation violation on the property:

use App\Entity\Product;
use App\Entity\User;
use Symfony\Bridge\Doctrine\Validator\Constraints\EntityExists;
use Symfony\Component\Validator\Constraints as Assert;

final class AssignOrderCommand
{
    #[Assert\NotBlank]
    #[EntityExists(entityClass: User::class)]
    public string $userId;

    // look up the value by some field other than the entity identifier
    #[EntityExists(entityClass: Product::class, identifierField: 'sku')]
    public ?string $productSku = null;
}
``` …

Originalquelle(öffnet in neuem Tab)Problem melden

Symfony

Symfony 8.2: Compiled Event Dispatcher

In Symfony 8.2 ist der Service event_dispatcher ein CompiledEventDispatcher, der Listener vorab beim Kompilieren des Containers erfasst und per Service Locator bei Bedarf lädt, statt sie bei jedem Request zur Laufzeit zu registrieren.

Nicolas Grekas

Contributed by Nicolas Grekas in #66122 , #66129 , #66131 and #66133

Symfony 8.2 includes lots of performance improvements, but we keep looking for new opportunities to make your applications faster.

For example, Symfony creates the event dispatcher at runtime for every request by calling addListener() for each listener and wrapping it in a closure, even for events that the request never dispatches. But Symfony already knows your application's event listeners when it compiles the container, so this work can be done ahead of time.

Compiled Event Dispatcher

In Symfony 8.2, the event_dispatcher service is a CompiledEventDispatcher. It receives an array of listener service IDs and methods, in the order they run, and a service locator to load them when needed. PHP's OPcache stores the array in shared memory, so each request doesn't need its own copy. …

Originalquelle(öffnet in neuem Tab)Problem melden

Symfony

SymfonyCon Warschau 2026: Vortrag über Kaltstart-Optimierung

Bei der SymfonyCon Warschau 2026 am 26.–27. November spricht Rémi Janot über die Reduzierung der Kaltstartzeit einer Symfony-Anwendung von 14 auf 1,8 Sekunden.

Nl Blog BannerThe ultimate gathering for PHP enthusiasts is heading to Poland! On November 26-27, SymfonyCon Warsaw 2026 delivers two full days of technical insights, 3 parallel tracks, and rich networking opportunities. Reserve your seat with the global community!


🎤 Speaker announcement

We are thrilled to announce Rémi Janot, CTO, Vasco, for the talk "From 14s to 1.8s: A Symfony Cold Start Autopsy". We’re excited to bring this expertise to the stage!

"On Cloud Run, our backend answered its first request in 14 seconds. Almost all of that time went to one place nobody on the team would have guessed, and the profiler alone never found it.

This is the full hunt: the tooling that finally showed us the truth, the framework internals we had to read to understand what we were seeing, and the obvious optimizations that quietly made cold starts worse before anything got better. Image size, autoloading, the compiled container, cache warmup, and the way they interact.

We finished at 1.8 seconds. You'll leave with a method for diagnosing your own cold starts, not a list of tricks to copy." …

Originalquelle(öffnet in neuem Tab)Problem melden

Symfony

Symfony 8.2: Relative Reihenfolge für Listener und Dienste

In Symfony 8.2 können Event-Listener und getaggte Dienste über die Optionen before und after relativ zueinander angeordnet werden, statt Prioritäten fest zu vergeben.

Nicolas Grekas

Contributed by Nicolas Grekas in #66012 , #66022 , #66240 , #66236 , #66713 , #66714 , #66715 and #66718

If you've ever needed to run an event listener before one provided by Symfony or a third-party bundle, you had to find its priority, pick a slightly higher number and hope that priority doesn't change in a future update.

In Symfony 8.2, you can solve this in a better way: the new before and after options let you name the event listeners or tagged services that yours should run before or after.

Ordering Event Listeners …

Originalquelle(öffnet in neuem Tab)Problem melden

Symfony

SymfonyCon Warsaw 2026: Talk zu Doctrine Mapping

Für die SymfonyCon Warsaw 2026 wurde der Talk "final class Entity: Doctrine Mapping for Modern PHP" von Alexander M. Turek angekündigt.

Nl Blog BannerConnect with the global developer ecosystem at SymfonyCon Warsaw 2026, taking place November 26-27 in Poland. Dive into two days of intense learning across 3 parallel tracks alongside vibrant community side-events. Secure your spot today!


🎤 Speaker announcement

Please welcome Alexander M. Turek, CTO, SensioLabs Deutschland. Join us to catch the talk "final class Entity: Doctrine Mapping for Modern PHP".

"For fifteen years, Doctrine shaped the way we write entities, and not always for the better. Entities could not be final, because proxies had to extend them. Every field grew a getter and a setter. Domain concepts like money, addresses and identifiers ended up as strings and floats, because mapping anything richer was more trouble than it was worth.

None of that was a design decision. Those were workarounds for things PHP could not express yet.

It can now. Attributes, backed enums, property hooks, asymmetric visibility, native lazy objects, and an arbitrary-precision number object in core. Doctrine ORM 3.4 and DBAL 4.3 pick all of it up, and ORM 4 will be built on it. …

Originalquelle(öffnet in neuem Tab)Problem melden

Symfony

Symfony 8.2: Targeted Cache-Control- und Cache-Status-Header

Symfony 8.2 unterstützt Targeted Cache-Control-Header nach RFC 9213 über die neue Methode cacheControl() auf Response sowie einen Cache-Status-Header, sodass sich für CDN und Browser unterschiedliche Cache-Regeln setzen lassen.

An HTTP response can pass through several caches before it reaches the user, and you may want different rules for each one. Symfony 8.2 adds support for two HTTP headers: one to set those rules, and another to see what happened to a request.

Targeted Cache-Control Headers

Nicolas Grekas

Contributed by Nicolas Grekas in #65282

You might want your CDN to cache a page for an hour, while keeping a much shorter cache lifetime in the browser. That's because you can purge the CDN cache when the content changes, but you can't purge the copies stored in your visitors' browsers. Targeted cache-control headers, defined in RFC 9213, let you give each cache its own rules.

For example, a CDN that supports CDN-Cache-Control uses it instead of Cache-Control. Browsers continue to use Cache-Control. In Symfony 8.2, call the new cacheControl() method on a Response with the target name (CDN, not CDN-Cache-Control):

// browsers consider the response stale immediately...
$response->setMaxAge(0)->setPrivate();

// ...but the CDN can cache it for one hour
$response->cacheControl('CDN')
    ->setMaxAge(3600) …

Originalquelle(öffnet in neuem Tab)Problem melden

Symfony

A Week of Symfony #1031 (28. September – 4. Oktober 2026)

Der Wochenrückblick nennt die Releases Symfony 6.4.47, 7.4.20, 8.1.8 und Symfony Reprise 1.3.0 sowie neue Symfony-8.2-Funktionen und weitere SymfonyCon-Warsaw-Talks.

This week, Symfony 6.4.47, 7.4.20, and 8.1.8 were released, along with Symfony Reprise 1.3.0. Meanwhile, we continued introducing Symfony 8.2 features, including OpenID Connect login, PGP/MIME signed and encrypted emails, sudo mode, more flexible serialization groups, and performance improvements. Finally, we announced more talks for SymfonyCon Warsaw 2026.

Symfony development highlights …

Originalquelle(öffnet in neuem Tab)Problem melden

Symfony

Symfony 8.2: Performance-Verbesserungen

Symfony 8.2 bringt zahlreiche Performance-Verbesserungen, etwa schnelleres Serializer-Normalisieren (Listenrouten 14 % bis 24 % schneller), 40 % weniger PHP-Instruktionen bei PropertyAccess und einen schnelleren snake_case-Name-Converter.

At Symfony, we're obsessed with performance, and Symfony 8.2 has plenty of examples. Over the last few weeks, Nicolas Grekas profiled the Symfony Demo application and a custom API project, turning every finding into a pull request.

The result is faster web pages, APIs, console commands and cache builds, in production and development.

Faster APIs

APIs that serialize and deserialize lots of objects see some of the biggest gains. When normalizing objects, the Serializer computes each attribute's context once, avoids copying the normalized array for each attribute and fetches the discriminator mapping once per object instead of once per attribute. On an API application that returns lists of 150 to 900 objects with serialization groups and a name converter, list routes are 14% to 24% faster (PR #66383).

Reading a property with PropertyAccess now takes 40% fewer PHP instructions, so those list routes run another 6% to 8% fewer instructions (PR #66397). The snake_case name converter also memoizes its results instead of running a regular expression for every attribute of every object, which makes list routes 2% to 5% faster (PR #66384). …

Originalquelle(öffnet in neuem Tab)Problem melden

Symfony

Symfony 8.2: Flexiblere Serialization Groups

In Symfony 8.2 sind #[SerializedName] und #[SerializedPath] wiederholbar und akzeptieren ein groups-Argument, außerdem lassen sich Named Serializers in Controllern und Messenger verwenden.

Serialization groups let you choose which properties to include when serializing an object. You might use one group for public API responses and another for admin exports. Symfony 8.2 adds new ways to configure these groups, and lets controllers and Messenger use named serializers.

Serialized Names and Paths per Group

Sergey Danilchenko

Contributed by Sergey Danilchenko in #58236

Until now, the #[SerializedName] and #[SerializedPath] attributes defined a single name or path for a property, regardless of the serialization group. Using different keys for the same property required a workaround, such as creating separate DTOs.

In Symfony 8.2, both attributes are repeatable and accept a groups argument. For example, if version 2 of your API renames a field, version 1 can keep the old name:

use Symfony\Component\Serializer\Attribute\Groups;
use Symfony\Component\Serializer\Attribute\SerializedName;

class Product
{
    #[Groups(['api_v1', 'api_v2'])]
    #[SerializedName('product_name', groups: 'api_v1')]
    public string $name;
}

$serializer->serialize($product, 'json', ['groups' => ['api_v1']]); …

Originalquelle(öffnet in neuem Tab)Problem melden

Symfony

SymfonyCon Warsaw 2026: Talk "The PHP Runtime I Want to See"

Für die SymfonyCon Warsaw 2026 wurde der Talk "The PHP Runtime I Want to See" von Nicolas Grekas angekündigt.

Nl Blog BannerReady to take your PHP and Symfony skills to the next level? SymfonyCon Warsaw 2026 lands in Poland on November 26-27! Gather with developers worldwide for two high-impact days offering 3 parallel tracks and exciting community events. Mark your calendar and lock in your tickets now!


🎤 Speaker announcement

Envisioning the next evolution of PHP performance: Nicolas Grekas, Symfony Core Team Member, joins the lineup to deliver "The PHP Runtime I Want to See". Expect an insightful session!

"For twenty years PHP has worked the same way: one request, one process, and then everything is forgotten. That model is why PHP is simple, robust and easy to deploy. It is not the problem.

The problem is what it cannot do. Nothing can wait, watch, or remember between requests. So we built cron jobs, supervisors, TTLs and Redis keys around the runtime to make up for one missing capability. …

Originalquelle(öffnet in neuem Tab)Problem melden

Symfony

Symfony 8.2: Sudo Mode

Symfony 8.2 ergänzt die Security-Attribute IS_AUTHENTICATED_RECENTLY (Anmeldung innerhalb der letzten zwei Stunden) und IS_AUTHENTICATED_VERY_RECENTLY (innerhalb der letzten fünf Minuten) für einen nativen Sudo Mode.

In Symfony, IS_AUTHENTICATED_FULLY is the strongest check about how users logged in. However, it tells you how the session started, not when. A user who logged in with their password eight hours ago and left the laptop unlocked is still fully authenticated, so anyone can make a payment or delete their account. Services like GitHub solve this with a sudo mode which asks for your credentials again before sensitive actions. Symfony 8.2 adds this feature natively.

Requiring Recent Authentication

Nicolas Grekas

Contributed by Nicolas Grekas in #66014 and #66066

Symfony 8.2 adds two security attributes that go beyond IS_AUTHENTICATED_FULLY:

  • IS_AUTHENTICATED_RECENTLY: the user entered their credentials within the last two hours;
  • IS_AUTHENTICATED_VERY_RECENTLY: the user entered their credentials within the last five minutes.

For example, you could require a recent login to change an email address, and a very recent one to delete an account:

// src/Controller/AccountController.php …

Originalquelle(öffnet in neuem Tab)Problem melden