fixes and updates for symfony version > 2.0