Skip to content

[WIP] New Bundle directory structure #10840

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
wants to merge 7 commits into from
Closed

[WIP] New Bundle directory structure #10840

wants to merge 7 commits into from

Conversation

sadikoff
Copy link
Contributor

@sadikoff sadikoff commented Jan 3, 2019

It's been a long time since Symfony Bundles were invented, many versions of Symfony changed
and finally Symfony 4 and Flex was released. It brought us many changes in App coding style, but what about bundles? Current Bundle structure is out of date. I think it's time to move forward and update it to correspond... lets say flex way =)

Current:

<your-bundle>/
├─ AcmeBlogBundle.php
├─ Controller/
├─ README.md
├─ LICENSE
├─ Resources/
│   ├─ config/
│   ├─ doc/
│   │  └─ index.rst
│   ├─ translations/
│   ├─ views/
│   └─ public/
└─ Tests/

WIP state:

<your-bundle>/
├─ docs/
│   └─ index.rst
├─ src/
|   ├─ Controller/
|   ├─ Resources/
|   |   ├─ config/
│   |   ├─ translations/
│   |   ├─ views/
│   |   └─ public/
|   └─ AcmeBlogBundle.php
├─ tests/
├─ README.md
└─ LICENSE

Target

This is what I think it should be in final variant. I'll update this message soon with some info about changes to reach this target.

<your-bundle>/
├─ assets/
├─ config/
├─ docs/
│   └─ index.rst
├─ src/
|   ├─ Controller/
|   └─ AcmeBlogBundle.php
├─ templates/
├─ tests/
├─ translations/
├─ README.md
└─ LICENSE

@yceruto
Copy link
Member

yceruto commented Jan 3, 2019

Should this close #5691?

@javiereguiluz
Copy link
Member

@sadikoff thanks for this proposal. I agree with this -> "Current Bundle structure is out of date. I think it's time to move forward and update it to correspond... lets say flex way" However, I don't see this PR improving things much. It's just moving everything into src/ but the dir structure is not improved or updated.

What I would really like is to use the same dir structure for apps and bundles. I'd like to have assets/ in my bundle instead of src/Resources/public/, templates/ instead of src/Resources/views/, etc.

@sadikoff
Copy link
Contributor Author

sadikoff commented Jan 4, 2019

@javiereguiluz Totally agree! This is the goal of this PR, I'm collecting changes to Symfony to get everything work and this PR is first step to change whole bundle structure!

loevgaard added a commit to Setono/TagBagBundle that referenced this pull request Jan 5, 2019
@javiereguiluz
Copy link
Member

@sadikoff even if we appreciate your proposal here, I'm afraid I must close it. Symfony Docs only describe what Symfony Code does or recommends ... so we cannot change the recommended bundle dir structure from the docs.

We could create an issue with the label [RFC] in https://github.com/symfony/symfony to discuss with the community about these possible changes. I hope you understand. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants