Issue Feature Resolved

#111134Allow #[IgnoreValidation] on properties and deprecate #[Transient] for skipping validation

Alexander Schnitzler 10/18/26, 17:45 updated 10/20/26, 06:50

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_PARAMETER only) and store it as a property
    characteristic in the ClassSchema.
  • ValidatorResolver skips 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

History 57

  1. Anonymous commented and changed status Under Review Resolved done 0 % 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.