Review main Merged

75737[TASK] Revamp Constant Editor

Christian Kuhn CR +2 V +2 Nightmare +3319 −2725 updated 09/16/22, 19:12

Commit message

The patch rewrites TypoScript related code that uses
the comment based TypoScript configuration magic towards
the new parser: Most notably the Template "Constant Editor"
and the install tool extension configuration settings.

On a parser level, these parts are established: The
LosslessTokenizer already creates line objects for
comments, so nothing has to happen here. The AstBuilder
however simply ignores comment lines. This is kept for
performance reasons in the frontend. Instead, the second
CommentAwareAstBuilder is established which attaches
comment lines to nodes. A dedicated include tree visitor
is used to feed this builder. With comments being attached
to AST, an AST visitor is used to parse comments for these
nasty category, sub catogory and type details. It creates
a structure that can be used for rendering easily.

The main part of the patch are usages of this structure:
The ext:tstemplate ConstantEditorController is a full rework,
the InfoModifyController is modernized along the way, and the
Template Analyzer now shows comments (again).
The ext:install 'extension configuration' gets a rework
that uses the AST builder comment visitor as well. Other
than that, it does not share code with the constant editor,
which should simplify future refactorings.
Some side code in ext:info and ext:t3editor is adapted to
further reduce usages of old TypoScript parser logic.

This dissolves a series of snafu classes:
* The awful ExtendedTemplateService is gone (yay). This
  drops a ton of state and a huge amount of HTML creation
  within PHP classes.
* The TypoScriptsConstantsViewHelper is turned into
  fluid templating, it has been used by ext:install only.
* ext:core ConstantConfigurationParser is basically the
  new AST visitor.
* ext:install ExtensionConfigurationService is simplified
  and inlined to SettingsController.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 2

Files 53

Show 33 more files