As far as I can tell this is only triggered from a single test.

CommentFileSizeAuthor
#2 3117863.patch2.25 KBlongwave

Comments

longwave created an issue. See original summary.

longwave’s picture

Status: Active » Needs review
StatusFileSize
new2.25 KB
kristen pol’s picture

Assigned: Unassigned » kristen pol
kristen pol’s picture

Sorry for the delay. I'm going to try to do this one now.

kristen pol’s picture

Assigned: kristen pol » Unassigned
Status: Needs review » Reviewed & tested by the community

Thanks for the patch.

1) Reviewed the 9.0 dev codebase for the use of:

    ...
    'Length' => ['min'...
    ...

for Constraints. The only ones with 'Length' set are:

  • core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php
  • core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EmailItem.php
  • core/lib/Drupal/Core/Field/Plugin/Field/FieldType/StringItem.php
  • core/modules/options/src/Plugin/Field/FieldType/ListStringItem.php
  • core/modules/telephone/src/Plugin/Field/FieldType/TelephoneItem.php
  • core/modules/text/src/Plugin/Field/FieldType/TextItem.php
  • core/lib/Drupal/Core/Field/Plugin/Field/FieldType/LanguageItem.php

but only TypedDataTest.php has min set. The rest are using max.

Looked for allowEmptyString in the code and it was only in DeprecationListenerTrait.php.

2) Since this is for Symfony 5 and the deprecation message states:

"In 5.0, it will become optional and default to false."

then adding:

'allowEmptyString' => FALSE

shouldn't be needed though it is good to have there since it helps document what's needed if it should be set to TRUE.

3) Patch applies cleanly:

[mac:kristen:drupal-9.0.x-dev]$ patch -p1 < 3117863.patch 
patching file core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php
patching file core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php
Hunk #1 succeeded at 162 (offset -9 lines).

4) Not sure there is anything that can be manually tested so marking RTBC.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 2: 3117863.patch, failed testing. View results

longwave’s picture

Status: Needs work » Reviewed & tested by the community

Random fail, back to RTBC

  • catch committed c609c06 on 9.1.x
    Issue #3117863 by longwave, Kristen Pol: [Symfony 5] Using the "Symfony\...

  • catch committed 1501294 on 9.0.x
    Issue #3117863 by longwave, Kristen Pol: [Symfony 5] Using the "Symfony\...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed c609c06 and pushed to 9.1.x, cherry-picked to 9.0.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.