Review main Merged

77369[TASK] Streamline TypoScript IncludeTree logic

Christian Kuhn CR +2 V +2 Hard +269 −258 updated 01/16/23, 09:32

Commit message

The patch comes with a couple of changes for
the TypoScript IncludeTree construct:

* Identifiers are now unique within a tree. This
  is needed especially in the Backend
  TypoScript -> Included Template files rendering:
  Before, showing content of single segments did
  not work due to duplicate identifiers.

* getIdentifier() is hardened to throw an
  exception if not initialized: This detail is
  only needed for non-cache analysis purposes and
  identifiers don't exist when getting trees from cache
  in Frontend.

* To allow file includes relative to a parent file
  include, they now have a "path" property that is
  properly hand over to child includes. Relative
  child includes now work with include_static
  sys_template includes as well.

* RootInclude now has an identifier as well to
  seed child includes which include the parent
  identifier in their hash.

* Identifier hashes and cache identifiers are built
  with fast xxh3 hash in favor of sha1() and
  json_encode() is used in favor of serialize()
  when hashing structures, if possible.

* Identifier hashes are created in the setter
  instead of calling hash() in the caller.

* [end] and [global] lines are now parts of the
  previous condition segment and don't create
  one-line segments anymore.

* Tests are adapted to be a bit less noisy on
  properties we're not interested in by using
  another custom comparator.

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 12