Skip to content

Commit

Permalink
Merge pull request biig-io#25 from swagindustries/feature/filters-are…
Browse files Browse the repository at this point in the history
…-api-type

Remove the requirement to CSRF extension of Sf
  • Loading branch information
Nek- authored Aug 18, 2020
2 parents 68c090f + c4897d9 commit 9e45e5f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added
- Support of more kind of FormError
- Removed requirement to have CSRF protection enabled #25

### Changed
- Huge BC Break on namespaces. You need to rename all classes used to SwagIndustries instead of Biig
Expand Down
5 changes: 2 additions & 3 deletions src/Crud/FilterCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace SwagIndustries\Melodiia\Crud;

use SwagIndustries\Melodiia\Bridge\Symfony\Form\Type\ApiType;
use SwagIndustries\Melodiia\Exception\NoFormFilterCreatedException;
use Symfony\Component\Form\Extension\Core\Type\FormType;
use Symfony\Component\Form\FormFactoryInterface;
use Symfony\Component\Form\FormInterface;

Expand Down Expand Up @@ -53,9 +53,8 @@ public function getForm(): FormInterface
return $this->form;
}

$builder = $this->formFactory->createNamedBuilder('', FormType::class, null, [
$builder = $this->formFactory->createNamedBuilder('', ApiType::class, null, [
'method' => 'GET',
'csrf_protection' => false,
'allow_extra_fields' => true,
]);

Expand Down

0 comments on commit 9e45e5f

Please sign in to comment.