Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(local): guess project dir based on presence of .symfony.local.yaml #551

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

jankal
Copy link

@jankal jankal commented Dec 17, 2024

Recently symfony-cli does not discover my project roots anymore - this issue is most obvious in monorepos with different projects. Thus I thought about a different way to discover the project dir.

As symfony-cli can read config from .symfony.local.yaml, we should assume the directory containing this config file to be the project directory.

@nathanheffley
Copy link

nathanheffley commented Dec 26, 2024

I just ran into an issue where I was testing out a symfony project (specifically the Docker integration with doctrine) and it wasn't working. Turned out it was because I hadn't initiated a .git repo.

I was thinking of submitting a PR so that debug mode at the very least tells you it couldn't detect a root directory and to initialize a git repository, but that feels clunky. And what if someone uses Mercurial?

I think the idea of detecting a file that is actually Symfony related makes a lot more sense.

@fabpot
Copy link
Contributor

fabpot commented Jan 1, 2025

See #555 for an alternative approach.

@ChoppyThing
Copy link

Thanks for your answer.
For now i'm just manually setting the port in the .env file.

@fabpot fabpot closed this in #555 Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants