Skip to content

fix(core): properly check paths during config loading on Windows#2091

Merged
brendt merged 1 commit intotempestphp:3.xfrom
xHeaven:config-loading
Mar 31, 2026
Merged

fix(core): properly check paths during config loading on Windows#2091
brendt merged 1 commit intotempestphp:3.xfrom
xHeaven:config-loading

Conversation

@xHeaven
Copy link
Copy Markdown
Member

@xHeaven xHeaven commented Mar 30, 2026

PR #1535 changed the vendor path check from /vendor/ to DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR to fix Windows discovery.

Later, PR #1954 added Path\normalize to scan(), which converts all paths to forward slashes. This made the DIRECTORY_SEPARATOR check never match on Windows (it looks for \vendor\ in forward-slash paths), so vendor configs get the same priority as user configs and overwrite them via strcmp ordering.

Fixes #1982.

@xHeaven xHeaven requested a review from brendt as a code owner March 30, 2026 16:36
@github-actions
Copy link
Copy Markdown

Benchmark Results

Comparison of config-loading against 3.x (ba925951610e8987599a77663e7d8e779b8af89d).

Open to see the benchmark results

No benchmark changes above ±5%.

Generated by phpbench against commit e67d605

@NeoIsRecursive
Copy link
Copy Markdown
Contributor

Im thinking there should be a test for this so there isnt any regressions again. (I dont use Windows anymore, otherwise id try to help with it 😅)

slightly unrelated but the path normalizations should probably be highlighted more in the docs, so people dont use the php constants etc?

@innocenzi innocenzi changed the title fix(core): fix config loading priority on Windows fix(core): properly check paths during config loading on Windows Mar 30, 2026
@brendt brendt merged commit e71f2b3 into tempestphp:3.x Mar 31, 2026
78 checks passed
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.

Database Configuration Discovery Issue

4 participants