Review main Abandoned

83196[TASK] Import fluid namespace where missing

Simon Schaufelberger CR 0 V 0 Hard +331 −91 updated 03/26/25, 22:50

Commit message

This patch adds a fluid namespace annotation where it was missing.

All files have been found with the following command:

> find typo3 -type f -name "*.html" \
 ! -path "typo3/sysext/backend/Tests/Functional/Template/Fixtures/*" \
 -exec grep -L -E "^(<html|{|Foo|###|Partial)" {} \;

Additionally, some files were a bit formatted.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 74

Show 54 more files

Review log 1520

  1. Simon Schaufelberger uploaded patch set 1 03/04/24, 14:39

  2. core-ci voted on patch set 1 V -1 03/04/24, 14:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53859

  3. Simon Schaufelberger uploaded patch set 2 V -1 03/04/24, 14:53

  4. core-ci voted on patch set 2 V -1 03/04/24, 14:59 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53862

  5. Simon Schaufelberger uploaded patch set 3 V -1 03/04/24, 15:05

  6. core-ci voted on patch set 3 V +1 03/04/24, 15:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53868

  7. Simon Schaufelberger uploaded patch set 4 V +1 03/04/24, 15:12

  8. Simon Schaufelberger uploaded patch set 5 03/04/24, 15:18

  9. core-ci voted on patch set 5 V +1 03/04/24, 15:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53874

  10. Benjamin Franzke commented on patch set 5 CR -2 03/05/24, 11:35

    The namespace annotation is not missing. There is not technical reason to flood all partials with unneeded declarations. The namespace f is defined by default.
  11. Simon Schaufelberger commented on patch set 5 03/05/24, 11:51

    Reply

    I know it is technically not missing but for good IDE support it should be added everywhere. Technically you could leave out the import of the f namespace everywhere but it has been done in the majority of the core already and these files are just the remaining once to make it 100%. Actually this is a followup patch which has already been merged by Simon P and Garvin also had a look at the previous one already so there is some support already from core team members.
  12. Benjamin Franzke commented on patch set 5 03/05/24, 12:03

    Reply

    IDE (which should help) can not be the reasons to add thousands of lines of code. This is not help but burden. IDEs sould be fixed. Sorry to be rude, but I don't care who merged whatver, if something makes no sense, I'll be a blocker here – sorry.
  13. Simon Schaufelberger commented on patch set 5 03/05/24, 12:17

    Reply

    how can IDEs be fixed if they don't know what to do? This annotation for fluid is basically the same as the file .phpstorm.meta.php. It's just there to help phpstorm to know more about the code. Why do we care so much about phpstan? Because we want to know more. All these doctype annotations fall under the same category like the fluid annotation so your argument is not really a good reason to stop this from merging.
  14. Simon Praetorius commented on patch set 5 03/05/24, 16:50

    Reply

    I must say that I don't agree with this. I see those namespace definitions similar to PHP namespaces: All dependencies should be defined in the file, not just those that aren't global. This makes it possible to create tooling (like validators or IDE integrations) that works without the knowledge of any global state besides the template.
  15. Benjamin Franzke commented on patch set 5 03/05/24, 16:56

    Reply

    The fluid default namespace is part of the fluid language. This is something a valid fluid IDE integration *has* to know, otherwise it doesn't work for *valid* fluid templates. I understand we just want those IDEs to work, but I'm pretty sure we should really try to head to the proper technical decision, which is to require IDEs to properly understand fluid. Thanks.
  16. Simon Schaufelberger commented on patch set 5 03/05/24, 17:03

    Reply Unresolved

    But until IDEs know Fluid, let's help them. I'm not aware of any IDE which understands Fluid templates currently, not even the Fluid Plugin from Sgalinski has 100% understanding of Fluid. That is also the reason why people come up with budget ideas like: https://talk.typo3.org/t/lsp-implementation-for-fluid/5052
  17. Simon Schaufelberger uploaded patch set 6 V +1 05/15/24, 21:25

    Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**")
  18. core-ci voted on patch set 6 V +1 05/15/24, 21:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/57792

  19. Georg Ringer abandoned the change 07/10/24, 07:16

  20. Simon Schaufelberger commented on patch set 6 03/26/25, 22:50

    @georg.ringer@gmail.com not fully as this only works if the namespace is defined in the file but these files don't have any namespace defined.