tailor icon indicating copy to clipboard operation
tailor copied to clipboard

[TASK] Prioritize composer.json over environment variable for extension key

Open CybotTM opened this issue 3 months ago • 0 comments

Summary

This PR changes the extension key resolution order to prioritize composer.json over the TYPO3_EXTENSION_KEY environment variable.

New precedence:

  1. CLI argument (highest priority)
  2. composer.json at [extra][typo3/cms][extension-key] (recommended)
  3. TYPO3_EXTENSION_KEY environment variable (deprecated, BC only)

Changes

  • CommandHelper.php: Reordered resolution logic, added deprecation warning when using env var
  • README.md: Updated documentation and CI examples to reflect new approach
  • .env.dist: Removed TYPO3_EXTENSION_KEY (new setups should use composer.json)
  • Tests: Updated to verify deprecation warning is triggered

Why?

  1. Single source of truth: Extension key belongs in composer.json alongside other extension metadata
  2. CI log masking issue: When TYPO3_EXTENSION_KEY is configured as a secret, error messages get masked (e.g. "Could not publish extension ***"), hiding valuable information in error reports

Backwards Compatibility

The environment variable still works for existing setups but triggers a deprecation warning encouraging migration to composer.json.

Resolves: #88

CybotTM avatar Nov 28 '25 22:11 CybotTM