Skip to content
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

Introduce config option for root directory #243

Closed
simshaun opened this issue Dec 13, 2017 · 3 comments
Closed

Introduce config option for root directory #243

simshaun opened this issue Dec 13, 2017 · 3 comments

Comments

@simshaun
Copy link
Contributor

This is a continuation of #236 -- there are still many instances of getcwd().

They all assume that the file/dir paths they need are relative to the dir composer is executed from. For my personal needs that's fine, but I'm wondering if some people could need that to be configurable.

For that, I think a new config option (e.g. something like root-dir) would need to be introduced.

Thoughts? I will open a PR if this is something others are interested in.

@fabschurt
Copy link

fabschurt commented Jul 14, 2018

@simshaun I so do agree with this feature request! The new SF 4 project structure is great, but I’m currently a bit annoyed by the fact that Flex can’t support another «Symfony root». I generally design my projects with the help of the Hexagonal/Clean architecture, so everything Symfony-related is generally stored into src/Symfony/ and not directly into src/, so every time some file/directory is created via a Flex recipe, I have to manually move it to the right destination.

As a side note, I have the same problem with the make:controller console command from the MakerBundle for example: it will create the new controller in src/Controller/ with an App\Controller namespace, whereas I would like it to be in src/Symfony/Controller/ with the App\Symfony\Controller namespace. I’m not sure how much this is related to our main issue here, maybe not that much.

Anyway, I’m willing to help if this becomes green-lighted by the community!

@melbings
Copy link

melbings commented Dec 6, 2018

@simshaun I agree as well. I am introducing Symfony 4 into a legacy application, moving old source code to the new environment bit by bit, having Symfony installed unter /symfony while composer.json is still located in the root directory.

@nicolas-grekas
Copy link
Member

Implemented in #448

nicolas-grekas added a commit that referenced this issue Dec 19, 2018
…mfony app (nicolas-grekas)

This PR was merged into the 1.1-dev branch.

Discussion
----------

 Allow configuring the "extra.symfony.root-dir" of the Symfony app

Fixes #243
and makes path management a bit more flexible.

Commits
-------

186bee1 Allow configuring the "extra.symfony.root-dir" of the Symfony app
tgalopin pushed a commit to tgalopin/flex that referenced this issue Dec 3, 2020
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

No branches or pull requests

4 participants