Review main Merged

71938[BUGFIX] Fix translation handling in vendor packages

Simon Gilli CR +2 V +2 Normal +163 −22 updated 11/09/21, 07:20

Commit message

When installing TYPO3 and Extensions into the vendor folder, no language
files can be loaded anymore because of an implementation depending on
hard coded Extension directories.

A new method is implemented in the PackageManager to extract a package
key from a path which solves the issue and makes the old implementation
superfluous. The code is left there however to not interfere with custom
implementations (despite these classes are marked internal).

LLL references not using an EXT: path, but a file system path will
"work" exactly like before. This should rather be deprecated later on.

In fact the whole language file parsing deserves a complete overhaul, which
should be tackled in subsequent changes for a new major TYPO3 version.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Simon Gilli +1
    • Helmut Hummel +1
  • Verified V +2 Done
    • Benni Mack +2
    • Simon Gilli +1
    • Helmut Hummel +1
    • core-ci +1 CI

Issues 1

Files 11

Review log 88143

Show 70118 earlier messages
  1. Simon Gilli uploaded patch set 1 10/22/21, 09:33

  2. core-ci voted on patch set 1 V -1 10/22/21, 09:53 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18422

  3. Simon Gilli commented on patch set 1 10/22/21, 10:37

    AbstractXmlParser.php:44

    allow null or fix tests

    PackageManager.php:322

    message should be adapted here
  4. Simon Gilli uploaded patch set 2 10/23/21, 14:26

  5. Simon Gilli commented on patch set 2 10/23/21, 14:27

    PackageManager.php:322 Reply

    Done
  6. Simon Gilli commented on patch set 2 10/23/21, 14:30

    AbstractXmlParser.php:44 Reply

    Done

    XliffParserTest.php:119

    should be moved to a functional test imho

    XliffParserTest.php:157

    should be moved to a functional test imho
  7. core-ci voted on patch set 2 V -1 10/23/21, 14:41 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18442

  8. Simon Gilli uploaded patch set 3 10/23/21, 19:33

  9. core-ci voted on patch set 3 V -1 10/23/21, 19:35 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18457

  10. Simon Gilli commented on patch set 3 10/23/21, 19:40

    AbstractXmlParser.php:36

    we should get rid of the property here and just pass the value as paramter where needed

    AbstractXmlParser.php:41

    we should get rid of the property here and just pass the value as paramter where needed

    XliffParserTest.php:119 Reply

    Done

    XliffParserTest.php:157 Reply

    Done
  11. Simon Gilli uploaded patch set 4 10/23/21, 19:40

  12. core-ci voted on patch set 4 V -1 10/23/21, 19:43 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18459

  13. Simon Gilli uploaded patch set 5 10/23/21, 19:44

  14. core-ci voted on patch set 5 V -1 10/23/21, 20:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18460

  15. Simon Gilli rebased onto patch set 6 10/23/21, 20:19

  16. core-ci voted on patch set 6 V -1 10/23/21, 20:34 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18464

  17. Simon Gilli uploaded patch set 7 10/23/21, 22:18

  18. core-ci voted on patch set 7 V +1 10/23/21, 22:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18475

  19. Simon Gilli uploaded patch set 8 10/23/21, 22:53

  20. Simon Gilli commented on patch set 8 10/23/21, 22:54

    AbstractXmlParser.php:36 Reply

    Done

    AbstractXmlParser.php:41 Reply

    Done
  21. Simon Gilli uploaded patch set 9 10/23/21, 23:00

  22. core-ci voted on patch set 8 V +1 10/23/21, 23:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18477

  23. Simon Gilli commented on patch set 9 10/23/21, 23:08

    AbstractXmlParser.php:31

    is imho superfluous but added for the moment for the unit tests. should be removed, the public service declaration should be sufficient.
  24. core-ci voted on patch set 9 V +1 10/23/21, 23:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18479

  25. Simon Gilli uploaded patch set 10 10/24/21, 13:42

  26. core-ci voted on patch set 10 V -1 10/24/21, 13:45 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18497

  27. Simon Gilli uploaded patch set 11 10/24/21, 13:49

  28. core-ci voted on patch set 11 V -1 10/24/21, 13:52 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18498

  29. Simon Gilli uploaded patch set 12 10/24/21, 13:53

  30. Simon Gilli uploaded patch set 13 10/24/21, 13:56

  31. core-ci voted on patch set 12 V -1 10/24/21, 14:09 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18499

  32. core-ci voted on patch set 13 V +1 10/24/21, 14:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18500

  33. Simon Gilli uploaded patch set 14 10/24/21, 23:22

  34. Simon Gilli commented on patch set 14 10/24/21, 23:24

    AbstractXmlParser.php:31 Reply

    Done
  35. core-ci voted on patch set 14 V -1 10/24/21, 23:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18510

  36. Simon Gilli uploaded patch set 15 10/24/21, 23:35

  37. core-ci voted on patch set 15 V -1 10/24/21, 23:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18511

  38. Simon Gilli uploaded patch set 16 10/24/21, 23:41

  39. core-ci voted on patch set 16 V -1 10/24/21, 23:52 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18512

  40. Simon Gilli uploaded patch set 17 10/25/21, 00:00

  41. core-ci voted on patch set 17 V +1 10/25/21, 00:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18513

  42. Simon Gilli uploaded patch set 18 10/25/21, 09:47

  43. Simon Gilli uploaded patch set 19 10/25/21, 09:52

  44. core-ci voted on patch set 18 V +1 10/25/21, 10:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18517

  45. Simon Gilli uploaded patch set 20 10/25/21, 10:06

  46. core-ci voted on patch set 19 V +1 10/25/21, 10:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18519

  47. core-ci voted on patch set 20 V +1 10/25/21, 10:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18521

  48. Simon Gilli uploaded patch set 21 10/25/21, 10:32

  49. core-ci voted on patch set 21 V +1 10/25/21, 10:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18525

  50. Simon Gilli uploaded patch set 22 10/25/21, 11:27

  51. core-ci voted on patch set 22 V +1 10/25/21, 11:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18526

  52. Simon Gilli uploaded patch set 23 10/25/21, 12:34

  53. core-ci voted on patch set 23 V -1 10/25/21, 12:56 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18529

  54. Simon Gilli uploaded patch set 24 10/25/21, 13:11

  55. core-ci voted on patch set 24 V +1 10/25/21, 13:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18531

  56. Simon Gilli uploaded patch set 25 10/25/21, 14:15

  57. Simon Gilli uploaded patch set 26 10/25/21, 14:16

  58. core-ci voted on patch set 25 V +1 10/25/21, 14:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18536

  59. Simon Gilli uploaded patch set 27 10/25/21, 14:30

  60. core-ci voted on patch set 27 V +1 10/25/21, 14:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18538

  61. core-ci voted on patch set 26 V +1 10/25/21, 14:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18537

  62. Simon Gilli uploaded patch set 28 10/27/21, 09:18

  63. Simon Gilli uploaded patch set 29 10/27/21, 09:20

  64. core-ci voted on patch set 28 V +1 10/27/21, 09:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18612

  65. core-ci voted on patch set 29 V +1 10/27/21, 09:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18613

  66. Simon Gilli uploaded patch set 30 10/27/21, 21:40

  67. Simon Gilli uploaded patch set 31 10/27/21, 21:53

  68. Simon Gilli commented on patch set 31 10/27/21, 21:57

    AbstractXmlParser.php:143

    Wondering if we could use basename() and dirname() here instead.
  69. core-ci voted on patch set 30 V +1 10/27/21, 22:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18635

  70. core-ci voted on patch set 31 V -1 10/27/21, 22:08 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18636

  71. Simon Gilli uploaded patch set 32 10/27/21, 22:34

  72. core-ci voted on patch set 32 V +1 10/27/21, 22:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18637

  73. Simon Gilli uploaded patch set 33 10/30/21, 22:34

  74. core-ci voted on patch set 33 V -1 10/30/21, 22:56 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18691

  75. Simon Gilli uploaded patch set 34 10/31/21, 00:10

  76. core-ci voted on patch set 34 V +1 10/31/21, 00:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18693

  77. Simon Gilli uploaded patch set 35 10/31/21, 16:09

  78. Simon Gilli commented on patch set 35 10/31/21, 16:10

    AbstractXmlParser.php:143 Reply

    Done
  79. core-ci voted on patch set 35 V -1 10/31/21, 16:30 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18699

  80. Simon Gilli uploaded patch set 36 11/01/21, 12:37

  81. Simon Gilli updated the commit message in patch set 37 11/01/21, 12:48

  82. Simon Gilli updated the commit message in patch set 38 11/01/21, 12:50

  83. core-ci voted on patch set 36 V +1 11/01/21, 12:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18722

  84. Simon Gilli commented on patch set 38 11/01/21, 12:56

    This change is ready for review.
  85. core-ci voted on patch set 37 V +1 11/01/21, 13:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18723

  86. core-ci voted on patch set 38 V +1 11/01/21, 13:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18724

  87. Simon Gilli uploaded patch set 39 11/01/21, 16:42

  88. Simon Gilli commented on patch set 39 CR -1 11/01/21, 16:55

    Test for one new method in PackageManager is currently missing...
  89. core-ci voted on patch set 39 V -1 11/01/21, 16:59 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18726

  90. Simon Gilli uploaded patch set 40 11/01/21, 17:56

  91. Simon Gilli commented on patch set 40 CR -1 11/01/21, 18:00

    Test for one new method in PackageManager is currently missing...
  92. core-ci voted on patch set 40 V -1 11/01/21, 18:13 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18727

  93. Simon Gilli rebased onto patch set 41 11/01/21, 18:47

  94. Simon Gilli marked it work in progress 11/01/21, 18:47

  95. core-ci voted on patch set 41 V -1 11/01/21, 19:05 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18729

  96. Simon Gilli rebased onto patch set 42 11/01/21, 19:16

  97. core-ci voted on patch set 42 V +1 11/01/21, 19:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18731

  98. Simon Gilli commented on patch set 42 V -1 11/02/21, 07:24

    PackageManager.php:318

    regex is wrong
  99. Simon Gilli uploaded patch set 43 11/02/21, 12:17

  100. Simon Gilli commented on patch set 43 11/02/21, 12:17

    This change is ready for review.

    PackageManager.php:318 Reply

    Done
  101. Simon Gilli uploaded patch set 44 11/02/21, 12:20

  102. Simon Gilli commented on patch set 44 CR -1 11/02/21, 12:23

    PackageManager.php:276

    I would prefer to have a getter method instead. What do you think @Helmut?
  103. core-ci voted on patch set 43 V -1 11/02/21, 12:28 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18748

  104. Simon Gilli uploaded patch set 45 11/02/21, 12:41

  105. Simon Gilli uploaded patch set 46 11/02/21, 12:43

  106. core-ci voted on patch set 45 V -1 11/02/21, 12:44 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18750

  107. Simon Gilli uploaded patch set 47 11/02/21, 12:45

  108. Helmut Hummel commented on patch set 47 11/02/21, 12:58

    PackageManager.php:276 Reply

    Any improvement here should be along the lines of (re-)storing this regex from and into package cache. So I'd leave it like this for this bugfix.
  109. core-ci voted on patch set 46 V -1 11/02/21, 13:01 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18751

  110. core-ci voted on patch set 47 V -1 11/02/21, 13:02 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18752

  111. core-ci voted on patch set 44 V -1 11/02/21, 13:10 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18749

  112. Simon Gilli uploaded patch set 48 11/02/21, 13:14

  113. Helmut Hummel commented on patch set 48 11/02/21, 13:24

    LanguageStore.php:163

    The file reference is always converted into an absolute file system path here.

    LanguageStore.php:222

    This is never an extension path at this point (see above)
  114. core-ci voted on patch set 48 V +1 11/02/21, 13:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18759

  115. Simon Gilli commented on patch set 48 11/02/21, 15:20

    LanguageStore.php:163 Reply

    Correct. That's why I always try to use the raw file ref from the LanguageService and that's also the reason for the change below.

    LanguageStore.php:222 Reply

    $fileReference can be the raw data from the LanguageService, so yes this can ofc be an extension path. btw this change ensures the $fileReference never gets converted to an absolute path for the parser. The whole code is a mess and very hard to read and understand, after two weeks of working with this code I slowly get an idea about the details now... So like said before via PM we need to write this whole stuff from scratch as next step, it really does not make any sense to invest more time here.
  116. Helmut Hummel uploaded patch set 49 11/03/21, 16:52

  117. Simon Gilli commented on patch set 49 11/03/21, 17:13

    LanguageStore.php:62

    I would move this before the init call.
  118. Helmut Hummel commented on patch set 49 11/03/21, 17:16

    LanguageStore.php:62 Reply

    Ack
  1. core-ci voted on patch set 49 V -1 11/03/21, 17:21 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18801

  2. Helmut Hummel uploaded patch set 50 11/03/21, 18:23

  3. core-ci voted on patch set 50 V -1 11/03/21, 18:39 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18809

  4. Helmut Hummel uploaded patch set 51 11/03/21, 18:59

  5. core-ci voted on patch set 51 V +1 11/03/21, 19:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18813

  6. Simon Gilli updated the commit message in patch set 52 11/03/21, 19:21

  7. Simon Gilli commented on patch set 52 CR +1 11/03/21, 19:31

    I guess that's it after almost 2 weeks of work on this patch. Testing now...
  8. core-ci voted on patch set 52 V +1 11/03/21, 19:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18817

  9. Simon Gilli voted on patch set 52 V +1 11/03/21, 19:44

  10. Helmut Hummel uploaded patch set 53 11/08/21, 13:01

  11. Helmut Hummel voted on patch set 53 V +1 CR +1 11/08/21, 13:02

  12. Helmut Hummel uploaded patch set 54 11/08/21, 13:15

  13. Helmut Hummel voted on patch set 54 V +1 CR +1 11/08/21, 13:17

  14. core-ci voted on patch set 53 V -1 11/08/21, 13:19 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19018

  15. core-ci voted on patch set 54 V -1 11/08/21, 13:32 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19019

  16. Helmut Hummel uploaded patch set 55 11/08/21, 13:39

  17. Helmut Hummel uploaded patch set 56 11/08/21, 13:41

  18. core-ci voted on patch set 56 V +1 11/08/21, 14:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19022

  19. Simon Gilli commented on patch set 56 V +1 11/08/21, 14:29

    PackageManager.php:315

    Can we use a stricter test than empty? Subject to change with higher PHPStan levels anyway so why not already doing it the right way. $matches[1] === '' should be fine.
  20. Helmut Hummel commented on patch set 56 11/08/21, 16:11

    PackageManager.php:315 Reply

    I'd liked to be sure $match[1] is actually set, so the most explicit check would be: isset($match[1]) && $match[1] !== '' The only difference to empty($match[0]) would be that the empty would also be true for string '0', which I pretty much find acceptable here. So for my personal taste, empty() does its job and is more concise than isset($match[1]) && $match[1] !== '' But I honestly don't care too much
  21. Simon Gilli commented on patch set 56 CR +1 11/08/21, 16:23

    PackageManager.php:315 Reply

    Ack
  22. Helmut Hummel commented on patch set 56 11/08/21, 16:24

    PackageManager.php:315 Reply

    Let's keep it like that for now
  23. Helmut Hummel voted on patch set 56 V +1 CR +1 11/08/21, 16:24

  24. Benni Mack voted on patch set 56 V +2 CR +2 11/09/21, 07:20

  25. Benni Mack merged patch set 57 11/09/21, 07:20