Skip to content

Fix the CSS file-scheme import test on Windows - #1550

Merged
LukeTowers merged 1 commit into
developfrom
fix/css-import-test-windows
Sep 26, 2026
Merged

LukeTowers merged 1 commit into
developfrom
fix/css-import-test-windows

Conversation

@LukeTowers

@LukeTowers LukeTowers commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #1549, whose CombineAssetsTest::testCssImportFilterBlocksFileSchemeImport errors on every windows-latest job:

ErrorException: Undefined array key 1
vendor/assetic/framework/src/Assetic/Filter/CssImportFilter.php:158

The test's fixture built the import target as file:// + the temp file path, which on Windows is file://D:\a\.... Before the import validator runs, Assetic's CssImportFilter splits a scheme:// target on / to find its host and path, and a backslashed path has no / to split on.

The fixture now writes the path with forward slashes, which is also the valid form of a file:// URL on Windows. It's a test-only change; the Ubuntu jobs were unaffected.

Summary by CodeRabbit

  • Bug Fixes
    • Improved CSS import handling for secret file paths that use platform-specific path separators.

The fixture built `file://D:\...` from a backslashed temp path. Assetic splits a `scheme://` import on `/` to find its host and path before the import validator runs, so on Windows it raised "Undefined array key 1" instead of reaching the validator. The fixture now uses forward slashes, which is also the valid form for a file URL.
@coderabbitai

coderabbitai Bot commented Sep 26, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: ab77b575-eb97-425a-b87d-13579312a70b

📥 Commits

Reviewing files that changed from the base of the PR and between e727c99 and 5c24542.

📒 Files selected for processing (1)
  • modules/system/tests/classes/CombineAssetsTest.php
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@LukeTowers
LukeTowers merged commit 84c6857 into develop Sep 26, 2026
16 of 17 checks passed
@LukeTowers LukeTowers added this to the v1.2.15 milestone Sep 26, 2026
@LukeTowers
LukeTowers deleted the fix/css-import-test-windows branch September 26, 2026 02:48
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.

1 participant