Skip to content

feat: prefix registered icon identifier with extension key#23

Merged
schloram merged 2 commits intomainfrom
prefix-registered-icon
Apr 8, 2026
Merged

feat: prefix registered icon identifier with extension key#23
schloram merged 2 commits intomainfrom
prefix-registered-icon

Conversation

@schloram
Copy link
Copy Markdown
Member

@schloram schloram commented Oct 13, 2023

Icon identifiers auto-generated by IconRegistrationUtility::convertFilenameToIdentifier() lacked an extension-specific prefix, risking collisions with icons from other extensions. The prefix was also hardcoded, drifting risk from the actual extension key.

Changes

  • Type safety: convertFilenameToIdentifier() now declares string $filenameOrPath): string — PHPDoc updated to match
  • Dynamic prefix: Prefix derived from ExtensionConfigurationUtility::EXTKEY at runtime instead of hardcoded 'tx-flexiblepages-':
    $prefix = 'tx-' . str_replace('_', '', ExtensionConfigurationUtility::EXTKEY) . '-';
    // e.g. 'flexible_pages' → 'tx-flexiblepages-'
  • Tests: Updated assertions in IconConfigurationTest and IconSetConfigurationTest from 'icon-111' to 'tx-flexiblepages-icon-111'

@schloram schloram requested a review from Copilot April 8, 2026 09:46
@schloram schloram marked this pull request as ready for review April 8, 2026 09:47
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates auto-generated TYPO3 icon identifiers to include an extension-specific prefix to reduce collisions with other extensions’ icons.

Changes:

  • Prefixes identifiers generated by IconRegistrationUtility::convertFilenameToIdentifier() with tx-flexiblepages-.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Classes/Utilities/IconRegistrationUtility.php Outdated
Comment thread Classes/Utilities/IconRegistrationUtility.php Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@schloram schloram merged commit 9c5398a into main Apr 8, 2026
4 checks passed
@schloram schloram deleted the prefix-registered-icon branch April 8, 2026 10:07
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.

3 participants