Skip to content

[TASK] Mitigate TYPO3 v14.2 ext_emconf.php deprecation#724

Open
sbuerk wants to merge 4 commits intob13:masterfrom
sbuerk:mitigate-extemconf-deprecation
Open

[TASK] Mitigate TYPO3 v14.2 ext_emconf.php deprecation#724
sbuerk wants to merge 4 commits intob13:masterfrom
sbuerk:mitigate-extemconf-deprecation

Conversation

@sbuerk
Copy link
Copy Markdown
Contributor

@sbuerk sbuerk commented Apr 8, 2026

Overview

Note

Still failing functional tests are related to not matching
database state related to content-defender/core content
defending feature and needs to be addressed in a dedicated
pull-request. Not part of this pull-request goal.

This pull-request contains a series of changes to migitate
the ext_emconf.php deprecation added in TYPO3 14.2 and
slightly relaxed in future TYPO3 v14.3.

With 14.2 the only way would be to set the "version" in
the composer.json directly, which violates communicated
composer best-practises and the reason this has been now
releaxed in TYPO3 coming with 14.3.

A composer patcher package is now added as development
dependency, required merged TYPO3 14.3 changes added as
composer patches limited to ~14.2.0 and finally the
needed adoption applied to composer.json only workable
with TYPO3 14.3.

Important

This needs adoption in the release process of the
extension now, which could not be modified because
no release (merger) documentation has been found
in the repository. See last section of the PR for
some general hints.

Commits

  • [TASK] Add ability for composer patches for development
    From time to time it could be use-full to have the ability
    to apply composer patches on packages, for example TYPO3
    to have fixes in place before they are released.

    [!NOTE]
    Having this available in general does not hurt and has
    no impact and can also be kept if no patches are needed
    to be applied.

    This change makes this possible with following tasks:

    • 'vaimo/composer-patches' is added as development
      dependency to have it available, providing a lot
      of composer commands around applying and managing
      patches.

    • Build/Scripts/download-patch-from-gerrit.phpsh to
      have a simple tool to download gerrit changes and
      makes it available in `runTests.sh. The script splits
      them into the different patch files for each sysext
      containted in the change along with adding basic
      annotations like package name and link information.
      Changes on tests are automatically stripped because
      they are not included in composer dist archives and
      paths are also aligned to reduce required manual
      modifications.

    • Configure patches/ as folder to search for patch
      files to avoid the need to manage patch files in
      the composer.json file and reduce changes on it.

    Used command(s):

    composer config \
      "allow-plugins"."vaimo/composer-patches" true \
    && composer config \
      "extra"."patches-search" "patches/" \
    && composer require --dev \
      'vaimo/composer-patches':'^6.0.1'
  • [TASK] Allow mitigation of ext_emconf.php deprecation
    With [1] included in TYPO3 v14.2 ext_emconf.php has
    been deprecated and emits a deprecation error in case
    following criteria's are not included within the root
    composer.json file for classic-mode installations:

    • "version" must be set
    • and "extra"."typo3/cms"."Package"."providesPackages"
      must at least exists.

    Having a "version" in the "composer.json" file is not
    best-practice in the composer world in case that the
    package is published on packagist.org or similar
    composer package registries [2]:

    Note: Packagist uses VCS repositories, so the statement
    above is very much true for Packagist as well. Specifying
    the version yourself will most likely end up creating
    problems at some point due to human error.
    

    This has been discussed and relaxed with [3] introducing
    "extra"."typo3/cms"."version" as mitigation strategy
    for extension development.

    To get functional tests green for TYPO3 14.2 the related
    change is now added as composer patch along with required
    pre-changes, restricted to ~14.2.0 only. The can be
    removed as soon as 14.3 (LTS) is released and testing
    against 14.2 is not required anymore.

    • Download gerrit changes using downloadGerritPatch.

    • Restrict to ~14.2.0 manually editing the patch
      files.

    • Use @after to ensure correct order of related changes
      and avoid apply issues.

    [!NOTE]
    Required changes to composer.json using the relaxed
    variant will be done with follup change to have them
    separated from introducing these TYPO3 composer patches
    allow simply reverting this change at a later point.

    Used command(s):

    Build/Scripts/runTests.sh -s downloadGerritPatch 93530 \
    && Build/Scripts/runTests.sh -s downloadGerritPatch 93484 \
    && Build/Scripts/runTests.sh -s downloadGerritPatch 93536

    [1] https://review.typo3.org/c/Packages/TYPO3.CMS/+/91908
    [2] https://getcomposer.org/doc/04-schema.md#version
    [3] https://review.typo3.org/c/Packages/TYPO3.CMS/+/93536

  • [TASK] Mitigate ext_emconf.php deprecation
    This change sets following missing composer values
    to mitigate the ext_emconf.php deprecation message
    in functional tests (hard failing) and also in real
    classic mode instances:

    • Set current development version 3.2.4-dev
      as "extra"."typo3/cms"."version". [1]

    • Add "extra"."typo3/cms"."Package"."providesPackages" [1]

    • ext_emconf.php version is set to next patchlevel
      version. [1]

    • Publish GitHub action workflow is modified to ensure
      that tag version is set in composer.json, which is
      a must requirement. [1]

    • Combine title and description with - separator
      and set it as composer.json description. [2]

    [!NOTE]
    Version to set has been derieved by looking up the
    latest tagged/released version and raised on patch
    level.

    [!IMPORTANT]
    This requires adoption for a release process to set the
    version as pre-change (1.), doing the release (2.) and
    setting next development version (3.) again, which can't
    be updated with this change as there is no documentation
    for it included in the repository.

    Used command(s):

    composer config "extra"."typo3/cms"."version" "3.2.4-dev" \
    && composer config \
      "extra"."typo3/cms"."Package" '{}' \
    && composer config \
      --json "extra"."typo3/cms"."Package" '{"providesPackages": {}}' \
    && composer config "description" \
        "Container Content Elements - Create Custom Container Content Elements for TYPO3"

    [1] https://review.typo3.org/c/Packages/TYPO3.CMS/+/93536
    [2] https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/14.0/Breaking-108304-PopulateExtensionTitleFromComposerJson.html

  • [TASK] Update TYPO3 version constraints

    This change updates the used TYPO3 v14 constraints
    to support and test against:

    • TYPO3 v13.4 -> latest released patchlevel version
      for minor version (feature freeze)
    • TYPO3 v14.2 -> latest released patchlevel version
      for minor version (feature freeze)
    • TYPO3 v14.3 -> current development (main branch)
      and automatically switching to LTS patchlevel
      version once 14.3.0 LTS release has been released.

    Handling in Build/Scripts/runTests.sh is aligned
    to test 14.2 and 14.3-dev and drop testing against
    and support for 14.1.

    Used command(s):

    composer config sort-packages true \
    && composer require --dev --no-update \
      "typo3/cms-install":"^13.4 || ^14.2 || 14.3.*@dev" \
      "typo3/cms-fluid-styled-content":"^13.4 || ^14.2 || 14.3.*@dev" \
      "typo3/cms-info":"^13.4 || ^14.2 || 14.3.*@dev" \
      "typo3/cms-workspaces":"^13.4 || ^14.2 || 14.3.*@dev" \
      "typo3/testing-framework":"^9.5"

Extension release process

Commonly a release needs to be prepared, for example setting version
for the rendered documentation, ext_emconf and similar and tailor
is used for this task.

This can be in different ways and is also related to working style and
repository permission and settings. Assuming that the Releaser has
the permission to push commits directly on the main branch the three
step release can be done with a singe command chain, but splitted up
into dedicated parts, for example using pull-requests and waiting for
tests to pass.

Simple one-command chain example

This assumes that tailor is available globally and also that
composer is globally available. Otherwise can be adjusted using
variables at the beginning of the script.

Also ensure to adjust following variables:

  • RELEASE_BRANCH
  • RELEASE_VERSION
  • NEXT_DEV_VERSION
echo '>> Release extension' ; \
  BIN_TAILOR="$( which tailor )" \
  BIN_COMPOSER="$( which composer )" \
  RELEASE_BRANCH='main' ; \
  RELEASE_VERSION='3.3.8' ; \
  NEXT_DEV_VERSION='3.3.9' ; \
  git checkout main && \
  git fetch --all && \
  git pull --rebase && \
  git checkout ${RELEASE_BRANCH} && \
  git pull --rebase && \
  echo ">> Prepare release commit for ${RELEASE_VERSION}" && \
  ${BIN_TAILOR} set-version ${RELEASE_VERSION} && \
  ${BIN_COMPOSER} config "extra"."typo3/cms"."version" "${RELEASE_VERSION}" && \
  sed -i "s/^COMPOSER_ROOT_VERSION.*/COMPOSER_ROOT_VERSION=\"${RELEASE_VERSION}\"/" Build/Scripts/runTests.sh && \
  git add . && \
  git commit -m "[RELEASE] ${RELEASE_VERSION}" && \
  echo ">> Tag and push commit and tags ${RELEASE_VERSION}" && \
  git tag ${RELEASE_VERSION} \
  git push && \
  git push --tags && \
  echo ">> Prepare set dev version commit for ${NEXT_DEV_VERSION}-dev" && \
  ${BIN_TAILOR} set-version ${NEXT_DEV_VERSION} && \
  ${BIN_COMPOSER} config "extra"."typo3/cms"."version" "${NEXT_DEV_VERSION}-dev" && \
  sed -i "s/^COMPOSER_ROOT_VERSION.*/COMPOSER_ROOT_VERSION=\"${NEXT_DEV_VERSION}-dev\"/" Build/Scripts/runTests.sh && \
  git add . && \
  git commit -m "[TASK] Set dev version ${NEXT_DEV_VERSION}" && \
  echo ">> Push set dev version commit" && \
  git push

sbuerk added 4 commits April 8, 2026 12:52
From time to time it could be use-full to have the ability
to apply composer patches on packages, for example TYPO3
to have fixes in place before they are released.

> [!NOTE]
> Having this available in general does not hurt and has
> no impact and can also be kept if no patches are needed
> to be applied.

This change makes this possible with following tasks:

* 'vaimo/composer-patches' is added as development
  dependency to have it available, providing a lot
  of composer commands around applying and managing
  patches.

* `Build/Scripts/download-patch-from-gerrit.phpsh` to
  have a simple tool to download gerrit changes and
  makes it available in `runTests.sh. The script splits
  them into the different patch files for each sysext
  containted in the change along with adding basic
  annotations like package name and link information.
  Changes on tests are automatically stripped because
  they are not included in composer dist archives and
  paths are also aligned to reduce required manual
  modifications.

* Configure `patches/` as folder to search for patch
  files to avoid the need to manage patch files in
  the composer.json file and reduce changes on it.

Used command(s):

```bash
composer config \
  "allow-plugins"."vaimo/composer-patches" true \
&& composer config \
  "extra"."patches-search" "patches/" \
&& composer require --dev \
  'vaimo/composer-patches':'^6.0.1'
```
With [1] included in TYPO3 v14.2 `ext_emconf.php` has
been deprecated and emits a deprecation error in case
following criteria's are not included within the root
`composer.json` file for classic-mode installations:

* "version" must be set
* and "extra"."typo3/cms"."Package"."providesPackages"
  must at least exists.

Having a "version" in the "composer.json" file is not
best-practice in the composer world in case that the
package is published on `packagist.org` or similar
composer package registries [2]:

```
Note: Packagist uses VCS repositories, so the statement
above is very much true for Packagist as well. Specifying
the version yourself will most likely end up creating
problems at some point due to human error.
```

This has been discussed and relaxed with [3] introducing
`"extra"."typo3/cms"."version"` as mitigation strategy
for extension development.

To get functional tests green for TYPO3 14.2 the related
change is now added as composer patch along with required
pre-changes, restricted to `~14.2.0` only. The can be
removed as soon as 14.3 (LTS) is released and testing
against 14.2 is not required anymore.

* Download gerrit changes using `downloadGerritPatch`.

* Restrict to `~14.2.0` manually editing the patch
  files.

* Use `@after` to ensure correct order of related changes
  and avoid apply issues.

> [!NOTE]
> Required changes to `composer.json` using the relaxed
> variant will be done with follup change to have them
> separated from introducing these TYPO3 composer patches
> allow simply reverting this change at a later point.

Used command(s):

```bash
Build/Scripts/runTests.sh -s downloadGerritPatch 93530 \
&& Build/Scripts/runTests.sh -s downloadGerritPatch 93484 \
&& Build/Scripts/runTests.sh -s downloadGerritPatch 93536
```

[1] https://review.typo3.org/c/Packages/TYPO3.CMS/+/91908
[2] https://getcomposer.org/doc/04-schema.md#version
[3] https://review.typo3.org/c/Packages/TYPO3.CMS/+/93536
This change sets following missing `composer` values
to mitigate the `ext_emconf.php` deprecation message
in functional tests (hard failing)  and also in real
classic mode instances:

* Set current development version `3.2.4-dev`
  as `"extra"."typo3/cms"."version"`. [1]

* Add `"extra"."typo3/cms"."Package"."providesPackages"` [1]

* `ext_emconf.php` version is set to next patchlevel
  version. [1]

* Publish GitHub action workflow is modified to ensure
  that tag version is set in `composer.json`, which is
  a must requirement. [1]

* Combine `title` and `description` with ` - ` separator
  and set it as `composer.json` description. [2]

> [!NOTE]
> Version to set has been derieved by looking up the
> latest tagged/released version and raised on patch
> level.

> [!IMPORTANT]
> This requires adoption for a release process to set the
> version as pre-change (1.), doing the release (2.) and
> setting next development version (3.) again, which can't
> be updated with this change as there is no documentation
> for it included in the repository.

Used command(s):

```bash
composer config "extra"."typo3/cms"."version" "3.2.4-dev" \
&& composer config \
  "extra"."typo3/cms"."Package" '{}' \
&& composer config \
  --json "extra"."typo3/cms"."Package" '{"providesPackages": {}}' \
&& composer config "description" \
    "Container Content Elements - Create Custom Container Content Elements for TYPO3"
```

[1] https://review.typo3.org/c/Packages/TYPO3.CMS/+/93536
[2] https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/14.0/Breaking-108304-PopulateExtensionTitleFromComposerJson.html
This change updates the used TYPO3 v14 constraints
to support and test against:

* TYPO3 v13.4 -> latest released patchlevel version
  for minor version (feature freeze)
* TYPO3 v14.2 -> latest released patchlevel version
  for minor version (feature freeze)
* TYPO3 v14.3 -> current development (main branch)
  and automatically switching to LTS patchlevel
  version once 14.3.0 LTS release has been released.

Handling in `Build/Scripts/runTests.sh` is aligned
to test 14.2 and 14.3-dev and drop testing against
and support for 14.1.

Used command(s):

```bash
composer config sort-packages true \
&& composer require --dev --no-update \
  "typo3/cms-install":"^13.4 || ^14.2 || 14.3.*@dev" \
  "typo3/cms-fluid-styled-content":"^13.4 || ^14.2 || 14.3.*@dev" \
  "typo3/cms-info":"^13.4 || ^14.2 || 14.3.*@dev" \
  "typo3/cms-workspaces":"^13.4 || ^14.2 || 14.3.*@dev" \
  "typo3/testing-framework":"^9.5"
```
@sbuerk sbuerk force-pushed the mitigate-extemconf-deprecation branch from f469151 to d796fea Compare April 8, 2026 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant