Windows checkout fails on tests/fixtures/env/nul.env in v5.7.0
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- git, php
- Domain
- build-system
Research direction
Start with the tests/fixtures/env/nul.env fixture introduced in v5.7.0 and check how it is referenced by the test suite. Reproduce the source installation with composer update on Windows, then verify that the package can be checked out successfully without losing the fixture coverage.
Written by the indexing model from the issue text.
Description
Description
On Windows, Composer fails while installing vlucas/phpdotenv v5.7.0 from source. Git cannot check out the test fixture tests/fixtures/env/nul.env because NUL is a reserved Windows device name.
The file was added in v5.7.0: tests/fixtures/env/nul.env.
Steps to reproduce
Run composer update on Windows in a project that resolves vlucas/phpdotenv to v5.7.0.
Composer attempts to check out the package from source.
Actual result
Git checkout fails with:
error: invalid path 'tests/fixtures/env/nul.env'
Composer then reports that it failed to execute the Git checkout/reset for the package.
Expected result
Composer should be able to install the package on Windows, or the fixture should be named/stored in a way that does not prevent Windows checkouts.
Environment
OS: Windows Microsoft Windows 11 Pro, 10.0.26200 Build 26200
Composer version: 2.8.9 2025-05-13 14:01:37
PHP version: 8.4.7
phpdotenv: v5.7.0 (301c07936b16d88628b126b01d082ba153cf4c40)
Workaround
On Windows with Composer 2.10.3, composer install --prefer-dist completed successfully. It installed vlucas/phpdotenv v5.7.0 by extracting the distribution archive, avoiding the Git source checkout that fails on tests/fixtures/env/nul.env.
- Dominant language
- PHP
- Stars
- 13.5k
- Forks
- 666
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from vlucas/phpdotenv
-
Validator::isBoolean() accepts whitespace-only valuesMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Unterminated double-quoted value at end of input is silently droppedPossibly taken @YoussefMansour9 claimed this 29 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
All issues in vlucas/phpdotenv
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Featured image not passed to checks in the Tasks column or publish blocksPossibly taken @roborourke claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
humanmade/publication-checklist#100 ·
Maintainers usually reply within 1 day
-
bug customer-reported
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
MagnaCapax/PMSS#1072 ·
Maintainers usually reply within 5 days
-
Difficulty 2/5 Half a day Newbie friendliness 68/100
components-web-app/docs#244 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
getgrav/grav-plugin-api#60 ·