Skip to content

Add documentation for using Symfony without bundles. #5535

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
5 tasks
nesl247 opened this issue Jul 16, 2015 · 10 comments
Closed
5 tasks

Add documentation for using Symfony without bundles. #5535

nesl247 opened this issue Jul 16, 2015 · 10 comments

Comments

@nesl247
Copy link
Contributor

nesl247 commented Jul 16, 2015

A bundle is supposed to be a reusable set of code, which means that AppBundle for instance, is unneeded. It's becoming more and more popular to go "bundleless", and thus we should have documentation on how to do this.

I'm going to try and write this documentation per discussions with @weaverryan. It seems to be something that other people are interested in.

To Do:

  • Placement of twig templates
  • Configuration for entities
  • Configuration of routes
  • Recommendations on how to use src/
  • Placement of DataFixtures and the parameter to run it (--fixtures=app/DataFixtures/ORM)
@dupuchba
Copy link

Here is my opinion :
As a sf user, I don't get the point to use The Fullstack Framework if I don't use other 3rd party Bundle.
If I want to go bundleless, I would prefer use components IPO

@xabbuh
Copy link
Member

xabbuh commented Jul 19, 2015

@dupuchba Imho the point is more to explain how you can write your application without the need to create an application bundle (actually, there is no need to create a bundle for your application code and bundles just make it easier to publish code that could be reused in other applications).

@dupuchba
Copy link

@xabbuh ok, I didn't get it that way. Now it make more sense :-)

@linaori
Copy link
Contributor

linaori commented Jul 20, 2015

@nesl247 A few other important parts are:

  • The configuration of the autoloading in app/
  • Custom service loading, when your app grows a single services.yml is not sufficient anymore
  • Translations loading
  • Explaining the difference between app/config/ and app/Resources/config/

@stof
Copy link
Member

stof commented Aug 1, 2015

@iltar the configuration of autoloading is not related to bundles. It is just using Composer features directly.
Regarding services.yml, you can just split it in multiple files and import all of them (services.yml is just a file imported this way in the app skeleton)

@stof
Copy link
Member

stof commented Aug 1, 2015

and for translations, if you follow the best practices, they are already placed in app/Resources/translations, meaning there is no change needed to go bundleless.

@linaori
Copy link
Contributor

linaori commented Aug 1, 2015

@stof correct, but composer.json will require an additional autoload rule for app/* which has to be added somewhere (docs, standard edition etc.).

@nesl247
Copy link
Contributor Author

nesl247 commented Aug 1, 2015

What's in app/* that needs to be autoloaded? I wasn't planning on writing docs recommending using app/* at all for your source code, just translations, twig, etc. I was going to write this using src/<Project>. I've got nothing in my composer.json mentioning app/* and I've been running bundleless for a couple of months.

@linaori
Copy link
Contributor

linaori commented Aug 1, 2015

That works too.

@javiereguiluz
Copy link
Member

I'm closing this old issue because with Symfony Flex, we'll no longer have bundles for our own code starting from Symfony 4.0. So, this proposal to add just an article explaining how to get rid of app bundles won't be needed ... because we'll update the entire docs to get rid of those bundles. Thanks!

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

6 participants