Review main Abandoned

81602[DOCS] Clarify Symfony CLI attribute argument "hidden" it not usable

Chris Müller CR 0 V 0 Easy +4 −1 updated 11/07/23, 06:14

Commit message

Using the "hidden" argument in the Symfony PHP attribute for
registering a command has not the effect one expects. This
has also to be mentioned in the changelog. It is now stated
explicitly, that these both configuration options (via PHP
attribute and via Services.yaml) are not the same.

Review

  • Code review CR 0
  • Verified V 0

Issues 2

Files 1

Review log 910

  1. Chris Müller uploaded patch set 1 10/27/23, 18:57

  2. core-ci voted on patch set 1 V +1 10/27/23, 19:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48314

  3. Oliver Klee voted on patch set 1 V +1 CR +1 10/27/23, 19:07

  4. Guido Schmechel commented on patch set 1 10/27/23, 21:51

    Important-101567-UseSymfonyAttributeToAutoconfigureCliCommands.rst:22

    Does it make sense to give a hint to the "hide command" solution here? I don't know offhand what the alternative is.
  5. Chris Müller commented on patch set 1 10/28/23, 06:54

    Important-101567-UseSymfonyAttributeToAutoconfigureCliCommands.rst:22 Reply

    It is written above: "In order to overwrite the parameters schedulable and hidden use the old Services.yaml way to register console commands."
  6. Guido Schmechel commented on patch set 1 V +1 CR +1 10/28/23, 07:57

    Important-101567-UseSymfonyAttributeToAutoconfigureCliCommands.rst:22 Reply

    Sorry! It was obviously too late yesterday :-D
  7. Garvin Hicking commented on patch set 1 10/30/23, 10:27

    In the slack chat this discussion occured: (Christian Spoo): The Symfony attribute only handles the command function of the class in question. I was thinking of an additional class-level attribute dealing with the TYPO3-specific portion of the metadata, i.e. the fact whether the command is available for scheduler tasks or not. That's something outside Symfony's scope. s.th. like "AsSchedulerTask", very much like the "AsCommand" that registers the class in the CLI application (Mathias Brodala): Suggested the same in the change but didn't get much support for that. Personally I also think it's worth recapitulating whether an additional command for this would be acceptable? It kinda defeats the simplicity of having only one attribute, but if the other way means you'd have to completely register a Services.yaml entry, that might be worth just using one additional attribute instead....
  8. Chris Müller commented on patch set 1 10/30/23, 12:06

    Reply

    Yup, I read it. But it has no impact on this change IMHO. I added this change to TYPO3 Explained and wondered why the "hidden" argument from the Symfony attribute is not used. Then I tried and failed ;-). This is only a clarification. A new class-level attribute would be a new feature (which will then go with a separate changelog rst and only in v13, I assume. Personally, I don't like the current implementation either.
  9. Benjamin Franzke commented on patch set 1 CR -1 10/30/23, 16:48

    I'd like to propose an alternative: 81617: [TASK] Respect the AsCommand `hidden` constructor argument | https://review.typo3.org/c/Packages/TYPO3.CMS/+/81617
  10. Benjamin Franzke abandoned the change 11/07/23, 06:14