Skip to content

[TASK] Make EXT:install an optional dependency#4676

Open
wazum wants to merge 1 commit into
TYPO3-Solr:mainfrom
wazum:task/make-cms-install-optional
Open

[TASK] Make EXT:install an optional dependency#4676
wazum wants to merge 1 commit into
TYPO3-Solr:mainfrom
wazum:task/make-cms-install-optional

Conversation

@wazum

@wazum wazum commented Jun 3, 2026

Copy link
Copy Markdown

Problem

typo3/cms-install became a hard runtime requirement in v14. It was added together with the list_typeCType upgrade wizard SolrSearchCTypeMigration, which extends AbstractListTypeToCTypeUpdate from EXT:install. Because the wizard is autowired via Configuration/Services.yaml (../Classes/Updates/*), the DI container reflects on the class during compilation and fails with a class not found fatal when EXT:install is absent.

This forces EXT:install into every installation, which breaks hardened production setups that deliberately remove EXT:install.

Change

  • Move typo3/cms-install out of require into require-dev (so CI/tests keep it) and add a suggest entry.
  • Exclude ../Classes/Updates/* from the autowiring glob in Services.yaml.
  • Add Configuration/Services.php that registers the upgrade wizard only when AbstractListTypeToCTypeUpdate exists. Core loads both Services.php and Services.yaml (see ContainerBuilder), so the regular service definitions are unaffected.

The upgrade wizard remains fully functional wherever EXT:install is present (which is required to run wizards anyway). When EXT:install is absent, the container builds cleanly and the wizard is simply skipped.

Testing

CI quality stages run locally, all green:

  • php-cs-fixer (CGL dry-run) — clean
  • xml-lint — no errors
  • phpstan — no errors
  • unit tests — 954 OK
  • composer validate — schema valid

DI container build verified with EXT:install present (typo3 upgrade:list compiles the container without errors).

No test added: the regression that matters (container builds when EXT:install is absent) is not reproducible in the test harness, since typo3/cms-install is always present in vendor via require-dev, and the repo has no existing upgrade-wizard/DI-registration tests to follow.

@dkd-kaehm dkd-kaehm left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for resolving and remove hard dependency.

The list_type to CType upgrade wizard (SolrSearchCTypeMigration)
extends AbstractListTypeToCTypeUpdate from EXT:install, which forced
typo3/cms-install into the runtime requirements. This prevented
hardened setups that remove EXT:install in production from using
EXT:solr.

Move typo3/cms-install to require-dev/suggest and register the
upgrade wizard conditionally in Services.php only when the base
class is available, so the DI container still builds when
EXT:install is absent.
@dkd-kaehm
dkd-kaehm force-pushed the task/make-cms-install-optional branch from d5337c4 to d06f8d0 Compare June 17, 2026 03:50
@dkd-kaehm
dkd-kaehm force-pushed the main branch 4 times, most recently from 0c90549 to 365cf5c Compare June 17, 2026 07:09
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.

2 participants