Review main Merged

61625[BUGFIX] Hash extension versions into requireJS bust parameter

Benjamin Franzke CR +2 V +2 Easy +20 −16 updated 09/06/19, 11:41

Commit message

When a third party extension that contains a requireJS backend module is
updated, the cache bust parameter needs to be updated as well, otherwise
browsers would not download the updated asset.

We will now include all extensions that contain requireJS modules into the
requireJS bust parameter hash calculation (by extension name and version).
That means an extension update of these extensions will trigger a new
bust parameter.

This has the slight drawback that the requireJS bust parameter will need
to be re-calculated after every extension update of such extensions, but
that's actually limited to extensions that provide requireJS modules, and
better than no asset updates at all.

This patch uses the PackageManager instead of ExtensionManagementUtility
to get access to the package version using the PackageInterface. Having
the full package array available we can also drop the
GeneralUtility::getFileAbsFilename('EXT:…') indirection which ends up
calling PackageManager anyway (only with added string parsing overhead).

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 1

Files 1