Review main Merged

81352[TASK] Warn about empty @import in TypoScript

Christian Kuhn CR +2 V +2 Normal +165 −22 updated 10/06/23, 13:42

Commit message

When @import or <INCLUDE_TYPOSCRIPT: lines do not
resolve to any include, this probably indicates
a broken import statement.

To help integrators find and fix those, the
Page TSconfig and TypoScript backend modules now
list them as "Syntax scanner warnings".

We're adding a functional test to verify the detection
works. This will ensure it does not break when we refactor
some details of the include tree structure later. Doing as
described in #102102 and #102103 would simplify and
streamline various details, but it's currently unclear if
we should still do this in v12.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Markus Klein +1
    • Stefan Bürk +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Markus Klein +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 5

Files 15

Review log 1520

  1. Christian Kuhn uploaded patch set 1 10/06/23, 09:37

  2. Christian Kuhn commented on patch set 1 10/06/23, 09:39

    needs @todo comments that the include tree is not good with import statements (we should always create child nodes for each import statement, even if it does not resolve). This is a bit fiddly though and may not be backported to v12 anymore. we should cover this visitor with good functional tests to verify the detection does not break again when we refactor the include tree.
  3. core-ci voted on patch set 1 V -1 10/06/23, 09:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47476

  4. Christian Kuhn rebased onto patch set 2 V -1 10/06/23, 09:51

  5. core-ci voted on patch set 2 V -1 10/06/23, 10:07 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47479

  6. Christian Kuhn uploaded patch set 3 V -1 10/06/23, 11:58

  7. core-ci voted on patch set 3 V +1 10/06/23, 12:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47485

  8. Christian Kuhn commented on patch set 3 10/06/23, 12:10

    Reply

    Done
  9. Markus Klein commented on patch set 3 10/06/23, 12:46

    includes.typoscript:4

    maybe we should add `@import './ImportsFullDir/'
  10. Christian Kuhn commented on patch set 3 10/06/23, 12:51

    includes.typoscript:4 Reply

    i stayed away from this: this test is about finding invalid imports, not about @import syntax details, which have own tests.
  11. Christian Kuhn commented on patch set 3 10/06/23, 12:54

    includes.typoscript:4 Reply

    ok, does not matter much. i'll add it.
  12. Christian Kuhn uploaded patch set 4 V +1 10/06/23, 12:55

  13. Christian Kuhn uploaded patch set 5 10/06/23, 13:05

  14. core-ci voted on patch set 4 V +1 10/06/23, 13:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47492

  15. Markus Klein voted on patch set 5 V +1 CR +1 10/06/23, 13:07

  16. core-ci voted on patch set 5 V +1 10/06/23, 13:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47494

  17. Stefan Bürk voted on patch set 5 V +1 CR +1 10/06/23, 13:13

  18. Christian Kuhn voted on patch set 5 V +2 CR +2 10/06/23, 13:40

  19. Christian Kuhn merged patch set 6 10/06/23, 13:40

  20. Oli Bartsch voted on patch set 5 V +1 CR +1 10/06/23, 13:42