Issue Task Closed

#105113Debug viewhelper and debugger utility vardump don't show if property can be accessed by Fluid and don't show get/is/has methods which act as properties for Fluid

Jigal van Hemert 09/25/24, 08:35 updated 09/10/26, 11:41

Description

Both the debug viewhelper and DebuggerUtility::var_dump() are often used to show which properties of an object can be used.
Fluid accessors can be:
  • public class variables
  • protected/private class variables with a public getter
  • public getters (functions starting with get/is/has) without a corresponding class variable

The latter category can be used for calculated “properties”. It is however not clear in the debug output whether properties can be used as Fluid accessor nor which “virtual” properties are available through extra getters.

Reviews 1

History 712

  1. Garvin Hicking commented and changed status New Needs Feedback <span data-processor="relativetime" data-value="2024-09-25T09:56:47+00:00" > 09/25/24, 09:56 </span>

    Yes, this is a shortcoming of the internal debugger.

    I can whole-heartedly recommend anyone to look into https://extensions.typo3.org/extension/includekrexx

    This extension offers a powerful debugger that makes all these getters and properties fully accessible and searchible.

    I initially wanted to enhance the core’s debugger, but this alternative is so powerful that I would feel ashamed to rebuild something which is already being well-maintained and fosters the TYPO3 extension ecosystem. I was not aware of it earlier, and maybe this helps in promoting it.

    (You can use the extension with a require-dev dependency)

    What do you think?

  2. Jigal van Hemert commented <span data-processor="relativetime" data-value="2024-09-25T11:51:58+00:00" > 09/25/24, 11:51 </span>

    Garvin Hicking wrote in #note-1:
    > I can whole-heartedly recommend anyone to look into https://extensions.typo3.org/extension/includekrexx
    > What do you think?

    The extension you mention is just a bit powerful and overwhelming for most people. I haven’t tried it but the screenshots in the manual looked quite complicated.
    I’ve already made an implementation for the change I propose in this issue. It’s quite small and simple, yet it provides the much needed information.

    The TYPO3 core should provide a basic set of tools with which you can build a website. There will always be better/alternative extensions to provide a search functionality, forms, and so on. The basic tools should provide enough functionality to be useful and in this case the missing information about available Fluid accessors is in my opinion an omission.

  3. Garvin Hicking commented <span data-processor="relativetime" data-value="2024-09-25T11:55:52+00:00" > 09/25/24, 11:55 </span>

    Actually it is really a drop-in replacement. You can require-dev it and then just use <krexx:debug>{_all}</krexx:debug> in a fluid partial without further configuration.

    I fully agree it would be awesome to have something like it in the TYPO3 core. But you can see in this extension the massive amount of complexity this can have. I tried implementing a “simpler” approach in the core (see the linked issue) but quickly saw there are so many edge cases that need addressing. I would feel really bad to reinvent the wheel and spent hours and hours of implementing something that will not have the functionality this extension provides.

    A strength of TYPO3 IMO is that we have an extension ecosystem, and this is really a great example where we might want to rely on functionality like this instead. I understand though that people want to “just work with the core”, this is very valid.

    We need to decide though if we close this issue in favor of #102927 which is basically the same?

  4. Benni Mack commented and changed tracker Bug Task <span data-processor="relativetime" data-value="2024-10-07T11:44:02+00:00" > 10/07/24, 11:44 </span>

    I wouldn’t say this is a bug, rather a task to also see the has-/get methods, maybe there is a “getCalculatedPublishDate” which could be used in Fluid, so we should extend the debug method here.

  5. Gerrit Code Review pushed patch set 1 for main to change 88599 status Accepted Under Review <span data-processor="relativetime" data-value="2025-03-16T08:30:43+00:00" > 03/16/25, 08:30 </span>

  6. Georg Ringer commented and changed status Under Review Closed <span data-processor="relativetime" data-value="2026-09-10T11:41:31+00:00" > 09/10/26, 11:41 </span>

    there wasn’t any progress and as there is EXT:includekrexx I am closing this issue