Symfony 8.2 Adds Wildcard Property Paths, Safer Scheduling and Leaner Locale Data
- Javier Eguiluz
- 540 reads
Symfony 8.2 brings targeted improvements to property access, strings, IDs, testing, processes, scheduling and locale data, with a few configuration tradeoffs.

Symfony 8.2’s smaller changes focus on removing repeated application code and making framework behavior easier to configure. The practical gains range from extracting nested values without hand-written loops to retaining scheduled work across worker restarts. Several changes also clarify constraints: wildcard paths are read-only, inherited process output can’t be captured, and locale pruning makes removed data behave as unknown.

Less glue code for data access and strings
PropertyAccess can now read the same field across every item in an iterable using the [*] path element. Wildcard reads are opt-in: call enableWildcardReads() on the property accessor builder, or set framework.property_access.wildcard_reads in a Symfony application.

$accessor = PropertyAccess::createPropertyAccessorBuilder()
->enableWildcardReads()
->getPropertyAccessor();
$accessor->getValue($people, '[*][name]');
// ['Ada', 'Grace']
$accessor->getValue($people, '[*][jobs][*][title]');
// [['programmer', 'writer'], ['computer scientist']]Each wildcard adds a level to the returned structure, and the original collection keys aren't retained. The feature works with arrays, Doctrine collections, generators and other iterable values. It only supports reads; passing a wildcard path to setValue() throws an exception. That makes it useful for extracting data, while leaving updates to explicit application logic.

The String component’s lower(), upper() and title() methods can now take a regular expression to select which parts of a string to convert. This avoids custom character-by-character code for cases such as changing only the first character or capitalizing each word. For example, u('HELLO WORLD')->lower('/^./') produces hELLO WORLD, while u('hello world')->upper('/\b./') produces Hello World.

Every match is converted, so anchor the expression with ^ when only the beginning should change. Locale-aware methods accept the same selector. That's useful for language-specific casing: the example u('ijsland')->upper('/^ij|^./') capitalizes the Dutch “ij” digraph as a unit, and localeLower('tr', '/^./') handles the Turkish dotted and dotless I rules. The pattern follows the rules used by replaceMatches().

More direct queries and tests
ULIDs and UUIDs v6 and v7 encode time in an order that follows creation time. That can let a database query select records from a time range using the identifier alone, without a separate indexed createdAt field. Symfony 8.2 adds createBoundaries() to the Ulid, UuidV6 and UuidV7 classes, returning the lowest and highest identifiers for a supplied time, or the current time if none is supplied.

[ $min ] = UuidV7::createBoundaries(
new \DateTimeImmutable('2026-11-01 00:00:00')
);
[ , $max ] = UuidV7::createBoundaries(
new \DateTimeImmutable('2026-11-30 23:59:59.999')
);Those bounds reflect each identifier’s time resolution: one millisecond for ULIDs and UUID v7, and 100 nanoseconds for UUID v6. The three classes implement the new TimeOrderedUidInterface. UUID v1 is excluded because its bytes aren't ordered by time, despite containing a date.

Finder’s exclude() method has also gained a path anchoring convention. Previously, excluding data removed directories with that name at every depth. A leading slash now limits the exclusion to a path relative to the directory supplied to in(): exclude('/data') skips only the root-level data directory, while exclude('/assets/vendor') targets that specific nested path. Patterns without the slash keep their existing behavior. The syntax mirrors .gitignore and helps avoid silently skipping unrelated directories deeper in a project tree.

DomCrawler now lets functional tests choose a form option by its visible label with selectByText(). Previously, tests had to know the underlying option value, such as an entity ID or country code. The new method accepts a single string or an array for a multiple select. Matching is case-sensitive, ignores leading and trailing whitespace, and treats repeated spaces like Crawler::text(). If there’s no match, the exception lists the available option text, which makes a failed test easier to diagnose.

Expressions, templates and YAML
Symfony’s ExpressionLanguage now includes a count() function with behavior matching PHP’s function of the same name. Expressions can check a collection directly—for example, count(order.getItems()) > 10—without registering a custom expression function or passing the count in a separate variable.

Twig gains a normalize filter that returns Serializer-normalized arrays and scalar values rather than an encoded string. This matters when a template passes data into another layer that performs its own encoding, such as a Symfony UX component: using serialize there can produce a JSON string nested inside another JSON structure. Like serialize, normalize accepts a format and context, including serialization groups.
The Yaml component adds support for the YAML core tags !!int, !!bool and !!null, alongside the existing !!str, !!float and !!binary tags. Integer, boolean, null and float tags can also take quoted values. Parsing follows the YAML 1.2 core schema strictly: invalid values such as !!bool yes or !!int 1.5 raise a ParseException. Float parsing is stricter too; invalid values that previously became 0.0 now fail.
Process and scheduler controls
The Process component’s new inheritStdio() mode connects a child process directly to the current process’s standard input, output and error streams. This behaves more like a shell command with its streams inherited than pipe-based output capture or TTY mode. It respects redirection and works without an interactive terminal, which is useful for commands run in CI or wrapped in another tool such as Docker Compose.
There’s a tradeoff: because output goes straight to the current process, getOutput() returns an empty string and callbacks aren't called. Inherited streams also can't be combined with TTY mode or an idle timeout. Teams that need to inspect output programmatically should keep using a capture mode.
Scheduler task attributes #[AsCronTask] and #[AsPeriodicTask] now accept an env option, set to one environment or an array of them. A report task can, for example, be limited to prod. In other environments, the task isn't added to the schedule, though the schedule itself remains available, so the same workers can run across environments.
Schedules created with these attributes can also be made stateful through the new schedules configuration option. Setting stateful: true for a named schedule stores its state in the cache.scheduler pool, helping preserve pending work if a worker stops mid-run. When the Lock component is enabled, the schedule is also locked so only one worker runs it at a time. Configuration can select another cache pool or lock factory, and process_only_last_missed_run controls whether downtime triggers one run or one run for each missed occurrence. These settings also apply to schedules built by a schedule provider, avoiding the need for a provider solely to configure state and locking.
Smaller deployments with locale pruning
The Intl component includes locale data for language, country and currency names, totaling around 8 MB. Applications that use only a few locales can now run the prune script with the locales they need, such as php vendor/symfony/intl/Resources/bin/prune fr de. The script keeps regional variants, required parent locales and English as the fallback. Removed locales behave as unknown, with names displayed in English.
In the documented example, pruning reduces the data from 8 MB to 300 KB; running the existing compress script takes it to 216 KB. That can trim shipped application data, but teams should include every locale their users need before pruning. Taken together, these changes are small in scope and useful at integration points: query construction, test authoring, task operations and deployment size. The main migration checks are opt-in wildcard behavior, stricter YAML parsing, and the output semantics of inherited process streams.