Issue Task Resolved

#110325Adapt ClassSchema tests to symfony/property-info 7.4.15

Stefan Bürk 07/30/26, 04:33 updated 07/30/26, 09:00

Description

The nightly builds of main, 14.3 and 13.4 fail in the “unit … max” jobs since 2026-07-30. Four Extbase tests fail on every branch and every PHP version:

bc. TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\Property\PropertyWithTypeDeclarationsTest::listWithSquareBracketsSyntaxProperty
TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\Property\PropertyWithTypeDeclarationsTest::listWithArraySyntaxWithoutKeyValueTypeProperty
TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\Property\PropertyWithoutTypeDeclarationsTest::listWithSquareBracketsSyntaxProperty
TYPO3\CMS\Extbase\Tests\Unit\Reflection\ClassSchema\Property\PropertyWithoutTypeDeclarationsTest::listWithArraySyntaxWithoutKeyValueTypeProperty

On main and 14.3 the message is “Failed asserting that actual size 2 matches expected size 1”, on 13.4 it is “Failed asserting that actual size 0 matches expected size 1”. In all cases the failing assertion is the collection key type count for the fixture properties annotated with the square bracket suffix notation and with the value-only generic array notation. The fixture property that declares an explicit integer key type is not affected.

Cause

symfony/property-info v7.4.15, released 2026-07-28, contains the upstream bugfix symfony/symfony#64794 (7.4 follow-up of #64739, fixing #64738), commit 793a1698ac62 “[PropertyInfo] Prevent PhpDocTypeHelper to wrongly assume keys type”.

Until then, the square bracket suffix notation and the value-only generic array notation were resolved as a list, implying integer and sequential keys. PHPDoc does not promise that – only the explicit list notation does. In Util/PhpDocTypeHelper.php the modern TypeInfo path now builds an array type instead of a list type, and the legacy path passes null instead of an integer collection key type.

This produces two different symptoms because the branches use different extractor APIs:

Branch ClassSchema API Resolved collection key type getCollectionKeyTypes()
main, 14.3 PropertyInfoExtractor::getType(), Symfony TypeInfo int or string int, string – 2 entries
13.4 PropertyInfoExtractor::getTypes(), legacy PropertyInfo Type null empty – 0 entries

The new Symfony behaviour is correct: the square bracket annotation really can carry string keys. The Core tests were asserting the previous, wrong behaviour.

Impact

None at runtime. TypeAdapter::getCollectionKeyTypes() has no production consumer on any of the three branches – it is referenced only from these tests. isCollection() still returns true and getCollectionValueTypes() is unchanged, so ColumnMapFactory, DataMapper, PersistentObjectConverter, ValidatorResolver and FileHandlingService keep working as before. This is a test-expectation fix.

Steps to reproduce

bc. Build/Scripts/runTests.sh -s composerInstallMax
Build/Scripts/runTests.sh -s unit typo3/sysext/extbase/Tests/Unit/Reflection/

Proposed solution

Adapt the four assertions per branch and raise the minimum required version of symfony/property-info to 7.4.15 in the root manifest and in the extbase manifest, the only two places declaring the component. Pre-merge installs from the lock, so a changed expectation without the raise would break pre-merge instead.

For main and 14.3 the expectation becomes two collection key types, integer followed by string. For 13.4 it becomes an empty collection key type list.

Backport differences

  • 14.3 declares the same constraint as main and uses the same Symfony TypeInfo based ClassSchema, so the change applies unmodified.
  • 13.4 declares a less specific constraint, so the raise replaces a different string, and the legacy PropertyInfo Type API there drops the collection key type entirely instead of widening it.

No branch allows a 6.x line of the component, all three are on Symfony 7.4.

Verification

Verified locally on main with max dependencies: pinning symfony/property-info back to v7.4.8 while leaving everything else at max, including symfony/type-info v8.1.0, makes the suite pass again, which isolates this package as the only trigger. With the constraint raised and the assertions adapted, the Extbase unit suite is green.

CI confirms the same window: nightly 105553 (2026-07-29) was green with property-info v7.4.8, nightly 105633 (2026-07-30) fails with v7.4.15, on the same Core commit.

Failing pipelines

Reviews 4

History 36

  1. Stefan Bürk commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-07-30T09:00:10+00:00" > 07/30/26, 09:00 </span>

    Applied in changeset commit:c4f59b33f12cde5a65e47db4989e621533c1b876.