diff --git a/src/Foundry/Factory/OrderSequenceFactory.php b/src/Foundry/Factory/OrderSequenceFactory.php index 89abc95..51cda62 100644 --- a/src/Foundry/Factory/OrderSequenceFactory.php +++ b/src/Foundry/Factory/OrderSequenceFactory.php @@ -16,12 +16,12 @@ use Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository; use Sylius\Component\Core\Model\OrderSequence; use Sylius\Component\Core\Model\OrderSequenceInterface; -use Zenstruck\Foundry\ModelFactory; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; use Zenstruck\Foundry\Persistence\Proxy; use Zenstruck\Foundry\Persistence\ProxyRepositoryDecorator; /** - * @extends ModelFactory + * @extends PersistentProxyObjectFactory * * @method OrderSequenceInterface|Proxy create(array|callable $attributes = []) * @method static OrderSequenceInterface|Proxy createOne(array $attributes = []) @@ -39,11 +39,11 @@ * @method static OrderSequenceInterface[]|Proxy[] randomRange(int $min, int $max, array $attributes = []) * @method static OrderSequenceInterface[]|Proxy[] randomSet(int $number, array $attributes = []) */ -final class OrderSequenceFactory extends ModelFactory implements FactoryWithModelClassAwareInterface +final class OrderSequenceFactory extends PersistentProxyObjectFactory implements FactoryWithModelClassAwareInterface { use WithModelClassTrait; - protected function getDefaults(): array + public function defaults(): array { return []; } diff --git a/src/Foundry/Factory/PromotionFactory.php b/src/Foundry/Factory/PromotionFactory.php index 411bdf3..d6d167c 100644 --- a/src/Foundry/Factory/PromotionFactory.php +++ b/src/Foundry/Factory/PromotionFactory.php @@ -101,7 +101,7 @@ public function withCoupons(array $coupons): self return $this->with(['coupons' => $coupons]); } - protected function getDefaults(): array + public function defaults(): array { return [ 'appliesToDiscounted' => self::faker()->boolean(), diff --git a/src/Foundry/Factory/ShopBillingDataFactory.php b/src/Foundry/Factory/ShopBillingDataFactory.php index 8a767d7..1fca168 100644 --- a/src/Foundry/Factory/ShopBillingDataFactory.php +++ b/src/Foundry/Factory/ShopBillingDataFactory.php @@ -72,7 +72,7 @@ public function withPostcode(string $postcode): self return $this->with(['postcode' => $postcode]); } - protected function getDefaults(): array + public function defaults(): array { return []; } diff --git a/src/Foundry/Factory/State/FemaleTrait.php b/src/Foundry/Factory/State/FemaleTrait.php index 83b61cc..0b647b2 100644 --- a/src/Foundry/Factory/State/FemaleTrait.php +++ b/src/Foundry/Factory/State/FemaleTrait.php @@ -14,7 +14,7 @@ namespace Akawakaweb\SyliusFixturesPlugin\Foundry\Factory\State; use Sylius\Component\Customer\Model\CustomerInterface; -use Zenstruck\Foundry\ModelFactory; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; /** * @mixin ModelFactory diff --git a/src/Foundry/Factory/State/MaleTrait.php b/src/Foundry/Factory/State/MaleTrait.php index 46c54fc..f881288 100644 --- a/src/Foundry/Factory/State/MaleTrait.php +++ b/src/Foundry/Factory/State/MaleTrait.php @@ -14,7 +14,7 @@ namespace Akawakaweb\SyliusFixturesPlugin\Foundry\Factory\State; use Sylius\Component\Customer\Model\CustomerInterface; -use Zenstruck\Foundry\ModelFactory; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; /** * @mixin ModelFactory diff --git a/src/Foundry/Factory/State/ToggableTrait.php b/src/Foundry/Factory/State/ToggableTrait.php index bc54f53..8ac5c79 100644 --- a/src/Foundry/Factory/State/ToggableTrait.php +++ b/src/Foundry/Factory/State/ToggableTrait.php @@ -13,7 +13,7 @@ namespace Akawakaweb\SyliusFixturesPlugin\Foundry\Factory\State; -use Zenstruck\Foundry\ModelFactory; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; /** * @mixin ModelFactory diff --git a/src/Foundry/Factory/State/TranslatableTrait.php b/src/Foundry/Factory/State/TranslatableTrait.php index 557d71d..782df34 100644 --- a/src/Foundry/Factory/State/TranslatableTrait.php +++ b/src/Foundry/Factory/State/TranslatableTrait.php @@ -13,7 +13,7 @@ namespace Akawakaweb\SyliusFixturesPlugin\Foundry\Factory\State; -use Zenstruck\Foundry\ModelFactory; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; /** * @mixin ModelFactory diff --git a/src/Foundry/Factory/State/WithAvatarTrait.php b/src/Foundry/Factory/State/WithAvatarTrait.php index 7e694b2..7fdb057 100644 --- a/src/Foundry/Factory/State/WithAvatarTrait.php +++ b/src/Foundry/Factory/State/WithAvatarTrait.php @@ -13,7 +13,7 @@ namespace Akawakaweb\SyliusFixturesPlugin\Foundry\Factory\State; -use Zenstruck\Foundry\ModelFactory; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; /** * @mixin ModelFactory diff --git a/src/Foundry/Factory/State/WithBirthdayTrait.php b/src/Foundry/Factory/State/WithBirthdayTrait.php index 69da529..a8e846d 100644 --- a/src/Foundry/Factory/State/WithBirthdayTrait.php +++ b/src/Foundry/Factory/State/WithBirthdayTrait.php @@ -13,7 +13,7 @@ namespace Akawakaweb\SyliusFixturesPlugin\Foundry\Factory\State; -use Zenstruck\Foundry\ModelFactory; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; /** * @mixin ModelFactory diff --git a/src/Foundry/Factory/State/WithChannelTrait.php b/src/Foundry/Factory/State/WithChannelTrait.php index 0c08489..c2dd926 100644 --- a/src/Foundry/Factory/State/WithChannelTrait.php +++ b/src/Foundry/Factory/State/WithChannelTrait.php @@ -14,7 +14,7 @@ namespace Akawakaweb\SyliusFixturesPlugin\Foundry\Factory\State; use Sylius\Component\Core\Model\ChannelInterface; -use Zenstruck\Foundry\ModelFactory; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; use Zenstruck\Foundry\Persistence\Proxy; /** diff --git a/src/Foundry/Factory/State/WithChannelsTrait.php b/src/Foundry/Factory/State/WithChannelsTrait.php index 093383f..420bf5d 100644 --- a/src/Foundry/Factory/State/WithChannelsTrait.php +++ b/src/Foundry/Factory/State/WithChannelsTrait.php @@ -13,7 +13,7 @@ namespace Akawakaweb\SyliusFixturesPlugin\Foundry\Factory\State; -use Zenstruck\Foundry\ModelFactory; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; /** * @mixin ModelFactory diff --git a/src/Foundry/Factory/State/WithCodeTrait.php b/src/Foundry/Factory/State/WithCodeTrait.php index 2bd54ce..39fd449 100644 --- a/src/Foundry/Factory/State/WithCodeTrait.php +++ b/src/Foundry/Factory/State/WithCodeTrait.php @@ -13,7 +13,7 @@ namespace Akawakaweb\SyliusFixturesPlugin\Foundry\Factory\State; -use Zenstruck\Foundry\ModelFactory; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; /** * @mixin ModelFactory diff --git a/src/Foundry/Factory/State/WithCommentTrait.php b/src/Foundry/Factory/State/WithCommentTrait.php index f67cda7..412c33f 100644 --- a/src/Foundry/Factory/State/WithCommentTrait.php +++ b/src/Foundry/Factory/State/WithCommentTrait.php @@ -13,7 +13,7 @@ namespace Akawakaweb\SyliusFixturesPlugin\Foundry\Factory\State; -use Zenstruck\Foundry\ModelFactory; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; /** * @mixin ModelFactory diff --git a/src/Foundry/Factory/State/WithConfigurationTrait.php b/src/Foundry/Factory/State/WithConfigurationTrait.php index 8bada2f..0b5298a 100644 --- a/src/Foundry/Factory/State/WithConfigurationTrait.php +++ b/src/Foundry/Factory/State/WithConfigurationTrait.php @@ -13,7 +13,7 @@ namespace Akawakaweb\SyliusFixturesPlugin\Foundry\Factory\State; -use Zenstruck\Foundry\ModelFactory; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; /** * @mixin ModelFactory diff --git a/src/Foundry/Factory/State/WithCountryTrait.php b/src/Foundry/Factory/State/WithCountryTrait.php index 28b086c..ef8d6d6 100644 --- a/src/Foundry/Factory/State/WithCountryTrait.php +++ b/src/Foundry/Factory/State/WithCountryTrait.php @@ -14,7 +14,7 @@ namespace Akawakaweb\SyliusFixturesPlugin\Foundry\Factory\State; use Sylius\Component\Addressing\Model\CountryInterface; -use Zenstruck\Foundry\ModelFactory; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; use Zenstruck\Foundry\Persistence\Proxy; /** diff --git a/src/Foundry/Factory/State/WithCurrenciesTrait.php b/src/Foundry/Factory/State/WithCurrenciesTrait.php index aaf5d02..2e94602 100644 --- a/src/Foundry/Factory/State/WithCurrenciesTrait.php +++ b/src/Foundry/Factory/State/WithCurrenciesTrait.php @@ -13,7 +13,7 @@ namespace Akawakaweb\SyliusFixturesPlugin\Foundry\Factory\State; -use Zenstruck\Foundry\ModelFactory; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; /** * @mixin ModelFactory diff --git a/src/Foundry/Factory/State/WithCustomerTrait.php b/src/Foundry/Factory/State/WithCustomerTrait.php index d5fdf2b..728d08e 100644 --- a/src/Foundry/Factory/State/WithCustomerTrait.php +++ b/src/Foundry/Factory/State/WithCustomerTrait.php @@ -14,7 +14,7 @@ namespace Akawakaweb\SyliusFixturesPlugin\Foundry\Factory\State; use Sylius\Component\Core\Model\CustomerInterface; -use Zenstruck\Foundry\ModelFactory; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; use Zenstruck\Foundry\Persistence\Proxy; /** diff --git a/src/Foundry/Factory/State/WithDescriptionTrait.php b/src/Foundry/Factory/State/WithDescriptionTrait.php index 6bfced2..dfb90aa 100644 --- a/src/Foundry/Factory/State/WithDescriptionTrait.php +++ b/src/Foundry/Factory/State/WithDescriptionTrait.php @@ -13,7 +13,7 @@ namespace Akawakaweb\SyliusFixturesPlugin\Foundry\Factory\State; -use Zenstruck\Foundry\ModelFactory; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; /** * @mixin ModelFactory diff --git a/src/Foundry/Factory/State/WithEmailTrait.php b/src/Foundry/Factory/State/WithEmailTrait.php index fd7e36e..2b7ead9 100644 --- a/src/Foundry/Factory/State/WithEmailTrait.php +++ b/src/Foundry/Factory/State/WithEmailTrait.php @@ -13,7 +13,7 @@ namespace Akawakaweb\SyliusFixturesPlugin\Foundry\Factory\State; -use Zenstruck\Foundry\ModelFactory; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; /** * @mixin ModelFactory diff --git a/src/Foundry/Factory/State/WithFirstNameTrait.php b/src/Foundry/Factory/State/WithFirstNameTrait.php index 0f5aee4..7109939 100644 --- a/src/Foundry/Factory/State/WithFirstNameTrait.php +++ b/src/Foundry/Factory/State/WithFirstNameTrait.php @@ -13,7 +13,7 @@ namespace Akawakaweb\SyliusFixturesPlugin\Foundry\Factory\State; -use Zenstruck\Foundry\ModelFactory; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; /** * @mixin ModelFactory diff --git a/src/Foundry/Factory/State/WithImagesTrait.php b/src/Foundry/Factory/State/WithImagesTrait.php index 4dc5ee8..4f74007 100644 --- a/src/Foundry/Factory/State/WithImagesTrait.php +++ b/src/Foundry/Factory/State/WithImagesTrait.php @@ -13,7 +13,7 @@ namespace Akawakaweb\SyliusFixturesPlugin\Foundry\Factory\State; -use Zenstruck\Foundry\ModelFactory; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; /** * @mixin ModelFactory diff --git a/src/Foundry/Factory/State/WithLastNameTrait.php b/src/Foundry/Factory/State/WithLastNameTrait.php index 6817658..32a4ede 100644 --- a/src/Foundry/Factory/State/WithLastNameTrait.php +++ b/src/Foundry/Factory/State/WithLastNameTrait.php @@ -13,7 +13,7 @@ namespace Akawakaweb\SyliusFixturesPlugin\Foundry\Factory\State; -use Zenstruck\Foundry\ModelFactory; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; /** * @mixin ModelFactory diff --git a/src/Foundry/Factory/State/WithLocaleCodeTrait.php b/src/Foundry/Factory/State/WithLocaleCodeTrait.php index ac1bc7f..fb054f9 100644 --- a/src/Foundry/Factory/State/WithLocaleCodeTrait.php +++ b/src/Foundry/Factory/State/WithLocaleCodeTrait.php @@ -13,7 +13,7 @@ namespace Akawakaweb\SyliusFixturesPlugin\Foundry\Factory\State; -use Zenstruck\Foundry\ModelFactory; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; /** * @mixin ModelFactory diff --git a/src/Foundry/Factory/State/WithLocalesTrait.php b/src/Foundry/Factory/State/WithLocalesTrait.php index f54d7e1..b8bd828 100644 --- a/src/Foundry/Factory/State/WithLocalesTrait.php +++ b/src/Foundry/Factory/State/WithLocalesTrait.php @@ -13,7 +13,7 @@ namespace Akawakaweb\SyliusFixturesPlugin\Foundry\Factory\State; -use Zenstruck\Foundry\ModelFactory; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; /** * @mixin ModelFactory diff --git a/src/Foundry/Factory/State/WithNameTrait.php b/src/Foundry/Factory/State/WithNameTrait.php index de78b99..6eb390e 100644 --- a/src/Foundry/Factory/State/WithNameTrait.php +++ b/src/Foundry/Factory/State/WithNameTrait.php @@ -13,7 +13,7 @@ namespace Akawakaweb\SyliusFixturesPlugin\Foundry\Factory\State; -use Zenstruck\Foundry\ModelFactory; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; /** * @mixin ModelFactory diff --git a/src/Foundry/Factory/State/WithPasswordTrait.php b/src/Foundry/Factory/State/WithPasswordTrait.php index a3383af..c98a5e1 100644 --- a/src/Foundry/Factory/State/WithPasswordTrait.php +++ b/src/Foundry/Factory/State/WithPasswordTrait.php @@ -13,7 +13,7 @@ namespace Akawakaweb\SyliusFixturesPlugin\Foundry\Factory\State; -use Zenstruck\Foundry\ModelFactory; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; /** * @mixin ModelFactory diff --git a/src/Foundry/Factory/State/WithPhoneNumberTrait.php b/src/Foundry/Factory/State/WithPhoneNumberTrait.php index 5eaa3dc..e750772 100644 --- a/src/Foundry/Factory/State/WithPhoneNumberTrait.php +++ b/src/Foundry/Factory/State/WithPhoneNumberTrait.php @@ -13,7 +13,7 @@ namespace Akawakaweb\SyliusFixturesPlugin\Foundry\Factory\State; -use Zenstruck\Foundry\ModelFactory; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; /** * @mixin ModelFactory diff --git a/src/Foundry/Factory/State/WithPriorityTrait.php b/src/Foundry/Factory/State/WithPriorityTrait.php index 7f8c9bc..2960125 100644 --- a/src/Foundry/Factory/State/WithPriorityTrait.php +++ b/src/Foundry/Factory/State/WithPriorityTrait.php @@ -13,7 +13,7 @@ namespace Akawakaweb\SyliusFixturesPlugin\Foundry\Factory\State; -use Zenstruck\Foundry\ModelFactory; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; /** * @mixin ModelFactory diff --git a/src/Foundry/Factory/State/WithProductAttributesTrait.php b/src/Foundry/Factory/State/WithProductAttributesTrait.php index 44352d0..a15a897 100644 --- a/src/Foundry/Factory/State/WithProductAttributesTrait.php +++ b/src/Foundry/Factory/State/WithProductAttributesTrait.php @@ -13,7 +13,7 @@ namespace Akawakaweb\SyliusFixturesPlugin\Foundry\Factory\State; -use Zenstruck\Foundry\ModelFactory; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; /** * @mixin ModelFactory diff --git a/src/Foundry/Factory/State/WithShortDescriptionTrait.php b/src/Foundry/Factory/State/WithShortDescriptionTrait.php index a420b06..d5fe00d 100644 --- a/src/Foundry/Factory/State/WithShortDescriptionTrait.php +++ b/src/Foundry/Factory/State/WithShortDescriptionTrait.php @@ -13,7 +13,7 @@ namespace Akawakaweb\SyliusFixturesPlugin\Foundry\Factory\State; -use Zenstruck\Foundry\ModelFactory; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; /** * @mixin ModelFactory diff --git a/src/Foundry/Factory/State/WithSlugTrait.php b/src/Foundry/Factory/State/WithSlugTrait.php index d4e5064..520c4a6 100644 --- a/src/Foundry/Factory/State/WithSlugTrait.php +++ b/src/Foundry/Factory/State/WithSlugTrait.php @@ -13,7 +13,7 @@ namespace Akawakaweb\SyliusFixturesPlugin\Foundry\Factory\State; -use Zenstruck\Foundry\ModelFactory; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; /** * @mixin ModelFactory diff --git a/src/Foundry/Factory/State/WithStatusTrait.php b/src/Foundry/Factory/State/WithStatusTrait.php index ffc1f71..7eef5b9 100644 --- a/src/Foundry/Factory/State/WithStatusTrait.php +++ b/src/Foundry/Factory/State/WithStatusTrait.php @@ -13,7 +13,7 @@ namespace Akawakaweb\SyliusFixturesPlugin\Foundry\Factory\State; -use Zenstruck\Foundry\ModelFactory; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; /** * @mixin ModelFactory diff --git a/src/Foundry/Factory/State/WithTaxCategoryTrait.php b/src/Foundry/Factory/State/WithTaxCategoryTrait.php index 910fdae..fd52b34 100644 --- a/src/Foundry/Factory/State/WithTaxCategoryTrait.php +++ b/src/Foundry/Factory/State/WithTaxCategoryTrait.php @@ -14,7 +14,7 @@ namespace Akawakaweb\SyliusFixturesPlugin\Foundry\Factory\State; use Sylius\Component\Taxation\Model\TaxCategoryInterface; -use Zenstruck\Foundry\ModelFactory; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; use Zenstruck\Foundry\Persistence\Proxy; /** diff --git a/src/Foundry/Factory/State/WithTaxaTrait.php b/src/Foundry/Factory/State/WithTaxaTrait.php index 7025c2e..606c851 100644 --- a/src/Foundry/Factory/State/WithTaxaTrait.php +++ b/src/Foundry/Factory/State/WithTaxaTrait.php @@ -13,7 +13,7 @@ namespace Akawakaweb\SyliusFixturesPlugin\Foundry\Factory\State; -use Zenstruck\Foundry\ModelFactory; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; /** * @mixin ModelFactory diff --git a/src/Foundry/Factory/State/WithTitleTrait.php b/src/Foundry/Factory/State/WithTitleTrait.php index eac25c4..2e8d793 100644 --- a/src/Foundry/Factory/State/WithTitleTrait.php +++ b/src/Foundry/Factory/State/WithTitleTrait.php @@ -13,7 +13,7 @@ namespace Akawakaweb\SyliusFixturesPlugin\Foundry\Factory\State; -use Zenstruck\Foundry\ModelFactory; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; /** * @mixin ModelFactory diff --git a/src/Foundry/Factory/State/WithTypeTrait.php b/src/Foundry/Factory/State/WithTypeTrait.php index 0d3671a..0885706 100644 --- a/src/Foundry/Factory/State/WithTypeTrait.php +++ b/src/Foundry/Factory/State/WithTypeTrait.php @@ -13,7 +13,7 @@ namespace Akawakaweb\SyliusFixturesPlugin\Foundry\Factory\State; -use Zenstruck\Foundry\ModelFactory; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; /** * @mixin ModelFactory diff --git a/src/Foundry/Factory/State/WithUsernameTrait.php b/src/Foundry/Factory/State/WithUsernameTrait.php index cd7358a..18deb88 100644 --- a/src/Foundry/Factory/State/WithUsernameTrait.php +++ b/src/Foundry/Factory/State/WithUsernameTrait.php @@ -13,7 +13,7 @@ namespace Akawakaweb\SyliusFixturesPlugin\Foundry\Factory\State; -use Zenstruck\Foundry\ModelFactory; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; /** * @mixin ModelFactory diff --git a/src/Foundry/Factory/State/WithZoneTrait.php b/src/Foundry/Factory/State/WithZoneTrait.php index c51a192..0fe5ed4 100644 --- a/src/Foundry/Factory/State/WithZoneTrait.php +++ b/src/Foundry/Factory/State/WithZoneTrait.php @@ -14,7 +14,7 @@ namespace Akawakaweb\SyliusFixturesPlugin\Foundry\Factory\State; use Sylius\Component\Addressing\Model\ZoneInterface; -use Zenstruck\Foundry\ModelFactory; +use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; use Zenstruck\Foundry\Persistence\Proxy; /**