73709[FEATURE] Add required flag in TCA instead of `eval` option
Commit message
Review
-
Code review CR +2 Done
- Andreas Kienast +2
- Oli Bartsch +1
- Nikita Hovratov +1
-
Verified V +2 Done
- Andreas Kienast +2
- Oli Bartsch +1
- Nikita Hovratov +1
- core-ci +1 CI
Issues 1
Files 57
- typo3/sysext/backend/Classes/Form/Element/ImageManipulationElement.php2+1 −1
- typo3/sysext/backend/Configuration/SiteConfiguration/site.php+4 −2
- typo3/sysext/backend/Configuration/SiteConfiguration/site_base_variant.php+4 −2
- typo3/sysext/backend/Configuration/SiteConfiguration/site_errorhandling.php+7 −4
- typo3/sysext/backend/Configuration/SiteConfiguration/site_language.php+6 −3
- typo3/sysext/backend/Configuration/SiteConfiguration/site_route.php+4 −3
- typo3/sysext/core/Classes/DataHandling/DataHandler.php4+26 −12
- typo3/sysext/core/Classes/Migrations/TcaMigration.php11+42 −0
- typo3/sysext/core/Configuration/Resource/Driver/LocalDriverFlexForm.xml+1 −1
- typo3/sysext/core/Configuration/TCA/be_groups.php+2 −1
- typo3/sysext/core/Configuration/TCA/be_users.php2+4 −2
- typo3/sysext/core/Configuration/TCA/pages.php+4 −2
- typo3/sysext/core/Configuration/TCA/sys_category.php+2 −1
- typo3/sysext/core/Configuration/TCA/sys_file.php+1 −1
- typo3/sysext/core/Configuration/TCA/sys_filemounts.php+3 −2
- typo3/sysext/core/Configuration/TCA/sys_file_collection.php+1 −1
- typo3/sysext/core/Configuration/TCA/sys_file_storage.php+1 −1
- typo3/sysext/core/Configuration/TCA/sys_news.php+1 −1
- typo3/sysext/core/Documentation/Changelog/12.0/Deprecation-97035-RequiredOptionInEvalKeyword.rstnew+67 −0
- typo3/sysext/core/Documentation/Changelog/12.0/Feature-97035-UtilizeRequiredDirectlyInTCAFieldConfiguration.rst4new+43 −0
Show 37 more files
- typo3/sysext/core/Tests/Functional/DataHandling/Flexform/ActionTest.php+2 −1
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_datahandler/Configuration/TCA/tx_testdatahandler_element.php+1 −1
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_csv/Configuration/TCA/tx_testirrecsv_hotel.php+1 −1
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_csv/Configuration/TCA/tx_testirrecsv_offer.php+1 −1
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_csv/Configuration/TCA/tx_testirrecsv_price.php+1 −1
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_foreignfield/Configuration/TCA/tx_testirreforeignfield_hotel.php+1 −1
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_foreignfield/Configuration/TCA/tx_testirreforeignfield_offer.php+1 −1
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_foreignfield/Configuration/TCA/tx_testirreforeignfield_price.php+1 −1
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_mm/Configuration/TCA/tx_testirremm_hotel.php+1 −1
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_mm/Configuration/TCA/tx_testirremm_offer.php+1 −1
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_mm/Configuration/TCA/tx_testirremm_price.php+1 −1
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_mnattributeinline/Configuration/TCA/tx_testirremnattributeinline_hotel.php+1 −1
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_mnattributeinline/Configuration/TCA/tx_testirremnattributeinline_offer.php+1 −1
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_mnattributeinline/Configuration/TCA/tx_testirremnattributeinline_price.php+1 −1
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_mnattributesimple/Configuration/TCA/tx_testirremnattributesimple_hotel.php+1 −1
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_mnattributesimple/Configuration/TCA/tx_testirremnattributesimple_offer.php+1 −1
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_mnsymmetric/Configuration/TCA/tx_testirremnsymmetric_hotel.php+1 −1
- typo3/sysext/core/Tests/Functional/Routing/Aspect/PersistedAliasMapperTest.php+2 −1
- typo3/sysext/core/Tests/Functional/Routing/Aspect/PersistedPatternMapperTest.php+2 −1
- typo3/sysext/core/Tests/Unit/DataHandling/DataHandlerTest.php+56 −4
- typo3/sysext/core/Tests/Unit/Migrations/TcaMigrationTest.php+120 −0
- typo3/sysext/dashboard/Configuration/TCA/be_dashboards.php+2 −2
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Configuration/TCA/tx_blogexample_domain_model_blog.php+3 −2
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Configuration/TCA/tx_blogexample_domain_model_comment.php+6 −3
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Configuration/TCA/tx_blogexample_domain_model_info.php+2 −1
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Configuration/TCA/tx_blogexample_domain_model_person.php+6 −3
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Configuration/TCA/tx_blogexample_domain_model_post.php+4 −2
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Configuration/TCA/tx_blogexample_domain_model_tag.php+2 −1
- typo3/sysext/frontend/Configuration/TCA/backend_layout.php+1 −1
- typo3/sysext/frontend/Configuration/TCA/fe_groups.php+2 −1
- typo3/sysext/frontend/Configuration/TCA/fe_users.php+4 −2
- typo3/sysext/frontend/Configuration/TCA/sys_template.php+1 −1
- typo3/sysext/indexed_search/Configuration/TCA/index_config.php+1 −1
- typo3/sysext/redirects/Configuration/TCA/sys_redirect.php+5 −3
- typo3/sysext/scheduler/Configuration/TCA/tx_scheduler_task_group.php+2 −1
- typo3/sysext/workspaces/Configuration/TCA/sys_workspace.php+2 −1
- typo3/sysext/workspaces/Configuration/TCA/sys_workspace_stage.php+2 −1
Review log 3451
Show 1526 earlier messages
-
Andreas Kienast uploaded patch set 1 02/25/22, 10:36
-
core-ci voted on patch set 1 V -1 02/25/22, 10:43 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24259
-
Andreas Kienast uploaded patch set 2 02/25/22, 10:46
-
Andreas Kienast uploaded patch set 3 02/25/22, 10:47
-
core-ci voted on patch set 2 V -1 02/25/22, 10:54 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24260
-
Benni Mack commented on patch set 3 02/25/22, 10:55
-
core-ci voted on patch set 3 V -1 02/25/22, 10:55 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24261
-
Benni Mack commented on patch set 3 02/25/22, 10:55
I think the DataHandler changes could actually be backported to v11 then? -
Andreas Kienast uploaded patch set 4 02/25/22, 11:52
-
core-ci voted on patch set 4 V -1 02/25/22, 12:01 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24263
-
Andreas Kienast uploaded patch set 5 02/25/22, 12:15
-
core-ci voted on patch set 5 V +1 02/25/22, 12:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24264
-
Andreas Kienast uploaded patch set 6 02/25/22, 12:45
-
core-ci voted on patch set 6 V +1 02/25/22, 13:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24267
-
Benni Mack uploaded patch set 7 02/25/22, 13:50
-
Benni Mack commented on patch set 6 02/25/22, 13:50
DataHandler.php:2707ReplyDone -
Benni Mack uploaded patch set 8 02/25/22, 13:54
-
core-ci voted on patch set 7 V -1 02/25/22, 13:59 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24276
-
Benni Mack uploaded patch set 9 02/25/22, 14:00
-
Benni Mack updated the commit message in patch set 10 02/25/22, 14:00
-
core-ci voted on patch set 8 V -1 02/25/22, 14:04 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24277
-
core-ci voted on patch set 10 V -1 02/25/22, 14:11 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24279
-
core-ci voted on patch set 9 V -1 02/25/22, 14:13 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24278
-
Benni Mack uploaded patch set 11 02/25/22, 15:45
-
core-ci voted on patch set 11 V +1 02/25/22, 15:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24292
-
Andreas Kienast uploaded patch set 12 02/25/22, 16:50
-
core-ci voted on patch set 12 V +1 02/25/22, 17:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24298
-
Andreas Kienast uploaded patch set 13 02/25/22, 20:04
-
core-ci voted on patch set 13 V -1 02/25/22, 20:15 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24305
-
Andreas Kienast uploaded patch set 14 02/25/22, 20:54
-
core-ci voted on patch set 14 V +1 02/25/22, 21:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24306
-
Oli Bartsch commented on patch set 14 02/25/22, 23:26
ImageManipulationElement.php:206if ($config['required'] ?? false) should be sufficient.TcaMigration.php:57Usually new migrations are added at the bottom.TcaMigration.php:215I'm missing the PHPDoc describing what is migrated to what. See the other migrations for examples. Also the whole method is really hard to read. No early return, mixed "pass by reference" and yoda syntax. Additionally, the message is only added in case "required" does not yet exists as config. This means, there is a chance the migrations removes "required" from the eval list, without notifying the user. The message IMO should always be added as soon as we remove "required" from the "eval" list.TcaMigration.php:219Not 100% sure but "eval" is only valid for "type=input", right? If so, we should also check for the type to not touch unrelated config (This should then also get a test case). -
Oli Bartsch commented on patch set 14 02/25/22, 23:45
TcaMigration.php:219ReplyForget about this. -
Oli Bartsch commented on patch set 14 02/25/22, 23:57
TcaMigration.php:219ReplyResolved the comment due to various types supporting "eval", e.g. also "check". However since the "required" migration only makes sense for "input" and "text" my initial comment about also checking for the TCA type(s) might still make sense? -
Andreas Kienast commented on patch set 14 02/27/22, 12:24
ImageManipulationElement.php:206ReplyAckTcaMigration.php:57ReplyAckTcaMigration.php:215ReplyIIRC other methods don't have early returns as well, also I'm not aware of yod syntax (I thought phpcs-fixer detects those). I agree with the notification point, I'll change the code accordingly.TcaMigration.php:219ReplyI'd keep this for now as we plan to introduce new field types (e.g. email). If somebody uses "the old"™ eval syntax (un)intentionally, this should get migrated as well. -
Andreas Kienast uploaded patch set 15 02/27/22, 12:32
-
core-ci voted on patch set 15 V +1 02/27/22, 12:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24362
-
Nikita Hovratov commented on patch set 15 02/27/22, 14:27
TcaMigration.php:219ReplyOn top of that "slug" and "imageManipulation" have the eval=required option, too. Btw check has "eval", but it's only for the combination with "validation". -
Nikita Hovratov commented on patch set 15 02/27/22, 14:52
be_users.php:59"password" needs to be added back.Deprecation-97035-DeprecatedRequiredOptionInEvalKeyword.rst:4The word "deprecated" is redundant in the title, as it is a Deprecation rst. Let's change the filename and title to not include it twice.Deprecation-97035-DeprecatedRequiredOptionInEvalKeyword.rst:16refactoring without "s"Deprecation-97035-DeprecatedRequiredOptionInEvalKeyword.rst:24Its not logged, only visible in the TCA migration module.Deprecation-97035-DeprecatedRequiredOptionInEvalKeyword.rst:37true without quotation marks and also no log entry.Deprecation-97035-DeprecatedRequiredOptionInEvalKeyword.rst:61trueFeature-97035-UtilizeRequiredDirectlyInTCAFieldConfiguration.rst:23required => trueFeature-97035-UtilizeRequiredDirectlyInTCAFieldConfiguration.rst:37required => true -
Andreas Kienast commented on patch set 15 02/27/22, 14:55
Deprecation-97035-DeprecatedRequiredOptionInEvalKeyword.rst:24ReplyIn my tests I had entries in typo3temp/var/log/typo3_deprecations_xxx.log -
Andreas Kienast commented on patch set 15 02/27/22, 14:59
be_users.php:59ReplyAckDeprecation-97035-DeprecatedRequiredOptionInEvalKeyword.rst:4ReplyAckDeprecation-97035-DeprecatedRequiredOptionInEvalKeyword.rst:16ReplyAckDeprecation-97035-DeprecatedRequiredOptionInEvalKeyword.rst:24ReplyDeprecation-97035-DeprecatedRequiredOptionInEvalKeyword.rst:37ReplyAckDeprecation-97035-DeprecatedRequiredOptionInEvalKeyword.rst:61ReplyAckFeature-97035-UtilizeRequiredDirectlyInTCAFieldConfiguration.rst:23ReplyAckFeature-97035-UtilizeRequiredDirectlyInTCAFieldConfiguration.rst:37ReplyAck -
Andreas Kienast uploaded patch set 16 02/27/22, 14:59
-
Nikita Hovratov commented on patch set 15 02/27/22, 15:00
DataHandler.php:2715We could typehint $value with mixed.Deprecation-97035-DeprecatedRequiredOptionInEvalKeyword.rst:24ReplyOh ok, nvm then. -
Andreas Kienast uploaded patch set 17 02/27/22, 15:07
-
core-ci voted on patch set 16 V +1 02/27/22, 15:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24376
-
Nikita Hovratov commented on patch set 16 02/27/22, 15:21
DataHandler.php:2715ReplyDone -
Nikita Hovratov voted on patch set 17 V +1 CR +1 02/27/22, 15:21
-
core-ci voted on patch set 17 V +1 02/27/22, 15:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24377
-
Oli Bartsch commented on patch set 17 V +1 CR +1 02/28/22, 09:43
TcaMigration.php:215ReplyDoneTcaMigration.php:219ReplyDone -
Andreas Kienast voted on patch set 17 V +2 CR +2 02/28/22, 09:44
-
Andreas Kienast merged patch set 18 02/28/22, 09:44
DataHandler.php:2707