Symfony 8.1 introduces a range of smaller improvements: a Uuid47Transformer class to mask UUIDv7 timestamps behind UUIDv4-looking identifiers at API boundaries using SipHash-2-4; a new ENABLE_TYPE_CONVERSION serializer context option for automatic scalar type casting during denormalization; a configurable default_action for the HTML sanitizer (drop, block, or allow); a FRANKENPHP_RESET_KERNEL env var to clone the kernel between FrankenPHP worker requests for full per-request isolation; null-safe array access syntax (?.[...]) in ExpressionLanguage; outline-style console block methods for better terminal accessibility; a trailingSlashOnRoot argument for PHP DSL route prefixes; a getParentRoleNames() method for reverse role hierarchy lookups; a twig.safe_class resource tag to mark value objects as pre-escaped; and a new ContainerAwareInterface contract in symfony/service-contracts.

6m read timeFrom symfony.com
Post cover image
Table of contents
Convert Between UUIDv7 and UUIDv4Convert Scalar Types During DenormalizationConfigurable Default Action in HTML SanitizerReset the Kernel Between FrankenPHP RequestsNull-Safe Array Access in ExpressionsOutline-Style Console BlocksDisable Trailing Slash on Prefixed Root RoutesGet Parent Role NamesMark Classes as Safe for Twig's EscaperNew ContainerAwareInterface Contract
1.8K Impressions