Skip to content

Commit

Permalink
Merge pull request #33 from StudioWaaz/sf5-compatibility
Browse files Browse the repository at this point in the history
SF 5 Compatibility
  • Loading branch information
eymengunay committed Oct 5, 2022
2 parents bb7f2bb + 0851ec4 commit 3e32f92
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Event/BirdInCageEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace Eo\HoneypotBundle\Event;

use Eo\HoneypotBundle\Model\HoneypotPreyInterface;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Contracts\EventDispatcher\Event;

class BirdInCageEvent extends Event
{
Expand Down
2 changes: 1 addition & 1 deletion Form/Type/HoneypotType.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
$prey = $honeypotManager->createNew($request->getClientIp());

// Dispatch bird.in.cage event
$eventDispatcher->dispatch(Events::BIRD_IN_CAGE, new BirdInCageEvent($prey));
$eventDispatcher->dispatch(new BirdInCageEvent($prey), Events::BIRD_IN_CAGE);

// Save prey
$honeypotManager->save($prey);
Expand Down
2 changes: 1 addition & 1 deletion Tests/Form/Type/HoneypotTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function testBuildForm($data, $trigger)
$form = $builder->getForm();
$form->setParent($parent);

$eventDispatcher->dispatch(FormEvents::PRE_SUBMIT, new FormEvent($form, $data));
$eventDispatcher->dispatch(new FormEvent($form, $data), FormEvents::PRE_SUBMIT);

$this->assertEquals($this->triggered, $trigger);
}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}
],
"require": {
"symfony/framework-bundle": "~3.0|~4.0|~5.0"
"symfony/framework-bundle": "~5.0"
},
"require-dev": {
"eo/symfony-test-edition": "~3.0"
Expand Down

0 comments on commit 3e32f92

Please sign in to comment.