-
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
390 additions
and
22 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the zenstruck/foundry package. | ||
* | ||
* (c) Kevin Bond <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Zenstruck\Foundry\Object\Event; | ||
|
||
use Zenstruck\Foundry\Factory; | ||
use Zenstruck\Foundry\ObjectFactory; | ||
|
||
/** | ||
* @author Nicolas PHILIPPE <[email protected]> | ||
* | ||
* @phpstan-import-type Parameters from Factory | ||
*/ | ||
final class AfterInstantiate | ||
{ | ||
public function __construct( | ||
public readonly object $object, | ||
/** @phpstan-var Parameters */ | ||
public readonly array $parameters, | ||
/** @var ObjectFactory<object> */ | ||
public readonly ObjectFactory $factory, | ||
) { | ||
} | ||
} |
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 zenstruck/foundry package. | ||
* | ||
* (c) Kevin Bond <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Zenstruck\Foundry\Object\Event; | ||
|
||
use Zenstruck\Foundry\Factory; | ||
use Zenstruck\Foundry\ObjectFactory; | ||
|
||
/** | ||
* @author Nicolas PHILIPPE <[email protected]> | ||
* | ||
* @phpstan-import-type Parameters from Factory | ||
*/ | ||
final class BeforeInstantiate | ||
{ | ||
public function __construct( | ||
/** @phpstan-var Parameters */ | ||
public array $parameters, | ||
/** @var class-string */ | ||
public readonly string $objectClass, | ||
/** @var ObjectFactory<object> */ | ||
public readonly ObjectFactory $factory, | ||
) { | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the zenstruck/foundry package. | ||
* | ||
* (c) Kevin Bond <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Zenstruck\Foundry\Persistence\Event; | ||
|
||
use Zenstruck\Foundry\Factory; | ||
use Zenstruck\Foundry\Persistence\PersistentObjectFactory; | ||
|
||
/** | ||
* @author Nicolas PHILIPPE <[email protected]> | ||
* | ||
* @phpstan-import-type Parameters from Factory | ||
*/ | ||
final class AfterPersist | ||
{ | ||
public function __construct( | ||
public readonly object $object, | ||
/** @phpstan-var Parameters */ | ||
public readonly array $parameters, | ||
/** @var PersistentObjectFactory<object> */ | ||
public readonly PersistentObjectFactory $factory, | ||
) { | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the zenstruck/foundry package. | ||
* | ||
* (c) Kevin Bond <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Zenstruck\Foundry\Tests\Fixture\Entity; | ||
|
||
use Doctrine\ORM\Mapping as ORM; | ||
use Zenstruck\Foundry\Tests\Fixture\Model\Base; | ||
|
||
#[ORM\Entity] | ||
class EntityForEventListeners extends Base | ||
{ | ||
public function __construct( | ||
#[ORM\Column()] | ||
public string $name, | ||
) { | ||
} | ||
} |
Oops, something went wrong.