Review main Merged

70393[FEATURE] Add new CLI command "impexp:export"

Benni Mack CR +2 V +2 Hard +395 −1 updated 08/23/21, 16:16

Commit message

This change introduces a new CLI command "impexp:export"
which allows to export the TYPO3 page tree based on a
fine-grained configuration.

Both CLI commands "impexp:export" and "impexp:import"
no longer offer option shortcuts to improve the clarity
of the command when the user does a quick search.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • Wouter Wolters +1
    • Christian Kuhn +1
  • Verified V +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • Christian Kuhn +1
    • core-ci +1 CI

Issues 1

Files 5

Review log 3039

Show 914 earlier messages
  1. Benni Mack uploaded patch set 1 08/10/21, 11:14

  2. core-ci voted on patch set 1 V -1 08/10/21, 11:38 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14475

  3. Benni Mack rebased onto patch set 2 08/12/21, 10:43

  4. Christian Kuhn commented on patch set 2 CR -1 08/12/21, 11:12

    There was a Test file in the previous patch that should be integrated here. I guess Alexander will take care.
  5. core-ci voted on patch set 2 V +1 08/12/21, 11:23 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14701

  6. Alexander Nitsche uploaded patch set 3 08/12/21, 14:21

  7. Benni Mack commented on patch set 3 08/12/21, 14:37

    ExportCommand.php:217

    please use dependency injection here.
  8. core-ci voted on patch set 3 V +1 08/12/21, 14:41 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14758

  9. Alexander Nitsche uploaded patch set 4 08/12/21, 19:23

  10. core-ci voted on patch set 4 V -1 08/12/21, 19:27 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14838

  11. Alexander Nitsche commented on patch set 4 08/12/21, 19:28

    Added the reST file.

    ExportCommand.php:217 Reply

    Ok.
  12. Alexander Nitsche uploaded patch set 5 08/12/21, 19:30

  13. core-ci voted on patch set 5 V +1 08/12/21, 19:50 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14841

  14. Alexander Nitsche uploaded patch set 6 08/12/21, 19:51

  1. core-ci commented on patch set 6 08/12/21, 20:14 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14846

  2. Wouter Wolters commented on patch set 6 08/12/21, 20:39

    ExportCommand.php:202

    Command::SUCCESS

    ExportCommand.php:209

    Command::FAILURE
  3. Alexander Nitsche commented on patch set 6 08/13/21, 08:36

    ExportCommand.php:202 Reply Unresolved

    I would skip that in this patch as no TYPO3 Core command currently uses that constant but simple integers 0 and 1 at the moment. I suggest to replace it in all commands at once or keep it as is.

    ExportCommand.php:209 Reply Unresolved

    The same here: Skip it in this patch.
  4. Wouter Wolters voted on patch set 6 CR +1 08/13/21, 08:40

  5. Benni Mack commented on patch set 6 08/13/21, 09:51

    Feature-84718-AddCLIExportCommandToImpExpExtension.rst:35

    call the argument "target" I'd say.

    Feature-84718-AddCLIExportCommandToImpExpExtension.rst:36

    I would drop the short prefixes in general, as they are very specific to this, and feel very cryptic to use in short-hand prefix.

    Feature-84718-AddCLIExportCommandToImpExpExtension.rst:37

    I would not use `-f` as this could / should be reserved to --force (later-on to overwrite an existing export file for example)? and name this to "--type"

    Feature-84718-AddCLIExportCommandToImpExpExtension.rst:43

    I would call this option `--included-related`

    Feature-84718-AddCLIExportCommandToImpExpExtension.rst:46

    --exclude-disabled-records

    Feature-84718-AddCLIExportCommandToImpExpExtension.rst:47

    --exclude-html-css
  6. Alexander Nitsche uploaded patch set 7 08/14/21, 08:59

  7. Alexander Nitsche commented on patch set 7 08/14/21, 09:09

    Feature-84718-AddCLIExportCommandToImpExpExtension.rst:35 Reply Unresolved

    i would like to stick to "file.." both to align with the `impexp:import` argument and to align with the internal naming conventions. i changed it to "filename" to mark a difference to the "file" of `impexp:import` and to provide even more clarity of what is expected.

    Feature-84718-AddCLIExportCommandToImpExpExtension.rst:36 Reply

    Done

    Feature-84718-AddCLIExportCommandToImpExpExtension.rst:37 Reply

    Done

    Feature-84718-AddCLIExportCommandToImpExpExtension.rst:43 Reply

    Using "related" instead of "relative" is much better, thank you, applied. The lowerCamelCased options are in line with the `impexp:import` command. I would move the transformation to lower-cased into an own issue which will handle both commands at once and use proper deprecation.

    Feature-84718-AddCLIExportCommandToImpExpExtension.rst:46 Reply Unresolved

    Would move lowerCamelCased -> lower-cased renaming into own issue.

    Feature-84718-AddCLIExportCommandToImpExpExtension.rst:47 Reply Unresolved

    Would move lowerCamelCased -> lower-cased renaming into own issue.
  8. core-ci voted on patch set 7 V -1 08/14/21, 09:26 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15042

  9. Alexander Nitsche rebased onto patch set 8 08/14/21, 09:38

  10. core-ci voted on patch set 8 V +1 08/14/21, 10:01 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15047

  11. Benni Mack commented on patch set 8 08/14/21, 11:11

    Feature-84718-AddCLIExportCommandToImpExpExtension.rst:43 Reply

    Alright. Fine by me!
  12. Alexander Nitsche rebased onto patch set 9 08/15/21, 14:20

  13. core-ci voted on patch set 9 V +1 08/15/21, 14:32 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15118

  14. Alexander Nitsche commented on patch set 9 08/15/21, 14:37

    Feature-84718-AddCLIExportCommandToImpExpExtension.rst:43 Reply

    The lowerCamelCased options get marked deprecated and replaced by lower-cased options in this follow-up patch https://review.typo3.org/c/Packages/TYPO3.CMS/+/70599.
  15. Benni Mack voted on patch set 9 CR +1 08/16/21, 09:09

  16. Wouter Wolters voted on patch set 9 CR +1 08/19/21, 12:21

  17. Oli Bartsch commented on patch set 9 08/20/21, 11:22

    With following arguments/options: $ bin/typo3 impexp:export custom-name --type t3d --pid 411 --levels 999 I get: Uncaught TYPO3 Exception Call to a member function getAttribute() on null thrown in file /var/www/html/typo3/sysext/backend/Classes/Tree/View/AbstractTreeView.php in line 180 Reason seems to be the initialization of ExportPageTreeView which extends AbstractTreeView which calls $GLOBALS['TYPO3_REQUEST'] in its constructor.
  18. Alexander Nitsche commented on patch set 9 08/20/21, 16:18

    Reply

    This seems to be a regression introduced in #93158. If i revert the change of that patch in AbstractTreeView, the CLI command runs smoothly again (for an existing PID). How should we proceed here?
  19. Oli Bartsch commented on patch set 9 08/20/21, 16:34

    Reply

    Nice this was my patch ;) Seems I wasn't aware AbstractTreeView is used in CLI context. Will make a follow up patch.
  20. Oli Bartsch commented on patch set 9 08/20/21, 17:07

  21. Alexander Nitsche commented on patch set 9 08/23/21, 15:01

    Reply Unresolved

    The related patch #94947 got resolved and merged into master. this patch has been tested already with #94947 manually. Is anything left to merge this patch into master?
  22. Christian Kuhn voted on patch set 9 V +1 CR +1 08/23/21, 15:40

  23. Benni Mack voted on patch set 9 V +2 CR +2 08/23/21, 15:59

  24. Oli Bartsch voted on patch set 9 V +1 CR +1 08/23/21, 16:00

  25. Benni Mack merged patch set 10 08/23/21, 16:16