Reputation:
I would like to do my new Web project on top of two technologies : Symfony2 for the back-end server, and AngularJS for the front-end (sexy, right ? ;)).
I want to make the Symfony2 server as a REST API, which means I won't need a lot of Symfony2 components, such as :
The problem is that I'm not starting from scratch, which means I already have a Symfony2 full-stack application.
So I'm wondering if there is a way to delete components from the full-stack framework. I've seen that it's pretty simple for Twig component, but I've seen nothing for form.
Do you know if there is a clean way to do that ?
Thanks in advance :)
Upvotes: 3
Views: 104
Reputation: 39380
You can build your custom symfony2 removing from your composer.json the line (and all you don't need as doctrine...)
symfony/symfony
and use only your preferred component, you can see the complete list from the github repo . As example you can configure simply:
"require": {
"php": ">=5.3.3",
"symfony/finder": "~2.3",
"symfony/filesystem": "~2.3",
"symfony/options-resolver": "~2.3",
"symfony/framework-bundle": "~2.3"
},
The documentation reference for the symfony2 components is here
Take care if you install a bundle that have in the dependences a module that you don't want it will download with him dependencies.
Hope this help.
PS: You should consider to use a microframework like silex
Upvotes: 3