Adapted to symfony