Fixed compatibility with latest symfony2 framework