webmozart / standalone-forms

139 stars 30 forks source link

now example works with 2.7 version of Symfony #9

Closed ldath closed 9 years ago

webmozart commented 9 years ago

Thank you so much for this PR @ldath! :) This was long overdue.

ldath commented 9 years ago

Old example is using deprecated method for CSRF. I'm using now this:

use Symfony\Component\Security\Csrf\CsrfTokenManager;

...

// Prepare CSRF Token Manager for Forms
$csrf = new CsrfTokenManager();
$environment->addExtension(new FormExtension(new TwigRenderer($engine, $csrf)));

...

Those are examples from my separate project and differs from standalone-forms example.

I can prepare little more complicated Form example with Callback and addEventListener if there is a need.

webmozart commented 9 years ago

@ldath Yes, that would be much appreciated! But I'd do that in a separate PR. Can you remove the superfluous .gitignore file from this one? Then I will merge this.

ldath commented 9 years ago

Done

webmozart commented 9 years ago

Thanks! :)