#111134Allow #[IgnoreValidation] on properties and deprecate #[Transient] for skipping validation
Description
Problem
Since #91727 (commit fc9c34fa12b), ValidatorResolver skips the auto-generated
validator for model-typed properties when the property is marked
@#[Transient]@. This couples validation to a persistence concept:
@#[Transient]@ states that a property is not persisted, not that it must not
be validated.
The coupling is a leftover of TYPO3 v8, where the ReflectionService excluded
@transient@ properties from the class schema entirely. Since v9 they are part
of the class schema, and #91727 restored the old behaviour for validation only.
Proposal
- Allow
#[IgnoreValidation]on properties (currently
\Attribute::TARGET_PARAMETERonly) and store it as a property
characteristic in theClassSchema. ValidatorResolverskips every validator for such a property: the
auto-generated one for model-typed properties as well as explicit
#[Validate]attributes, matching the meaning on action parameters.- Skipping validation because of
#[Transient]keeps working in v15 but
triggers a deprecation when it takes effect (model-typed property with
#[Transient]and without#[IgnoreValidation]). It is removed in v16.
Dual-version compatibility
Extensions supporting v14 and v15 can put both attributes on the property.
v14 ignores #[IgnoreValidation] on properties, since ClassSchema does not
instantiate unknown property attributes and PHP checks attribute targets only
on instantiation.
Migration
Add #[IgnoreValidation] to properties that rely on #[Transient] to skip
validation. This can be automated with a Rector rule: add
@#[IgnoreValidation]@ to every property with #[Transient] and a non-simple
type.
Reviews 1
Related issues 4
History 57
-
Garvin Hicking changed Related to #91727 <span data-processor="relativetime" data-value="2026-10-18T17:50:35+00:00" > 10/18/26, 17:50 </span>
-
Garvin Hicking changed Related to #70020 <span data-processor="relativetime" data-value="2026-10-18T17:55:15+00:00" > 10/18/26, 17:55 </span>
-
Garvin Hicking changed Related to #86905 <span data-processor="relativetime" data-value="2026-10-18T17:55:30+00:00" > 10/18/26, 17:55 </span>
-
Garvin Hicking changed Related to #91726 <span data-processor="relativetime" data-value="2026-10-18T17:55:39+00:00" > 10/18/26, 17:55 </span>
-
Gerrit Code Review pushed patch set 1 for main to change 96841 status
NewUnder Review <span data-processor="relativetime" data-value="2026-10-18T18:04:13+00:00" > 10/18/26, 18:04 </span> -
Gerrit Code Review pushed patch set 2 for main to change 96841 <span data-processor="relativetime" data-value="2026-10-18T18:14:09+00:00" > 10/18/26, 18:14 </span>
-
Anonymous commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-10-20T06:50:12+00:00" > 10/20/26, 06:50 </span>
Applied in changeset commit:36af0421393081fa4c79650c294cef02650fc710.