Showing posts with label symfony2. Show all posts
Showing posts with label symfony2. Show all posts

Friday, March 15, 2013

Generate code with BasGeneratorBundle

Not all tasks of the programmer are fun, inspiring or exciting. Some of them just boring. But you still have to take care of those routine tasks. If you develop with Symfony2 you probably are familiar with SensioGeneratorBundle which makes your life easier by allowing you to avoid copying and pasting such things like bundles, form classes and CRUD controllers over and over again.

Though SensioGeneratorBundle copes with its task pretty well it has one drawback: there is no easy mechanism of extending generation commands with custom generation templates (aka skeletons). Since I had to create a lot of rest CRUD controllers of the same type and there were no way to generate them via SensioGeneratorBundle I decided to create my own BasGeneratorBundle.

Saturday, November 10, 2012

Managing js vendors and symfony 2.1.x

In my preveous post I've described how to manage js vendors in symfony2. However that solution is only applicable for version 2.0.x of symfony. In this post I'll describe how to manage js vendors in 2.1.x.

The idea is the same: load js vendors via symfony's standard mechanism (composer). But load into the folder under web directory.

Symfony2 and js vendors

How to deal with vendor javascripts in symfony2?
Moreover, how to make installing/updating js vendor as easy as possible?