-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Pre and Post event args when it is type-hinted
- Loading branch information
Showing
15 changed files
with
279 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
tests/Gedmo/SoftDeleteable/Fixture/Listener/WithLifecycleEventArgsFromODMTypeListener.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the Doctrine Behavioral Extensions package. | ||
* (c) Gediminas Morkevicius <gediminas.morkevicius@gmail.com> http://www.gediminasm.org | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Gedmo\Tests\SoftDeleteable\Fixture\Listener; | ||
|
||
use Doctrine\Common\EventSubscriber; | ||
use Doctrine\ODM\MongoDB\Event\LifecycleEventArgs; | ||
use Gedmo\SoftDeleteable\SoftDeleteableListener; | ||
|
||
final class WithLifecycleEventArgsFromODMTypeListener implements EventSubscriber | ||
{ | ||
public function preSoftDelete(LifecycleEventArgs $args): void | ||
{ | ||
} | ||
|
||
public function postSoftDelete(LifecycleEventArgs $args): void | ||
{ | ||
} | ||
|
||
public function getSubscribedEvents(): array | ||
{ | ||
return [ | ||
SoftDeleteableListener::PRE_SOFT_DELETE, | ||
SoftDeleteableListener::POST_SOFT_DELETE, | ||
]; | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
tests/Gedmo/SoftDeleteable/Fixture/Listener/WithLifecycleEventArgsFromORMTypeListener.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the Doctrine Behavioral Extensions package. | ||
* (c) Gediminas Morkevicius <gediminas.morkevicius@gmail.com> http://www.gediminasm.org | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Gedmo\Tests\SoftDeleteable\Fixture\Listener; | ||
|
||
use Doctrine\Common\EventSubscriber; | ||
use Doctrine\ORM\Event\LifecycleEventArgs; | ||
use Gedmo\SoftDeleteable\SoftDeleteableListener; | ||
|
||
final class WithLifecycleEventArgsFromORMTypeListener implements EventSubscriber | ||
{ | ||
public function preSoftDelete(LifecycleEventArgs $args): void | ||
{ | ||
} | ||
|
||
public function postSoftDelete(LifecycleEventArgs $args): void | ||
{ | ||
} | ||
|
||
public function getSubscribedEvents(): array | ||
{ | ||
return [ | ||
SoftDeleteableListener::PRE_SOFT_DELETE, | ||
SoftDeleteableListener::POST_SOFT_DELETE, | ||
]; | ||
} | ||
} |
Oops, something went wrong.