Describes some tools for Symfony2 developers that might automate processes on Front-End side. Also solves some AngularJS and Symfony2 integration problems.
Removing Assetic • Remove dependency from composer.json "symfony/assetic-bundle": "~2.3" • Remove Bundle from app/AppKernel.php new Symfony\Bundle\AsseticBunle\AsseticBundle(); • Remove assetic sections from config.yml and config_dev.yml • Run composer update and you’re done.
Installing Bower • System wide installation npm install -g bower • Create .bowerrc in the root of your project { "directory": "vendors_js" } • Create bower.json in the root of your project • Execute bower install
Routing • Route Definition in Symfony2 # app/config/routing.yml foo_bar_buzz: path: /foo/{id} defaults: {…} • Generated Url for dev front controller /app_dev.php/foo/1243?limit=10 • Generated Url for prod front controller /foo/1243?limit=10&offset=20
FOSJsRoutingBundle • Exposes routes through whitelisting • Generates JSON structure with exposed routes • Comes with a command to dump routes into a file