Skip to content

[Icons] Add support for icon aliases during icon:lock command #2354

@jvancoillie

Description

@jvancoillie

Context

Currently, the IconFinder only scans templates to identify used icons, using the following regex:

$token = '[a-z0-9]+(?:-[a-z0-9]+)*';
$pattern = "#(?:'$token:$token')|(?:\"$token:$token\")#i";

This approach means that only icons directly referenced in templates are locked when running the icon:lock command.

Problem

Some icons are defined as aliases in the ux_icons configuration file. These aliased icons are not detected by IconFinder and therefore are not locked automatically, which can lead to inconsistencies during deployment.

Request

Would it be possible to add support for scanning icon aliases defined in the ux_icons file, in addition to using the regex to search templates? This enhancement would ensure that all icons actually used in the application are properly locked.

Metadata

Metadata

Assignees

No one assigned

    Labels

    IconsRFCRFC = Request For Comments (proposals about features that you want to be discussed)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions