Draft: Issue #3579927: Allow IconFinder to read Windows local SVG paths
Related issue
Summary
This fixes a Windows-specific path handling bug in the Icon API that can cause Navigation SVG icons to disappear from the DOM on local environments.
Root cause
IconFinder::getFileContents() rejects anything parse_url() treats as a URL. On Windows, local drive-letter paths like C:/path/to/icon.svg are parsed as having a scheme (C), so valid local SVG files are incorrectly rejected as remote.
Changes
- Allow Windows drive-letter paths to be treated as local files in
IconFinder::getFileContents(). - Add regression coverage for Windows-style local paths.
Verification
- Added unit test coverage in
IconFinderTest. -
php -lpassed on changed files. - MR pipeline passed.
Edited by Sapnil Biswas