pix-digital / pixSortableBehaviorBundle

Offers a sortable feature for your Symfony2 admin listing
MIT License
46 stars 78 forks source link

setFlash() does not exists in Symfony >= 2.1 #1

Closed trasher closed 11 years ago

trasher commented 11 years ago

In the SortableAdminController, there is a call to the setFlash method that no longer exists in Symfony >= 2.1:

$this->get('session')->setFlash('sonata_flash_info', 'Position mise à jour');

You should replace this line with (what I've done for Symfony 2.3.6):

$this->get('session')->getFlashBag()->set('sonata_flash_info', 'Position mise à jour');
nicolasricci commented 11 years ago

thanks for the bug report. Send me a PR and I will merge it. FYI setFlash is only deprecated since Symfony 2.3

trasher commented 11 years ago

Synfony documentation do refers to getFlashBag() for 2.1, but maybe was the old method only deprecated. Anyways, the fix si still required for 2.3, and will work with 2.1 :)

Thank you