Skip to content

Fixing problem where rootDir is ".", which strips all dots from the filename#987

Merged
fabpot merged 1 commit intosymfony:1.xfrom
weaverryan:recipe-update-docker-compose-filename-dots
Aug 2, 2023
Merged

Fixing problem where rootDir is ".", which strips all dots from the filename#987
fabpot merged 1 commit intosymfony:1.xfrom
weaverryan:recipe-update-docker-compose-filename-dots

Conversation

@weaverryan
Copy link
Copy Markdown
Contributor

Fixes symfony/recipes#1120

In a normal siutation, $rootDir is .. The intention of this code is to strip the "rootDir" from the START of the $file path, so that we are left with only the relative path. The . + str_replace() was too greedy, and was causing things like docker-composeryaml.

The test uses an absolute root dir, and replicating the . would be tricky. But I tested this locally and the fix works.

Cheers!

@fabpot
Copy link
Copy Markdown
Member

fabpot commented Aug 2, 2023

Thank you @weaverryan.

@fabpot fabpot merged commit 039bb47 into symfony:1.x Aug 2, 2023
@weaverryan weaverryan deleted the recipe-update-docker-compose-filename-dots branch August 2, 2023 13:58
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.

2 participants