Review 10.4 Abandoned

70298[TASK] Strip declare(strict_types=1) from concatenated ext_localconf content

Wouter Wolters CR 0 V 0 Easy +1 −0 updated 09/17/21, 08:04

Commit message

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 1

Review log 1516

  1. Wouter Wolters uploaded patch set 1 08/09/21, 09:28

  2. core-ci voted on patch set 1 V +1 08/09/21, 09:38 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14315

  3. Oliver Hader commented on patch set 1 08/09/21, 09:52

  4. Oliver Klee commented on patch set 1 CR +1 08/09/21, 10:05

    ExtensionManagementUtility.php:1616 Unresolved

    Would "\\s*" be the same as "\\s?+"? Or am I misreading the expression here?
  5. Oliver Klee voted on patch set 1 CR 0 08/09/21, 10:05

  6. Christian Kuhn commented on patch set 1 08/09/21, 22:18

    do-able for v10, but not strictly needed, right? in the end, we don't want to encourage people adding strict_types=1 to ext_localconf and/or ext_tables, so the core master change is basically just a fallout from core's monorepo potential ability to add the 'everything strict' rule without exception. and this will take some time to at least v12 since i don't think we'll be able to blindly strictify everything in v11 at least. -> i'm not convinced we should do this in v10. let's maybe at least see if the v11 change survives some releases, and even then, i'm not sure if we need this for v10.
  7. Wouter Wolters commented on patch set 1 08/09/21, 22:21

    Reply

    It is not strictly needed but was requested to backport and got the greenlight from Benni in the master patch.
  8. Christian Kuhn commented on patch set 1 08/09/21, 22:24

    Reply

    i see.
  9. Oliver Klee voted on patch set 1 CR +1 08/13/21, 12:44

  10. Andreas Kienast voted on patch set 1 CR +1 08/24/21, 18:50

  11. crell commented on patch set 1 08/24/21, 18:53

    ExtensionManagementUtility.php:1616

    A complex and ugly regex needs tests to make sure it's doing what it says on the tin, since they're not legible on their own.
  12. Wouter Wolters commented on patch set 1 08/24/21, 19:03

    ExtensionManagementUtility.php:1616 Reply

    Keep in mind this change is already merge for 2 weeks or so in master. This is just the backport for 10.4.
  13. Markus Klein commented on patch set 1 08/24/21, 19:06

    ExtensionManagementUtility.php:1616 Reply

    I disagree here that this regex is complex. The only non-static things are \s here. I agree with Oli that \s* is way more readable, and should be sufficient. The "s" modifier is not needed, as we do not even have a dot in the regex. I would rewrite to `/declare\\s*\\(\\s*strict_types\\s*=\\s*1\\s*\\)\\s*;/i` None the less, of course tests never hurt. ;-)
  14. Markus Klein commented on patch set 1 08/24/21, 19:09

    ExtensionManagementUtility.php:1616 Reply

    Obviously we wrote our comments in parallel. I also opt to change this in master, honestly.
  15. crell commented on patch set 1 CR +1 08/24/21, 19:17

    ExtensionManagementUtility.php:1616 Reply

    Ah, if it's just a backport, so be it. Though I would also favor better tests in master (separate from this patch, of course).
  16. Wouter Wolters abandoned the change 09/17/21, 08:04