diff --git a/composer.json b/composer.json index dec0e5444d..ec3b795406 100644 --- a/composer.json +++ b/composer.json @@ -84,8 +84,8 @@ "sylius/mailer": "^2.0", "sylius/mailer-bundle": "^2.0", "sylius/registry": "^1.6", - "sylius/resource": "^1.10", - "sylius/resource-bundle": "^1.10", + "sylius/resource": "^1.11", + "sylius/resource-bundle": "^1.11", "sylius/theme-bundle": "^2.3", "sylius/twig-hooks": "~0.3.0", "symfony/asset": "^6.4.0", diff --git a/docs/book/architecture/translations.rst b/docs/book/architecture/translations.rst index ab9fbfb923..b3add350c5 100644 --- a/docs/book/architecture/translations.rst +++ b/docs/book/architecture/translations.rst @@ -23,7 +23,7 @@ Assuming that we would like to have a translatable model of a ``Supplier``, we n namespace App\Entity; - use Sylius\Component\Resource\Model\AbstractTranslation; + use Sylius\Resource\Model\AbstractTranslation; class SupplierTranslation extends AbstractTranslation { @@ -62,8 +62,8 @@ The actual entity has access to its translation by using the ``TranslatableTrait namespace App\Entity; - use Sylius\Component\Resource\Model\TranslatableInterface; - use Sylius\Component\Resource\Model\TranslatableTrait; + use Sylius\Resource\Model\TranslatableInterface; + use Sylius\Resource\Model\TranslatableTrait; class Supplier implements TranslatableInterface { diff --git a/docs/components_and_bundles/bundles/SyliusAddressingBundle/summary.rst b/docs/components_and_bundles/bundles/SyliusAddressingBundle/summary.rst index c2daa2de0a..fc7a4cffb7 100644 --- a/docs/components_and_bundles/bundles/SyliusAddressingBundle/summary.rst +++ b/docs/components_and_bundles/bundles/SyliusAddressingBundle/summary.rst @@ -23,7 +23,7 @@ Configuration Reference interface: Sylius\Component\Addressing\Model\AddressInterface controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController repository: ~ - factory: Sylius\Component\Resource\Factory\Factory + factory: Sylius\Resource\Factory\Factory form: Sylius\Bundle\AddressingBundle\Form\Type\AddressType country: classes: @@ -31,7 +31,7 @@ Configuration Reference interface: Sylius\Component\Addressing\Model\CountryInterface controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController repository: ~ - factory: Sylius\Component\Resource\Factory\Factory + factory: Sylius\Resource\Factory\Factory form: Sylius\Bundle\AddressingBundle\Form\Type\CountryType province: classes: @@ -39,7 +39,7 @@ Configuration Reference interface: Sylius\Component\Addressing\Model\ProvinceInterface controller: Sylius\Bundle\AddressingBundle\Controller\ProvinceController repository: ~ - factory: Sylius\Component\Resource\Factory\Factory + factory: Sylius\Resource\Factory\Factory form: Sylius\Bundle\AddressingBundle\Form\Type\ProvinceType zone: classes: @@ -47,7 +47,7 @@ Configuration Reference interface: Sylius\Component\Addressing\Model\ZoneInterface controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController repository: ~ - factory: Sylius\Component\Resource\Factory\Factory + factory: Sylius\Resource\Factory\Factory form: Sylius\Bundle\AddressingBundle\Form\Type\ZoneType zone_member: classes: @@ -55,7 +55,7 @@ Configuration Reference interface: Sylius\Component\Addressing\Model\ZoneMemberInterface controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController repository: ~ - factory: Sylius\Component\Resource\Factory\Factory + factory: Sylius\Resource\Factory\Factory form: Sylius\Bundle\AddressingBundle\Form\Type\ZoneMemberType Bug tracking diff --git a/docs/components_and_bundles/bundles/SyliusAttributeBundle/configuration.rst b/docs/components_and_bundles/bundles/SyliusAttributeBundle/configuration.rst index 342ead92ba..b5a3b9f9cf 100644 --- a/docs/components_and_bundles/bundles/SyliusAttributeBundle/configuration.rst +++ b/docs/components_and_bundles/bundles/SyliusAttributeBundle/configuration.rst @@ -22,7 +22,7 @@ Configuration reference interface: Sylius\Component\Attribute\Model\AttributeInterface repository: Sylius\Bundle\TranslationBundle\Doctrine\ORM\TranslatableResourceRepository controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController - factory: Sylius\Component\Resource\Factory\Factory + factory: Sylius\Resource\Factory\Factory form: Sylius\Bundle\AttributeBundle\Form\Type\AttributeType translation: classes: @@ -30,7 +30,7 @@ Configuration reference interface: Sylius\Component\Attribute\Model\AttributeTranslationInterface controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController repository: ~ # Required: The repository class for the attribute translation. - factory: Sylius\Component\Resource\Factory\Factory + factory: Sylius\Resource\Factory\Factory form: Sylius\Bundle\AttributeBundle\Form\Type\AttributeTranslationType attribute_value: classes: @@ -38,5 +38,5 @@ Configuration reference interface: ~ # Required: The interface of the attribute value controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController repository: ~ # Required: The repository class for the attribute value. - factory: Sylius\Component\Resource\Factory\Factory + factory: Sylius\Resource\Factory\Factory form: Sylius\Bundle\AttributeBundle\Form\Type\AttributeValueType diff --git a/docs/components_and_bundles/bundles/SyliusCustomerBundle/summary.rst b/docs/components_and_bundles/bundles/SyliusCustomerBundle/summary.rst index 98cd6bdbb7..cb93516c07 100644 --- a/docs/components_and_bundles/bundles/SyliusCustomerBundle/summary.rst +++ b/docs/components_and_bundles/bundles/SyliusCustomerBundle/summary.rst @@ -26,14 +26,14 @@ Configuration reference choice: Sylius\Bundle\ResourceBundle\Form\Type\ResourceChoiceType interface: Sylius\Component\Customer\Model\CustomerInterface controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController - factory: Sylius\Component\Resource\Factory\Factory + factory: Sylius\Resource\Factory\Factory customer_group: classes: model: Sylius\Component\Customer\Model\CustomerGroup repository: Sylius\Bundle\CustomerBundle\Doctrine\ORM\CustomerGroupRepository interface: Sylius\Component\Customer\Model\CustomerGroupInterface controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController - factory: Sylius\Component\Resource\Factory\Factory + factory: Sylius\Resource\Factory\Factory form: Sylius\Bundle\CustomerBundle\Form\Type\CustomerGroupType Bug tracking diff --git a/docs/components_and_bundles/bundles/SyliusInventoryBundle/summary.rst b/docs/components_and_bundles/bundles/SyliusInventoryBundle/summary.rst index 5d0c0ec680..20b7f5b8fa 100644 --- a/docs/components_and_bundles/bundles/SyliusInventoryBundle/summary.rst +++ b/docs/components_and_bundles/bundles/SyliusInventoryBundle/summary.rst @@ -31,7 +31,7 @@ Configuration reference interface: Sylius\Component\Inventory\Model\InventoryUnitInterface controller: Sylius\Bundle\InventoryBundle\Controller\InventoryUnitController repository: ~ # You can override the repository class here. - factory: Sylius\Component\Resource\Factory\Factory + factory: Sylius\Resource\Factory\Factory stockable: classes: model: ~ # The stockable model class. diff --git a/docs/components_and_bundles/bundles/SyliusOrderBundle/summary.rst b/docs/components_and_bundles/bundles/SyliusOrderBundle/summary.rst index 4f5beaa1ad..6bd60a240b 100644 --- a/docs/components_and_bundles/bundles/SyliusOrderBundle/summary.rst +++ b/docs/components_and_bundles/bundles/SyliusOrderBundle/summary.rst @@ -23,14 +23,14 @@ Configuration reference repository: Sylius\Bundle\CoreBundle\Doctrine\ORM\OrderRepository form: Sylius\Bundle\CoreBundle\Form\Type\Order\OrderType interface: Sylius\Component\Order\Model\OrderInterface - factory: Sylius\Component\Resource\Factory\Factory + factory: Sylius\Resource\Factory\Factory order_item: classes: model: Sylius\Component\Core\Model\OrderItem form: Sylius\Bundle\CoreBundle\Form\Type\Order\OrderItemType interface: Sylius\Component\Order\Model\OrderItemInterface controller: Sylius\Bundle\OrderBundle\Controller\OrderItemController - factory: Sylius\Component\Resource\Factory\Factory + factory: Sylius\Resource\Factory\Factory order_item_unit: classes: model: Sylius\Component\Core\Model\OrderItemUnit @@ -42,12 +42,12 @@ Configuration reference model: Sylius\Component\Order\Model\Adjustment interface: Sylius\Component\Order\Model\AdjustmentInterface controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController - factory: Sylius\Component\Resource\Factory\Factory + factory: Sylius\Resource\Factory\Factory order_sequence: classes: model: Sylius\Component\Order\Model\OrderSequence interface: Sylius\Component\Order\Model\OrderSequenceInterface - factory: Sylius\Component\Resource\Factory\Factory + factory: Sylius\Resource\Factory\Factory expiration: cart: '2 days' order: '5 days' diff --git a/docs/components_and_bundles/bundles/SyliusProductBundle/summary.rst b/docs/components_and_bundles/bundles/SyliusProductBundle/summary.rst index fd111c41c2..07a261694f 100644 --- a/docs/components_and_bundles/bundles/SyliusProductBundle/summary.rst +++ b/docs/components_and_bundles/bundles/SyliusProductBundle/summary.rst @@ -30,7 +30,7 @@ Configuration reference form: Sylius\Bundle\CoreBundle\Form\Type\Product\ProductTranslationType interface: Sylius\Component\Product\Model\ProductTranslationInterface controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController - factory: Sylius\Component\Resource\Factory\Factory + factory: Sylius\Resource\Factory\Factory product_variant: classes: model: Sylius\Component\Core\Model\ProductVariant @@ -45,42 +45,42 @@ Configuration reference model: Sylius\Component\Product\Model\ProductOption interface: Sylius\Component\Product\Model\ProductOptionInterface controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController - factory: Sylius\Component\Resource\Factory\TranslatableFactory + factory: Sylius\Resource\Factory\TranslatableFactory form: Sylius\Bundle\ProductBundle\Form\Type\ProductOptionType translation: classes: model: Sylius\Component\Product\Model\ProductOptionTranslation interface: Sylius\Component\Product\Model\ProductOptionTranslationInterface controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController - factory: Sylius\Component\Resource\Factory\Factory + factory: Sylius\Resource\Factory\Factory form: Sylius\Bundle\ProductBundle\Form\Type\ProductOptionTranslationType product_option_value: classes: model: Sylius\Component\Product\Model\ProductOptionValue interface: Sylius\Component\Product\Model\ProductOptionValueInterface controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController - factory: Sylius\Component\Resource\Factory\TranslatableFactory + factory: Sylius\Resource\Factory\TranslatableFactory form: Sylius\Bundle\ProductBundle\Form\Type\ProductOptionValueType translation: classes: model: Sylius\Component\Product\Model\ProductOptionValueTranslation interface: Sylius\Component\Product\Model\ProductOptionValueTranslationInterface controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController - factory: Sylius\Component\Resource\Factory\Factory + factory: Sylius\Resource\Factory\Factory form: Sylius\Bundle\ProductBundle\Form\Type\ProductOptionValueTranslationType product_association: classes: model: Sylius\Component\Product\Model\ProductAssociation interface: Sylius\Component\Product\Model\ProductAssociationInterface controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController - factory: Sylius\Component\Resource\Factory\Factory + factory: Sylius\Resource\Factory\Factory form: Sylius\Bundle\ProductBundle\Form\Type\ProductAssociationType product_association_type: classes: model: Sylius\Component\Product\Model\ProductAssociationType interface: Sylius\Component\Product\Model\ProductAssociationTypeInterface controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController - factory: Sylius\Component\Resource\Factory\Factory + factory: Sylius\Resource\Factory\Factory form: Sylius\Bundle\ProductBundle\Form\Type\ProductAssociationTypeType Bug tracking diff --git a/docs/components_and_bundles/bundles/SyliusPromotionBundle/summary.rst b/docs/components_and_bundles/bundles/SyliusPromotionBundle/summary.rst index fd4dd1860b..0be6f77dfa 100644 --- a/docs/components_and_bundles/bundles/SyliusPromotionBundle/summary.rst +++ b/docs/components_and_bundles/bundles/SyliusPromotionBundle/summary.rst @@ -22,7 +22,7 @@ Summary interface: Sylius\Component\Promotion\Model\PromotionInterface controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController repository: ~ - factory: Sylius\Component\Resource\Factory\Factory + factory: Sylius\Resource\Factory\Factory form: Sylius\Bundle\PromotionBundle\Form\Type\PromotionType promotion_rule: classes: @@ -38,7 +38,7 @@ Summary interface: Sylius\Component\Promotion\Model\PromotionActionInterface controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController repository: ~ - factory: Sylius\Component\Resource\Factory\Factory + factory: Sylius\Resource\Factory\Factory form: Sylius\Bundle\PromotionBundle\Form\Type\PromotionActionType promotion_action: classes: @@ -46,7 +46,7 @@ Summary interface: Sylius\Component\Promotion\Model\CouponInterface controller: Sylius\Bundle\PromotionBundle\Controller\PromotionCouponController repository: ~ - factory: Sylius\Component\Resource\Factory\Factory + factory: Sylius\Resource\Factory\Factory form: Sylius\Bundle\PromotionBundle\Form\Type\PromotionActionType Bug tracking diff --git a/docs/components_and_bundles/bundles/SyliusShippingBundle/summary.rst b/docs/components_and_bundles/bundles/SyliusShippingBundle/summary.rst index e5151d6937..e41b90785a 100644 --- a/docs/components_and_bundles/bundles/SyliusShippingBundle/summary.rst +++ b/docs/components_and_bundles/bundles/SyliusShippingBundle/summary.rst @@ -23,7 +23,7 @@ Configuration Reference interface: Sylius\Component\Shipping\Model\ShipmentInterface controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController repository: ~ - factory: Sylius\Component\Resource\Factory\Factory + factory: Sylius\Resource\Factory\Factory form: Sylius\Bundle\ShippingBundle\Form\Type\ShipmentType shipment_item: classes: @@ -31,7 +31,7 @@ Configuration Reference interface: Sylius\Component\Shipping\Model\ShipmentItemInterface controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController repository: ~ - factory: Sylius\Component\Resource\Factory\Factory + factory: Sylius\Resource\Factory\Factory form: Sylius\Bundle\ShippingBundle\Form\Type\ShipmentItemType shipping_method: classes: @@ -39,7 +39,7 @@ Configuration Reference interface: Sylius\Component\Shipping\Model\ShippingMethodInterface controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController repository: ~ - factory: Sylius\Component\Resource\Factory\Factory + factory: Sylius\Resource\Factory\Factory form: Sylius\Bundle\ShippingBundle\Form\Type\ShippingMethodType translation: classes: @@ -47,7 +47,7 @@ Configuration Reference interface: Sylius\Component\Shipping\Model\ShippingMethodTranslationInterface controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController repository: ~ - factory: Sylius\Component\Resource\Factory\Factory + factory: Sylius\Resource\Factory\Factory form: Sylius\Bundle\ShippingBundle\Form\Type\ShippingMethodTranslationType shipping_category: classes: @@ -55,7 +55,7 @@ Configuration Reference interface: Sylius\Component\Shipping\Model\ShippingCategoryInterface controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController repository: ~ - factory: Sylius\Component\Resource\Factory\Factory + factory: Sylius\Resource\Factory\Factory form: Sylius\Bundle\ShippingBundle\Form\Type\ShippingCategoryType Bug tracking diff --git a/docs/components_and_bundles/bundles/SyliusTaxationBundle/summary.rst b/docs/components_and_bundles/bundles/SyliusTaxationBundle/summary.rst index 4d66b4691b..3cfff068ef 100644 --- a/docs/components_and_bundles/bundles/SyliusTaxationBundle/summary.rst +++ b/docs/components_and_bundles/bundles/SyliusTaxationBundle/summary.rst @@ -23,7 +23,7 @@ Configuration Reference interface: Sylius\Component\Taxation\Model\TaxCategoryInterface controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController repository: ~ - factory: Sylius\Component\Resource\Factory\Factory + factory: Sylius\Resource\Factory\Factory form: Sylius\Bundle\TaxationBundle\Form\Type\TaxCategoryType tax_rate: classes: @@ -31,7 +31,7 @@ Configuration Reference interface: Sylius\Component\Taxation\Model\TaxRateInterface controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController repository: ~ - factory: Sylius\Component\Resource\Factory\Factory + factory: Sylius\Resource\Factory\Factory form: Sylius\Bundle\TaxationBundle\Form\Type\TaxRateType Bug tracking diff --git a/docs/components_and_bundles/bundles/SyliusTaxonomyBundle/summary.rst b/docs/components_and_bundles/bundles/SyliusTaxonomyBundle/summary.rst index 2db346f967..1558775b32 100644 --- a/docs/components_and_bundles/bundles/SyliusTaxonomyBundle/summary.rst +++ b/docs/components_and_bundles/bundles/SyliusTaxonomyBundle/summary.rst @@ -23,7 +23,7 @@ Configuration Reference interface: Sylius\Component\Taxonomy\Model\TaxonInterface controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController repository: ~ - factory: Sylius\Component\Resource\Factory\TranslatableFactory + factory: Sylius\Resource\Factory\TranslatableFactory form: Sylius\Bundle\TaxonomyBundle\Form\Type\TaxonType translation: classes: @@ -31,7 +31,7 @@ Configuration Reference interface: Sylius\Component\Taxonomy\Model\TaxonTranslationInterface controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController repository: ~ - factory: Sylius\Component\Resource\Factory\Factory + factory: Sylius\Resource\Factory\Factory form: Sylius\Bundle\TaxonomyBundle\Form\Type\TaxonTranslationType Bug tracking diff --git a/docs/components_and_bundles/bundles/SyliusUserBundle/summary.rst b/docs/components_and_bundles/bundles/SyliusUserBundle/summary.rst index 434cda1c9d..6fae52e937 100644 --- a/docs/components_and_bundles/bundles/SyliusUserBundle/summary.rst +++ b/docs/components_and_bundles/bundles/SyliusUserBundle/summary.rst @@ -25,7 +25,7 @@ Configuration reference form: Sylius\Bundle\CoreBundle\Form\Type\User\AdminUserType interface: Sylius\Component\User\Model\UserInterface controller: Sylius\Bundle\UserBundle\Controller\UserController - factory: Sylius\Component\Resource\Factory\Factory + factory: Sylius\Resource\Factory\Factory templates: 'SyliusUserBundle:User' encoder: null login_tracking_interval: null @@ -49,7 +49,7 @@ Configuration reference form: Sylius\Bundle\CoreBundle\Form\Type\User\ShopUserType interface: Sylius\Component\User\Model\UserInterface controller: Sylius\Bundle\UserBundle\Controller\UserController - factory: Sylius\Component\Resource\Factory\Factory + factory: Sylius\Resource\Factory\Factory templates: 'SyliusUserBundle:User' encoder: null login_tracking_interval: null @@ -71,7 +71,7 @@ Configuration reference model: Sylius\Component\User\Model\UserOAuth interface: Sylius\Component\User\Model\UserOAuthInterface controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController - factory: Sylius\Component\Resource\Factory\Factory + factory: Sylius\Resource\Factory\Factory form: Sylius\Bundle\UserBundle\Form\Type\UserType templates: 'SyliusUserBundle:User' encoder: false diff --git a/docs/components_and_bundles/components/Addressing/basic_usage.rst b/docs/components_and_bundles/components/Addressing/basic_usage.rst index 42739b6a63..b8073243a8 100644 --- a/docs/components_and_bundles/components/Addressing/basic_usage.rst +++ b/docs/components_and_bundles/components/Addressing/basic_usage.rst @@ -34,7 +34,7 @@ First lets make some preparations. use Sylius\Component\Addressing\Model\Zone; use Sylius\Component\Addressing\Model\ZoneInterface; use Sylius\Component\Addressing\Model\ZoneMember; - use Sylius\Component\Resource\Repository\InMemoryRepository; + use Sylius\Resource\Doctrine\Persistence\InMemoryRepository; $zoneRepository = new InMemoryRepository(ZoneInterface::class); $zone = new Zone(); diff --git a/docs/components_and_bundles/components/Currency/basic_usage.rst b/docs/components_and_bundles/components/Currency/basic_usage.rst index af077d032b..48623ea8ae 100644 --- a/docs/components_and_bundles/components/Currency/basic_usage.rst +++ b/docs/components_and_bundles/components/Currency/basic_usage.rst @@ -59,7 +59,7 @@ The **CurrencyProvider** allows you to get all available currencies. getSubject() instanceof OrderItemInterface) { throw new \LogicException( diff --git a/docs/customization/controller.rst b/docs/customization/controller.rst index 1c78436ea1..99be29ba40 100644 --- a/docs/customization/controller.rst +++ b/docs/customization/controller.rst @@ -61,7 +61,7 @@ getting a list of recommended products from your external api. namespace App\Controller; use Sylius\Bundle\ResourceBundle\Controller\ResourceController; - use Sylius\Component\Resource\ResourceActions; + use Sylius\Resource\ResourceActions; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; diff --git a/docs/customization/tips_and_tricks.rst b/docs/customization/tips_and_tricks.rst index f560f1b5f6..48030f55c3 100644 --- a/docs/customization/tips_and_tricks.rst +++ b/docs/customization/tips_and_tricks.rst @@ -51,7 +51,7 @@ The output of that command should look similar to: form: Sylius\Bundle\CoreBundle\Form\Type\User\AdminUserType interface: Sylius\Component\User\Model\UserInterface controller: Sylius\Bundle\UserBundle\Controller\UserController - factory: Sylius\Component\Resource\Factory\Factory + factory: Sylius\Resource\Factory\Factory ... shop: user: @@ -61,7 +61,7 @@ The output of that command should look similar to: form: Sylius\Bundle\CoreBundle\Form\Type\User\ShopUserType interface: Sylius\Component\User\Model\UserInterface controller: Sylius\Bundle\UserBundle\Controller\UserController - factory: Sylius\Component\Resource\Factory\Factory + factory: Sylius\Resource\Factory\Factory ... oauth: user: @@ -69,7 +69,7 @@ The output of that command should look similar to: model: Sylius\Component\User\Model\UserOAuth interface: Sylius\Component\User\Model\UserOAuthInterface controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController - factory: Sylius\Component\Resource\Factory\Factory + factory: Sylius\Resource\Factory\Factory ... As you can see there is an extra layer in the configuration here. diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 7b732ffaf8..e3e894d51e 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -40,40 +40,6 @@ parameters: # Random errors related to Template Events (we're going to replace them with Twig Events anyway) - 'src/Sylius/Bundle/UiBundle/Console/Command/DebugTemplateEventCommand.php' - # To support both sylius/resource-bundle 1.11 and older versions - - 'src/Sylius/Bundle/AdminBundle/Controller/RedirectHandler.php' - - 'src/Sylius/Bundle/AdminBundle/Form/DataTransformer/ProductsToProductAssociationsTransformer.php' - - 'src/Sylius/Bundle/AdminBundle/Provider/LoggedInAdminUserProvider.php' - - 'src/Sylius/Bundle/AdminBundle/Twig/Component/Customer/OrderStatisticsComponent.php' - - 'src/Sylius/Bundle/AdminBundle/Twig/Component/Order/AddressHistoryComponent.php' - - 'src/Sylius/Bundle/AdminBundle/Twig/Component/Taxon/FormComponent.php' - - 'src/Sylius/Bundle/ApiBundle/OpenApi/Documentation/AcceptLanguageHeaderDocumentationModifier.php' - - 'src/Sylius/Bundle/CoreBundle/Doctrine/ORM/Handler/ResourceDeleteHandler.php' - - 'src/Sylius/Bundle/CoreBundle/Doctrine/ORM/Handler/ResourceUpdateHandler.php' - - 'src/Sylius/Bundle/CoreBundle/Fixture/Factory/PromotionExampleFactory.php' - - 'src/Sylius/Bundle/CoreBundle/Resource/StateMachine/Controller/CompositeStateMachine.php' - - 'src/Sylius/Bundle/CoreBundle/Validator/Constraints/ChannelCodeCollectionValidator.php' - - 'src/Sylius/Bundle/CoreBundle/Validator/Constraints/CountryCodeExistsValidator.php' - - 'src/Sylius/Bundle/CoreBundle/Validator/Constraints/ResendOrderConfirmationEmailWithValidOrderStateValidator.php' - - 'src/Sylius/Bundle/CoreBundle/Validator/Constraints/ResendShipmentConfirmationEmailWithValidShipmentStateValidator.php' - - 'src/Sylius/Bundle/PromotionBundle/Form/Type/PromotionCouponToCodeType.php' - - 'src/Sylius/Bundle/TaxonomyBundle/Controller/TaxonSlugController.php' - - 'src/Sylius/Bundle/UserBundle/Factory/UserWithEncoderFactory.php' - - 'src/Sylius/Component/Addressing/Matcher/ZoneMatcher.php' - - 'src/Sylius/Component/Core/Customer/Statistics/CustomerStatisticsProvider.php' - - 'src/Sylius/Component/Core/Factory/ChannelFactory.php' - - 'src/Sylius/Component/Core/Factory/PaymentMethodFactory.php' - - 'src/Sylius/Component/Core/Factory/PromotionActionFactory.php' - - 'src/Sylius/Component/Core/Promotion/Checker/ProductInPromotionRuleChecker.php' - - 'src/Sylius/Component/Core/Promotion/Checker/TaxonInPromotionRuleChecker.php' - - 'src/Sylius/Component/Core/Provider/TranslationLocaleProvider.php' - - 'src/Sylius/Component/Core/Test/Tests/Taxation/Applicator/OrderItemUnitsTaxesApplicatorTest.php' - - 'src/Sylius/Component/Core/Test/Tests/Taxation/Applicator/OrderItemsTaxesApplicatorTest.php' - - 'src/Sylius/Component/Core/Translation/TranslatableEntityLocaleAssigner.php' - - 'src/Sylius/Component/Locale/Provider/LocaleCollectionProvider.php' - - 'src/Sylius/Component/Locale/Provider/LocaleProvider.php' - - 'src/Sylius/Component/Taxation/Resolver/TaxRateResolver.php' - ignoreErrors: - '/(Interface|Class) [a-zA-Z\\]+ specifies template type (\w+) of interface [a-zA-Z\\]+ as [a-zA-Z\\]+ (of [a-zA-Z\\]+ )?but it''s already specified as/' # turns off a weird generics check behavior, we are basing on Psalm for generics checks - '/Access to an undefined property Doctrine\\Common\\Collections\\ArrayCollection/' @@ -87,14 +53,3 @@ parameters: - '/Method [a-zA-z\\]+Persister\:\:(persist|remove|supports)\(\) has parameter \$data with no type specified./' - '/Method Sylius\\Bundle\\AdminBundle\\Twig\\Component\\[a-zA-Z\\]+\:\:getDataModelValue\(\) is unused./' - '/Method Sylius\\Bundle\\ShopBundle\\Twig\\Component\\[a-zA-Z\\]+\:\:getDataModelValue\(\) is unused./' - - # To support both sylius/resource-bundle 1.11 and older versions - - '/Call to an undefined method Sylius\\Resource\\Model\\ResourceInterface::\w+\(\)\./' - - '/Method Sylius\\Component\\Payment\\Resolver\\PaymentMethodsResolver::getSupportedMethods\(\) should return array but returns array\./' - - '/Method Sylius\\Component\\Taxation\\Resolver\\TaxRateResolver::resolve\(\) should return Sylius\\Component\\Taxation\\Model\\TaxRateInterface\|null but returns Sylius\\Resource\\Model\\ResourceInterface\|null\./' - - '/Parameter #\d+ \$(\w+) \(Sylius\\Component\\\w+\\Model\\\w+(\|null)?\) of method Sylius\\Bundle\\\w+\\Controller\\\w+::\w+\(\) is not contravariant with parameter #\d+ \$(\w+) \(Sylius\\Resource\\Model\\\w+(\|null)?\) of method Sylius\\Bundle\\\w+\\Controller\\\w+\::\w+\(\)\./' - - '/PHPDoc tag @extends contains generic type Sylius\\Component\\Resource\\\w+\\\w+ but interface Sylius\\Component\\Resource\\\w+\\\w+ is not generic\./' - - '/PHPDoc tag @param for parameter \$(\w+) contains generic type Sylius\\Component\\Resource\\\w+\\\w+ but interface Sylius\\Component\\Resource\\\w+\\\w+ is not generic\./' - - '/PHPDoc type for property Sylius\\Bundle\\\w+\\\w+\\\w+::\$(\w+) contains generic type Sylius\\Component\\Resource\\\w+\\\w+ but interface Sylius\\Component\\Resource\\\w+\\\w+ is not generic\./' - - '/PHPDoc type for property Sylius\\Bundle\\\w+\\\w+\\\w+\\\w+::\$(\w+) contains generic type Sylius\\Component\\Resource\\\w+\\\w+ but interface Sylius\\Component\\Resource\\\w+\\\w+ is not generic\./' - - '/PHPDoc type for property Sylius\\Bundle\\\w+\\\w+\\\w+\\\w+\\\w+::\$(\w+) contains generic type Sylius\\Component\\Resource\\\w+\\\w+ but interface Sylius\\Component\\Resource\\\w+\\\w+ is not generic\./' diff --git a/src/Sylius/Behat/Context/Api/Admin/ManagingChannelPriceHistoryConfigContext.php b/src/Sylius/Behat/Context/Api/Admin/ManagingChannelPriceHistoryConfigContext.php index a9a79eaf45..309ebd409e 100644 --- a/src/Sylius/Behat/Context/Api/Admin/ManagingChannelPriceHistoryConfigContext.php +++ b/src/Sylius/Behat/Context/Api/Admin/ManagingChannelPriceHistoryConfigContext.php @@ -20,7 +20,7 @@ use Sylius\Behat\Service\Converter\IriConverterInterface; use Sylius\Behat\Service\SharedStorageInterface; use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Component\Core\Model\TaxonInterface; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ResourceInterface; use Webmozart\Assert\Assert; final class ManagingChannelPriceHistoryConfigContext implements Context diff --git a/src/Sylius/Behat/Context/Api/Shop/CheckoutContext.php b/src/Sylius/Behat/Context/Api/Shop/CheckoutContext.php index 3761f9913f..4f23469a8e 100644 --- a/src/Sylius/Behat/Context/Api/Shop/CheckoutContext.php +++ b/src/Sylius/Behat/Context/Api/Shop/CheckoutContext.php @@ -35,7 +35,7 @@ use Sylius\Component\Core\Model\ShopUserInterface; use Sylius\Component\Core\OrderCheckoutStates; use Sylius\Component\Core\Repository\OrderRepositoryInterface; use Sylius\Component\Product\Resolver\ProductVariantResolverInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\HttpFoundation\Request as HTTPRequest; use Symfony\Component\HttpFoundation\Response; use Webmozart\Assert\Assert; diff --git a/src/Sylius/Behat/Context/Domain/ManagingOrdersContext.php b/src/Sylius/Behat/Context/Domain/ManagingOrdersContext.php index 39cac26bd1..f9f101e407 100644 --- a/src/Sylius/Behat/Context/Domain/ManagingOrdersContext.php +++ b/src/Sylius/Behat/Context/Domain/ManagingOrdersContext.php @@ -22,7 +22,7 @@ use Sylius\Component\Core\Model\ProductInterface; use Sylius\Component\Core\Repository\OrderRepositoryInterface; use Sylius\Component\Core\Updater\UnpaidOrdersStateUpdaterInterface; use Sylius\Component\Product\Resolver\ProductVariantResolverInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Webmozart\Assert\Assert; final class ManagingOrdersContext implements Context diff --git a/src/Sylius/Behat/Context/Domain/ManagingPriceHistoryContext.php b/src/Sylius/Behat/Context/Domain/ManagingPriceHistoryContext.php index 2b0adeaf06..daf47ccc4e 100644 --- a/src/Sylius/Behat/Context/Domain/ManagingPriceHistoryContext.php +++ b/src/Sylius/Behat/Context/Domain/ManagingPriceHistoryContext.php @@ -18,7 +18,7 @@ use Sylius\Bundle\CoreBundle\PriceHistory\Remover\ChannelPricingLogEntriesRemove use Sylius\Component\Core\Model\ChannelPricingInterface; use Sylius\Component\Core\Model\ProductInterface; use Sylius\Component\Product\Resolver\ProductVariantResolverInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Webmozart\Assert\Assert; final class ManagingPriceHistoryContext implements Context diff --git a/src/Sylius/Behat/Context/Domain/ManagingProductsContext.php b/src/Sylius/Behat/Context/Domain/ManagingProductsContext.php index bd92965cb0..51c092d929 100644 --- a/src/Sylius/Behat/Context/Domain/ManagingProductsContext.php +++ b/src/Sylius/Behat/Context/Domain/ManagingProductsContext.php @@ -17,7 +17,7 @@ use Behat\Behat\Context\Context; use Sylius\Behat\Service\SharedStorageInterface; use Sylius\Component\Core\Model\ProductInterface; use Sylius\Component\Core\Model\ProductVariantInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Webmozart\Assert\Assert; final class ManagingProductsContext implements Context diff --git a/src/Sylius/Behat/Context/Domain/ManagingShippingMethodsContext.php b/src/Sylius/Behat/Context/Domain/ManagingShippingMethodsContext.php index c37ba665c3..5d55d40cb4 100644 --- a/src/Sylius/Behat/Context/Domain/ManagingShippingMethodsContext.php +++ b/src/Sylius/Behat/Context/Domain/ManagingShippingMethodsContext.php @@ -15,8 +15,8 @@ namespace Sylius\Behat\Context\Domain; use Behat\Behat\Context\Context; use Doctrine\Persistence\ObjectManager; -use Sylius\Component\Resource\Repository\RepositoryInterface; use Sylius\Component\Shipping\Model\ShippingMethodInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Webmozart\Assert\Assert; final class ManagingShippingMethodsContext implements Context diff --git a/src/Sylius/Behat/Context/Setup/CartContext.php b/src/Sylius/Behat/Context/Setup/CartContext.php index 5afee64085..66ceac136d 100644 --- a/src/Sylius/Behat/Context/Setup/CartContext.php +++ b/src/Sylius/Behat/Context/Setup/CartContext.php @@ -28,7 +28,7 @@ use Sylius\Component\Core\Repository\OrderRepositoryInterface; use Sylius\Component\Product\Model\ProductOptionInterface; use Sylius\Component\Product\Model\ProductOptionValueInterface; use Sylius\Component\Product\Resolver\ProductVariantResolverInterface; -use Sylius\Component\Resource\Generator\RandomnessGeneratorInterface; +use Sylius\Resource\Generator\RandomnessGeneratorInterface; use Symfony\Component\Messenger\MessageBusInterface; final readonly class CartContext implements Context diff --git a/src/Sylius/Behat/Context/Setup/CatalogPromotionContext.php b/src/Sylius/Behat/Context/Setup/CatalogPromotionContext.php index a8dfea916b..0235efb90e 100644 --- a/src/Sylius/Behat/Context/Setup/CatalogPromotionContext.php +++ b/src/Sylius/Behat/Context/Setup/CatalogPromotionContext.php @@ -36,7 +36,7 @@ use Sylius\Component\Promotion\Model\CatalogPromotionActionInterface; use Sylius\Component\Promotion\Model\CatalogPromotionScopeInterface; use Sylius\Component\Promotion\Model\CatalogPromotionStates; use Sylius\Component\Promotion\Model\CatalogPromotionTransitions; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\Messenger\MessageBusInterface; final class CatalogPromotionContext implements Context diff --git a/src/Sylius/Behat/Context/Setup/CheckoutContext.php b/src/Sylius/Behat/Context/Setup/CheckoutContext.php index 08da66b485..b59200fc61 100644 --- a/src/Sylius/Behat/Context/Setup/CheckoutContext.php +++ b/src/Sylius/Behat/Context/Setup/CheckoutContext.php @@ -25,8 +25,8 @@ use Sylius\Component\Core\Model\PaymentMethodInterface; use Sylius\Component\Core\Model\ShipmentInterface; use Sylius\Component\Core\Model\ShippingMethodInterface; use Sylius\Component\Core\Repository\OrderRepositoryInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\Messenger\MessageBusInterface; use Webmozart\Assert\Assert; diff --git a/src/Sylius/Behat/Context/Setup/CurrencyContext.php b/src/Sylius/Behat/Context/Setup/CurrencyContext.php index 406cd2870e..b08b9836e1 100644 --- a/src/Sylius/Behat/Context/Setup/CurrencyContext.php +++ b/src/Sylius/Behat/Context/Setup/CurrencyContext.php @@ -18,8 +18,8 @@ use Doctrine\Persistence\ObjectManager; use Sylius\Behat\Service\SharedStorageInterface; use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Component\Currency\Model\CurrencyInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class CurrencyContext implements Context { diff --git a/src/Sylius/Behat/Context/Setup/CustomerContext.php b/src/Sylius/Behat/Context/Setup/CustomerContext.php index 5efa3a296a..50c49f0c49 100644 --- a/src/Sylius/Behat/Context/Setup/CustomerContext.php +++ b/src/Sylius/Behat/Context/Setup/CustomerContext.php @@ -22,7 +22,7 @@ use Sylius\Component\Core\Model\CustomerInterface; use Sylius\Component\Core\Model\ShopUserInterface; use Sylius\Component\Core\Repository\CustomerRepositoryInterface; use Sylius\Component\Customer\Model\CustomerGroupInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class CustomerContext implements Context { diff --git a/src/Sylius/Behat/Context/Setup/CustomerGroupContext.php b/src/Sylius/Behat/Context/Setup/CustomerGroupContext.php index 445d6a64b5..2fac589737 100644 --- a/src/Sylius/Behat/Context/Setup/CustomerGroupContext.php +++ b/src/Sylius/Behat/Context/Setup/CustomerGroupContext.php @@ -17,8 +17,8 @@ use Behat\Behat\Context\Context; use Sylius\Behat\Service\SharedStorageInterface; use Sylius\Component\Core\Formatter\StringInflector; use Sylius\Component\Customer\Model\CustomerGroupInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class CustomerGroupContext implements Context { diff --git a/src/Sylius/Behat/Context/Setup/ExchangeRateContext.php b/src/Sylius/Behat/Context/Setup/ExchangeRateContext.php index 93c1c6db53..f11527dad7 100644 --- a/src/Sylius/Behat/Context/Setup/ExchangeRateContext.php +++ b/src/Sylius/Behat/Context/Setup/ExchangeRateContext.php @@ -18,7 +18,7 @@ use Sylius\Behat\Service\SharedStorageInterface; use Sylius\Component\Currency\Model\CurrencyInterface; use Sylius\Component\Currency\Model\ExchangeRateInterface; use Sylius\Component\Currency\Repository\ExchangeRateRepositoryInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class ExchangeRateContext implements Context { diff --git a/src/Sylius/Behat/Context/Setup/GeographicalContext.php b/src/Sylius/Behat/Context/Setup/GeographicalContext.php index 19acf39238..aaaf6a45bd 100644 --- a/src/Sylius/Behat/Context/Setup/GeographicalContext.php +++ b/src/Sylius/Behat/Context/Setup/GeographicalContext.php @@ -19,8 +19,8 @@ use Sylius\Behat\Service\SharedStorageInterface; use Sylius\Component\Addressing\Converter\CountryNameConverterInterface; use Sylius\Component\Addressing\Model\CountryInterface; use Sylius\Component\Addressing\Model\ProvinceInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class GeographicalContext implements Context { diff --git a/src/Sylius/Behat/Context/Setup/LocaleContext.php b/src/Sylius/Behat/Context/Setup/LocaleContext.php index 990cabf2ba..dbf2363102 100644 --- a/src/Sylius/Behat/Context/Setup/LocaleContext.php +++ b/src/Sylius/Behat/Context/Setup/LocaleContext.php @@ -19,8 +19,8 @@ use Sylius\Behat\Service\SharedStorageInterface; use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Component\Locale\Converter\LocaleConverterInterface; use Sylius\Component\Locale\Model\LocaleInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final readonly class LocaleContext implements Context { diff --git a/src/Sylius/Behat/Context/Setup/OrderContext.php b/src/Sylius/Behat/Context/Setup/OrderContext.php index 98651bc3a0..f24702a42e 100644 --- a/src/Sylius/Behat/Context/Setup/OrderContext.php +++ b/src/Sylius/Behat/Context/Setup/OrderContext.php @@ -43,11 +43,11 @@ use Sylius\Component\Payment\Model\PaymentMethodInterface; use Sylius\Component\Payment\PaymentTransitions; use Sylius\Component\Payment\Repository\PaymentMethodRepositoryInterface; use Sylius\Component\Product\Resolver\ProductVariantResolverInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Generator\RandomnessGeneratorInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; use Sylius\Component\Shipping\Repository\ShippingMethodRepositoryInterface; use Sylius\Component\Shipping\ShipmentTransitions; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; +use Sylius\Resource\Generator\RandomnessGeneratorInterface; use Symfony\Component\Clock\ClockInterface; use Webmozart\Assert\Assert; diff --git a/src/Sylius/Behat/Context/Setup/PaymentContext.php b/src/Sylius/Behat/Context/Setup/PaymentContext.php index 9fa1a569e2..19cf4b37fd 100644 --- a/src/Sylius/Behat/Context/Setup/PaymentContext.php +++ b/src/Sylius/Behat/Context/Setup/PaymentContext.php @@ -23,7 +23,7 @@ use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Core\Model\PaymentMethodInterface; use Sylius\Component\Payment\Model\PaymentMethodTranslationInterface; use Sylius\Component\Payment\Repository\PaymentMethodRepositoryInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Webmozart\Assert\Assert; final readonly class PaymentContext implements Context diff --git a/src/Sylius/Behat/Context/Setup/ProductAssociationContext.php b/src/Sylius/Behat/Context/Setup/ProductAssociationContext.php index 67e35ca6f7..befb661104 100644 --- a/src/Sylius/Behat/Context/Setup/ProductAssociationContext.php +++ b/src/Sylius/Behat/Context/Setup/ProductAssociationContext.php @@ -21,8 +21,8 @@ use Sylius\Component\Product\Model\ProductAssociationInterface; use Sylius\Component\Product\Model\ProductAssociationTypeInterface; use Sylius\Component\Product\Model\ProductAssociationTypeTranslationInterface; use Sylius\Component\Product\Repository\ProductAssociationTypeRepositoryInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class ProductAssociationContext implements Context { diff --git a/src/Sylius/Behat/Context/Setup/ProductAttributeContext.php b/src/Sylius/Behat/Context/Setup/ProductAttributeContext.php index ce74b20cc4..d91c5485c3 100644 --- a/src/Sylius/Behat/Context/Setup/ProductAttributeContext.php +++ b/src/Sylius/Behat/Context/Setup/ProductAttributeContext.php @@ -26,8 +26,8 @@ use Sylius\Component\Core\Formatter\StringInflector; use Sylius\Component\Core\Model\ProductInterface; use Sylius\Component\Product\Model\ProductAttributeInterface; use Sylius\Component\Product\Model\ProductAttributeValueInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class ProductAttributeContext implements Context { diff --git a/src/Sylius/Behat/Context/Setup/ProductContext.php b/src/Sylius/Behat/Context/Setup/ProductContext.php index e19c6b5ec5..8bda9f883d 100644 --- a/src/Sylius/Behat/Context/Setup/ProductContext.php +++ b/src/Sylius/Behat/Context/Setup/ProductContext.php @@ -39,9 +39,9 @@ use Sylius\Component\Product\Model\ProductOptionInterface; use Sylius\Component\Product\Model\ProductOptionValueInterface; use Sylius\Component\Product\Model\ProductVariantTranslationInterface; use Sylius\Component\Product\Resolver\ProductVariantResolverInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; use Sylius\Component\Shipping\Model\ShippingCategoryInterface; use Sylius\Component\Taxation\Model\TaxCategoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\HttpFoundation\File\UploadedFile; use Symfony\Component\Messenger\MessageBusInterface; use Webmozart\Assert\Assert; diff --git a/src/Sylius/Behat/Context/Setup/ProductOptionContext.php b/src/Sylius/Behat/Context/Setup/ProductOptionContext.php index 21b177f308..98a7f5c611 100644 --- a/src/Sylius/Behat/Context/Setup/ProductOptionContext.php +++ b/src/Sylius/Behat/Context/Setup/ProductOptionContext.php @@ -20,7 +20,7 @@ use Sylius\Component\Core\Formatter\StringInflector; use Sylius\Component\Product\Model\ProductOptionInterface; use Sylius\Component\Product\Model\ProductOptionValueInterface; use Sylius\Component\Product\Repository\ProductOptionRepositoryInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class ProductOptionContext implements Context { diff --git a/src/Sylius/Behat/Context/Setup/ProductReviewContext.php b/src/Sylius/Behat/Context/Setup/ProductReviewContext.php index 53758fe26e..943b95cb8b 100644 --- a/src/Sylius/Behat/Context/Setup/ProductReviewContext.php +++ b/src/Sylius/Behat/Context/Setup/ProductReviewContext.php @@ -19,9 +19,9 @@ use Sylius\Behat\Service\SharedStorageInterface; use Sylius\Component\Core\Model\CustomerInterface; use Sylius\Component\Core\Model\ProductInterface; use Sylius\Component\Core\ProductReviewTransitions; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; use Sylius\Component\Review\Model\ReviewInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class ProductReviewContext implements Context { diff --git a/src/Sylius/Behat/Context/Setup/ProductTaxonContext.php b/src/Sylius/Behat/Context/Setup/ProductTaxonContext.php index 2c8bea4ed7..383202ad36 100644 --- a/src/Sylius/Behat/Context/Setup/ProductTaxonContext.php +++ b/src/Sylius/Behat/Context/Setup/ProductTaxonContext.php @@ -18,7 +18,7 @@ use Doctrine\Persistence\ObjectManager; use Sylius\Component\Core\Model\ProductInterface; use Sylius\Component\Core\Model\ProductTaxonInterface; use Sylius\Component\Core\Model\TaxonInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class ProductTaxonContext implements Context { diff --git a/src/Sylius/Behat/Context/Setup/ShippingCategoryContext.php b/src/Sylius/Behat/Context/Setup/ShippingCategoryContext.php index 91df57e029..d63c113ae0 100644 --- a/src/Sylius/Behat/Context/Setup/ShippingCategoryContext.php +++ b/src/Sylius/Behat/Context/Setup/ShippingCategoryContext.php @@ -16,9 +16,9 @@ namespace Sylius\Behat\Context\Setup; use Behat\Behat\Context\Context; use Sylius\Behat\Service\SharedStorageInterface; use Sylius\Component\Core\Formatter\StringInflector; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; use Sylius\Component\Shipping\Model\ShippingCategoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class ShippingCategoryContext implements Context { diff --git a/src/Sylius/Behat/Context/Setup/ShippingContext.php b/src/Sylius/Behat/Context/Setup/ShippingContext.php index dc6cc25df7..969b499082 100644 --- a/src/Sylius/Behat/Context/Setup/ShippingContext.php +++ b/src/Sylius/Behat/Context/Setup/ShippingContext.php @@ -25,8 +25,6 @@ use Sylius\Component\Core\Model\ShippingMethodInterface; use Sylius\Component\Core\Repository\ShippingMethodRepositoryInterface; use Sylius\Component\Core\Shipping\Checker\Rule\OrderTotalGreaterThanOrEqualRuleChecker; use Sylius\Component\Core\Shipping\Checker\Rule\OrderTotalLessThanOrEqualRuleChecker; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; use Sylius\Component\Shipping\Calculator\DefaultCalculators; use Sylius\Component\Shipping\Checker\Rule\TotalWeightGreaterThanOrEqualRuleChecker; use Sylius\Component\Shipping\Checker\Rule\TotalWeightLessThanOrEqualRuleChecker; @@ -34,6 +32,8 @@ use Sylius\Component\Shipping\Model\ShippingCategoryInterface; use Sylius\Component\Shipping\Model\ShippingMethodRuleInterface; use Sylius\Component\Shipping\Model\ShippingMethodTranslationInterface; use Sylius\Component\Taxation\Model\TaxCategoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class ShippingContext implements Context { diff --git a/src/Sylius/Behat/Context/Setup/TaxationContext.php b/src/Sylius/Behat/Context/Setup/TaxationContext.php index 1baf31903c..efcdadbf37 100644 --- a/src/Sylius/Behat/Context/Setup/TaxationContext.php +++ b/src/Sylius/Behat/Context/Setup/TaxationContext.php @@ -19,10 +19,10 @@ use Sylius\Behat\Service\SharedStorageInterface; use Sylius\Component\Addressing\Model\ZoneInterface; use Sylius\Component\Core\Formatter\StringInflector; use Sylius\Component\Core\Model\TaxRateInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; use Sylius\Component\Taxation\Model\TaxCategoryInterface; use Sylius\Component\Taxation\Repository\TaxCategoryRepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Webmozart\Assert\Assert; final class TaxationContext implements Context diff --git a/src/Sylius/Behat/Context/Setup/TaxonomyContext.php b/src/Sylius/Behat/Context/Setup/TaxonomyContext.php index 0f303f14d0..461d6f09eb 100644 --- a/src/Sylius/Behat/Context/Setup/TaxonomyContext.php +++ b/src/Sylius/Behat/Context/Setup/TaxonomyContext.php @@ -19,10 +19,10 @@ use Sylius\Component\Core\Formatter\StringInflector; use Sylius\Component\Core\Model\ImageInterface; use Sylius\Component\Core\Model\TaxonInterface; use Sylius\Component\Core\Uploader\ImageUploaderInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; use Sylius\Component\Taxonomy\Generator\TaxonSlugGeneratorInterface; use Sylius\Component\Taxonomy\Model\TaxonTranslationInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\HttpFoundation\File\UploadedFile; final class TaxonomyContext implements Context diff --git a/src/Sylius/Behat/Context/Setup/ZoneContext.php b/src/Sylius/Behat/Context/Setup/ZoneContext.php index 6db3dbc632..2ec10a4632 100644 --- a/src/Sylius/Behat/Context/Setup/ZoneContext.php +++ b/src/Sylius/Behat/Context/Setup/ZoneContext.php @@ -24,9 +24,9 @@ use Sylius\Component\Addressing\Model\ZoneInterface; use Sylius\Component\Addressing\Model\ZoneMemberInterface; use Sylius\Component\Core\Formatter\StringInflector; use Sylius\Component\Core\Model\ChannelInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Model\CodeAwareInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; +use Sylius\Resource\Model\CodeAwareInterface; use Symfony\Component\Intl\Countries; final class ZoneContext implements Context diff --git a/src/Sylius/Behat/Context/Transform/AddressContext.php b/src/Sylius/Behat/Context/Transform/AddressContext.php index 32deb4956d..507969c70c 100644 --- a/src/Sylius/Behat/Context/Transform/AddressContext.php +++ b/src/Sylius/Behat/Context/Transform/AddressContext.php @@ -18,7 +18,7 @@ use Sylius\Bundle\CoreBundle\Fixture\Factory\ExampleFactoryInterface; use Sylius\Component\Addressing\Converter\CountryNameConverterInterface; use Sylius\Component\Core\Model\AddressInterface; use Sylius\Component\Core\Repository\AddressRepositoryInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Webmozart\Assert\Assert; final class AddressContext implements Context diff --git a/src/Sylius/Behat/Context/Transform/AdminUserContext.php b/src/Sylius/Behat/Context/Transform/AdminUserContext.php index 6a72a52e23..ebd6c1da99 100644 --- a/src/Sylius/Behat/Context/Transform/AdminUserContext.php +++ b/src/Sylius/Behat/Context/Transform/AdminUserContext.php @@ -16,7 +16,7 @@ namespace Sylius\Behat\Context\Transform; use Behat\Behat\Context\Context; use Sylius\Behat\Service\SharedStorageInterface; use Sylius\Component\Core\Model\AdminUserInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Webmozart\Assert\Assert; final class AdminUserContext implements Context diff --git a/src/Sylius/Behat/Context/Transform/CatalogPromotionContext.php b/src/Sylius/Behat/Context/Transform/CatalogPromotionContext.php index 1252a2f2ef..5da10532f1 100644 --- a/src/Sylius/Behat/Context/Transform/CatalogPromotionContext.php +++ b/src/Sylius/Behat/Context/Transform/CatalogPromotionContext.php @@ -15,7 +15,7 @@ namespace Sylius\Behat\Context\Transform; use Behat\Behat\Context\Context; use Sylius\Component\Core\Model\CatalogPromotionInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Webmozart\Assert\Assert; final class CatalogPromotionContext implements Context diff --git a/src/Sylius/Behat/Context/Transform/CountryContext.php b/src/Sylius/Behat/Context/Transform/CountryContext.php index ad51d8601b..fc49f66310 100644 --- a/src/Sylius/Behat/Context/Transform/CountryContext.php +++ b/src/Sylius/Behat/Context/Transform/CountryContext.php @@ -15,7 +15,7 @@ namespace Sylius\Behat\Context\Transform; use Behat\Behat\Context\Context; use Sylius\Component\Addressing\Converter\CountryNameConverterInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Webmozart\Assert\Assert; final class CountryContext implements Context diff --git a/src/Sylius/Behat/Context/Transform/CouponContext.php b/src/Sylius/Behat/Context/Transform/CouponContext.php index 8cb0e25e7d..87de4896f3 100644 --- a/src/Sylius/Behat/Context/Transform/CouponContext.php +++ b/src/Sylius/Behat/Context/Transform/CouponContext.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Behat\Context\Transform; use Behat\Behat\Context\Context; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Webmozart\Assert\Assert; final class CouponContext implements Context diff --git a/src/Sylius/Behat/Context/Transform/CurrencyContext.php b/src/Sylius/Behat/Context/Transform/CurrencyContext.php index ab95117142..c71a1c5d88 100644 --- a/src/Sylius/Behat/Context/Transform/CurrencyContext.php +++ b/src/Sylius/Behat/Context/Transform/CurrencyContext.php @@ -15,7 +15,7 @@ namespace Sylius\Behat\Context\Transform; use Behat\Behat\Context\Context; use Sylius\Component\Currency\Converter\CurrencyNameConverterInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Webmozart\Assert\Assert; final class CurrencyContext implements Context diff --git a/src/Sylius/Behat/Context/Transform/CustomerContext.php b/src/Sylius/Behat/Context/Transform/CustomerContext.php index d9dd1babcb..ec2e791b08 100644 --- a/src/Sylius/Behat/Context/Transform/CustomerContext.php +++ b/src/Sylius/Behat/Context/Transform/CustomerContext.php @@ -17,7 +17,7 @@ use Behat\Behat\Context\Context; use Sylius\Behat\Service\SharedStorageInterface; use Sylius\Component\Core\Model\CustomerInterface; use Sylius\Component\Core\Repository\CustomerRepositoryInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class CustomerContext implements Context { diff --git a/src/Sylius/Behat/Context/Transform/CustomerGroupContext.php b/src/Sylius/Behat/Context/Transform/CustomerGroupContext.php index 9e394204c7..b54d88acf9 100644 --- a/src/Sylius/Behat/Context/Transform/CustomerGroupContext.php +++ b/src/Sylius/Behat/Context/Transform/CustomerGroupContext.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Behat\Context\Transform; use Behat\Behat\Context\Context; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Webmozart\Assert\Assert; final class CustomerGroupContext implements Context diff --git a/src/Sylius/Behat/Context/Transform/ExchangeRateContext.php b/src/Sylius/Behat/Context/Transform/ExchangeRateContext.php index 674bff503a..fd103848ee 100644 --- a/src/Sylius/Behat/Context/Transform/ExchangeRateContext.php +++ b/src/Sylius/Behat/Context/Transform/ExchangeRateContext.php @@ -17,7 +17,7 @@ use Behat\Behat\Context\Context; use Sylius\Component\Currency\Converter\CurrencyNameConverterInterface; use Sylius\Component\Currency\Model\ExchangeRateInterface; use Sylius\Component\Currency\Repository\ExchangeRateRepositoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Webmozart\Assert\Assert; final class ExchangeRateContext implements Context diff --git a/src/Sylius/Behat/Context/Transform/LocaleContext.php b/src/Sylius/Behat/Context/Transform/LocaleContext.php index 8ac56bca66..f16c4304ff 100644 --- a/src/Sylius/Behat/Context/Transform/LocaleContext.php +++ b/src/Sylius/Behat/Context/Transform/LocaleContext.php @@ -17,7 +17,7 @@ use Behat\Behat\Context\Context; use Sylius\Behat\Service\SharedStorageInterface; use Sylius\Component\Locale\Converter\LocaleConverterInterface; use Sylius\Component\Locale\Model\LocaleInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Webmozart\Assert\Assert; final readonly class LocaleContext implements Context diff --git a/src/Sylius/Behat/Context/Transform/ProductAttributeContext.php b/src/Sylius/Behat/Context/Transform/ProductAttributeContext.php index 53339f1c63..d66415c3c4 100644 --- a/src/Sylius/Behat/Context/Transform/ProductAttributeContext.php +++ b/src/Sylius/Behat/Context/Transform/ProductAttributeContext.php @@ -16,7 +16,7 @@ namespace Sylius\Behat\Context\Transform; use Behat\Behat\Context\Context; use Sylius\Component\Product\Model\ProductAttributeInterface; use Sylius\Component\Product\Model\ProductAttributeTranslationInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Webmozart\Assert\Assert; final class ProductAttributeContext implements Context diff --git a/src/Sylius/Behat/Context/Transform/ProductOptionValueContext.php b/src/Sylius/Behat/Context/Transform/ProductOptionValueContext.php index 493b43723a..37d6d2c3e8 100644 --- a/src/Sylius/Behat/Context/Transform/ProductOptionValueContext.php +++ b/src/Sylius/Behat/Context/Transform/ProductOptionValueContext.php @@ -15,7 +15,7 @@ namespace Sylius\Behat\Context\Transform; use Behat\Behat\Context\Context; use Sylius\Component\Product\Model\ProductOptionValueInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Webmozart\Assert\Assert; final class ProductOptionValueContext implements Context diff --git a/src/Sylius/Behat/Context/Transform/ProductReviewContext.php b/src/Sylius/Behat/Context/Transform/ProductReviewContext.php index 4ca03cc34c..1fb8bd3f58 100644 --- a/src/Sylius/Behat/Context/Transform/ProductReviewContext.php +++ b/src/Sylius/Behat/Context/Transform/ProductReviewContext.php @@ -14,8 +14,8 @@ declare(strict_types=1); namespace Sylius\Behat\Context\Transform; use Behat\Behat\Context\Context; -use Sylius\Component\Resource\Repository\RepositoryInterface; use Sylius\Component\Review\Model\ReviewInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Webmozart\Assert\Assert; final class ProductReviewContext implements Context diff --git a/src/Sylius/Behat/Context/Transform/ProvinceContext.php b/src/Sylius/Behat/Context/Transform/ProvinceContext.php index 40aa4bedb0..63d7e57d08 100644 --- a/src/Sylius/Behat/Context/Transform/ProvinceContext.php +++ b/src/Sylius/Behat/Context/Transform/ProvinceContext.php @@ -15,7 +15,7 @@ namespace Sylius\Behat\Context\Transform; use Behat\Behat\Context\Context; use Sylius\Component\Addressing\Model\ProvinceInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Webmozart\Assert\Assert; final class ProvinceContext implements Context diff --git a/src/Sylius/Behat/Context/Transform/ShippingCategoryContext.php b/src/Sylius/Behat/Context/Transform/ShippingCategoryContext.php index da4c58f99c..89474f73d2 100644 --- a/src/Sylius/Behat/Context/Transform/ShippingCategoryContext.php +++ b/src/Sylius/Behat/Context/Transform/ShippingCategoryContext.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Behat\Context\Transform; use Behat\Behat\Context\Context; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Webmozart\Assert\Assert; class ShippingCategoryContext implements Context diff --git a/src/Sylius/Behat/Context/Transform/TaxRateContext.php b/src/Sylius/Behat/Context/Transform/TaxRateContext.php index 9f55ef1ff0..623d697835 100644 --- a/src/Sylius/Behat/Context/Transform/TaxRateContext.php +++ b/src/Sylius/Behat/Context/Transform/TaxRateContext.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Behat\Context\Transform; use Behat\Behat\Context\Context; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Webmozart\Assert\Assert; final class TaxRateContext implements Context diff --git a/src/Sylius/Behat/Context/Transform/ZoneContext.php b/src/Sylius/Behat/Context/Transform/ZoneContext.php index e3840b31fb..82fbc5daad 100644 --- a/src/Sylius/Behat/Context/Transform/ZoneContext.php +++ b/src/Sylius/Behat/Context/Transform/ZoneContext.php @@ -15,7 +15,7 @@ namespace Sylius\Behat\Context\Transform; use Behat\Behat\Context\Context; use Sylius\Component\Addressing\Model\ZoneInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Webmozart\Assert\Assert; final class ZoneContext implements Context diff --git a/src/Sylius/Behat/Context/Transform/ZoneMemberContext.php b/src/Sylius/Behat/Context/Transform/ZoneMemberContext.php index 908936bd81..dc686586d7 100644 --- a/src/Sylius/Behat/Context/Transform/ZoneMemberContext.php +++ b/src/Sylius/Behat/Context/Transform/ZoneMemberContext.php @@ -18,7 +18,7 @@ use Sylius\Component\Addressing\Converter\CountryNameConverterInterface; use Sylius\Component\Addressing\Model\ProvinceInterface; use Sylius\Component\Addressing\Model\ZoneInterface; use Sylius\Component\Addressing\Model\ZoneMemberInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Webmozart\Assert\Assert; final class ZoneMemberContext implements Context diff --git a/src/Sylius/Behat/Context/Ui/Admin/ManagingAdministratorsContext.php b/src/Sylius/Behat/Context/Ui/Admin/ManagingAdministratorsContext.php index b812e52862..2a2729f81f 100644 --- a/src/Sylius/Behat/Context/Ui/Admin/ManagingAdministratorsContext.php +++ b/src/Sylius/Behat/Context/Ui/Admin/ManagingAdministratorsContext.php @@ -22,7 +22,7 @@ use Sylius\Behat\Page\Admin\Crud\IndexPageInterface; use Sylius\Behat\Service\NotificationCheckerInterface; use Sylius\Behat\Service\SharedStorageInterface; use Sylius\Component\Core\Model\AdminUserInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Webmozart\Assert\Assert; final class ManagingAdministratorsContext implements Context diff --git a/src/Sylius/Behat/Context/Ui/Shop/AddressBookContext.php b/src/Sylius/Behat/Context/Ui/Shop/AddressBookContext.php index 2b538eead9..134003c444 100644 --- a/src/Sylius/Behat/Context/Ui/Shop/AddressBookContext.php +++ b/src/Sylius/Behat/Context/Ui/Shop/AddressBookContext.php @@ -23,7 +23,7 @@ use Sylius\Behat\Service\NotificationCheckerInterface; use Sylius\Behat\Service\Resolver\CurrentPageResolverInterface; use Sylius\Behat\Service\SharedStorageInterface; use Sylius\Component\Core\Model\AddressInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Webmozart\Assert\Assert; final class AddressBookContext implements Context diff --git a/src/Sylius/Behat/Context/Ui/Shop/CartContext.php b/src/Sylius/Behat/Context/Ui/Shop/CartContext.php index 63170423f3..c0f82cecbd 100644 --- a/src/Sylius/Behat/Context/Ui/Shop/CartContext.php +++ b/src/Sylius/Behat/Context/Ui/Shop/CartContext.php @@ -512,7 +512,7 @@ final readonly class CartContext implements Context { Assert::true( $this->summaryPage->hasItemNamed($productName), - sprintf('Product with name "%s" was not found in the cart.', $productName) + sprintf('Product with name "%s" was not found in the cart.', $productName), ); } diff --git a/src/Sylius/Behat/Context/Ui/Shop/Checkout/CheckoutAddressingContext.php b/src/Sylius/Behat/Context/Ui/Shop/Checkout/CheckoutAddressingContext.php index 86f9017e03..7d84fa6d0a 100644 --- a/src/Sylius/Behat/Context/Ui/Shop/Checkout/CheckoutAddressingContext.php +++ b/src/Sylius/Behat/Context/Ui/Shop/Checkout/CheckoutAddressingContext.php @@ -22,7 +22,7 @@ use Sylius\Behat\Service\SharedStorageInterface; use Sylius\Component\Addressing\Comparator\AddressComparatorInterface; use Sylius\Component\Addressing\Model\CountryInterface; use Sylius\Component\Core\Model\AddressInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Webmozart\Assert\Assert; final readonly class CheckoutAddressingContext implements Context @@ -196,12 +196,12 @@ final readonly class CheckoutAddressingContext implements Context } /** - * @When /^I specify the billing (address as "([^"]+)", "([^"]+)", "([^"]+)", "([^"]+)" for "([^"]+)")$/ - * @When /^I specify the billing (address for "([^"]+)" from "([^"]+)", "([^"]+)", "([^"]+)", "([^"]+)", "([^"]+)")$/ * @Given /^the customer specify the billing (address as "([^"]+)", "([^"]+)", "([^"]+)", "([^"]+)" for "([^"]+)")$/ * @Given /^the visitor specify the billing (address as "([^"]+)", "([^"]+)", "([^"]+)", "([^"]+)" for "([^"]+)")$/ * @Given /^the visitor has specified (address as "([^"]+)", "([^"]+)", "([^"]+)", "([^"]+)" for "([^"]+)")$/ * @Given /^the customer has specified (address as "([^"]+)", "([^"]+)", "([^"]+)", "([^"]+)" for "([^"]+)")$/ + * @When /^I specify the billing (address as "([^"]+)", "([^"]+)", "([^"]+)", "([^"]+)" for "([^"]+)")$/ + * @When /^I specify the billing (address for "([^"]+)" from "([^"]+)", "([^"]+)", "([^"]+)", "([^"]+)", "([^"]+)")$/ * @When /^I (do not specify any billing address) information$/ */ public function iSpecifyTheBillingAddressAs(AddressInterface $address): void diff --git a/src/Sylius/Behat/Page/Admin/ShippingMethod/IndexPage.php b/src/Sylius/Behat/Page/Admin/ShippingMethod/IndexPage.php index b2288d2da8..83e730c8a5 100644 --- a/src/Sylius/Behat/Page/Admin/ShippingMethod/IndexPage.php +++ b/src/Sylius/Behat/Page/Admin/ShippingMethod/IndexPage.php @@ -16,7 +16,7 @@ namespace Sylius\Behat\Page\Admin\ShippingMethod; use Behat\Mink\Element\NodeElement; use Sylius\Behat\Page\Admin\Crud\IndexPage as BaseIndexPage; use Sylius\Component\Core\Model\ShippingMethodInterface; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ResourceInterface; class IndexPage extends BaseIndexPage implements IndexPageInterface { diff --git a/src/Sylius/Behat/Page/External/PaypalExpressCheckoutPage.php b/src/Sylius/Behat/Page/External/PaypalExpressCheckoutPage.php index 11a32a3995..d65718e813 100644 --- a/src/Sylius/Behat/Page/External/PaypalExpressCheckoutPage.php +++ b/src/Sylius/Behat/Page/External/PaypalExpressCheckoutPage.php @@ -17,7 +17,7 @@ use Behat\Mink\Session; use FriendsOfBehat\PageObjectExtension\Page\Page; use FriendsOfBehat\PageObjectExtension\Page\UnexpectedPageException; use Payum\Core\Security\TokenInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; class PaypalExpressCheckoutPage extends Page implements PaypalExpressCheckoutPageInterface { diff --git a/src/Sylius/Behat/Resources/config/services/contexts/setup.xml b/src/Sylius/Behat/Resources/config/services/contexts/setup.xml index 0eb1d58b72..2fd7cd0266 100644 --- a/src/Sylius/Behat/Resources/config/services/contexts/setup.xml +++ b/src/Sylius/Behat/Resources/config/services/contexts/setup.xml @@ -130,7 +130,7 @@ - + diff --git a/src/Sylius/Bundle/AddressingBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/AddressingBundle/DependencyInjection/Configuration.php index cb256c92e7..772ed09b10 100644 --- a/src/Sylius/Bundle/AddressingBundle/DependencyInjection/Configuration.php +++ b/src/Sylius/Bundle/AddressingBundle/DependencyInjection/Configuration.php @@ -37,7 +37,7 @@ use Sylius\Component\Addressing\Model\Zone; use Sylius\Component\Addressing\Model\ZoneInterface; use Sylius\Component\Addressing\Model\ZoneMember; use Sylius\Component\Addressing\Model\ZoneMemberInterface; -use Sylius\Component\Resource\Factory\Factory; +use Sylius\Resource\Factory\Factory; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; diff --git a/src/Sylius/Bundle/AddressingBundle/Form/Type/CountryChoiceType.php b/src/Sylius/Bundle/AddressingBundle/Form/Type/CountryChoiceType.php index c655967bfb..2eadd48ad8 100644 --- a/src/Sylius/Bundle/AddressingBundle/Form/Type/CountryChoiceType.php +++ b/src/Sylius/Bundle/AddressingBundle/Form/Type/CountryChoiceType.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Bundle\AddressingBundle\Form\Type; use Sylius\Component\Addressing\Model\CountryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Bridge\Doctrine\Form\DataTransformer\CollectionToArrayTransformer; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; @@ -24,6 +24,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class CountryChoiceType extends AbstractType { + /** @param RepositoryInterface $countryRepository */ public function __construct(private RepositoryInterface $countryRepository) { } diff --git a/src/Sylius/Bundle/AddressingBundle/Form/Type/CountryCodeChoiceType.php b/src/Sylius/Bundle/AddressingBundle/Form/Type/CountryCodeChoiceType.php index 79584721a6..a7009b87d0 100644 --- a/src/Sylius/Bundle/AddressingBundle/Form/Type/CountryCodeChoiceType.php +++ b/src/Sylius/Bundle/AddressingBundle/Form/Type/CountryCodeChoiceType.php @@ -14,13 +14,15 @@ declare(strict_types=1); namespace Sylius\Bundle\AddressingBundle\Form\Type; use Sylius\Bundle\ResourceBundle\Form\DataTransformer\ResourceToIdentifierTransformer; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Component\Addressing\Model\CountryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\ReversedTransformer; final class CountryCodeChoiceType extends AbstractType { + /** @param RepositoryInterface $countryRepository */ public function __construct(private RepositoryInterface $countryRepository) { } diff --git a/src/Sylius/Bundle/AddressingBundle/Form/Type/ProvinceChoiceType.php b/src/Sylius/Bundle/AddressingBundle/Form/Type/ProvinceChoiceType.php index 67f55b25e7..a72343fc1b 100644 --- a/src/Sylius/Bundle/AddressingBundle/Form/Type/ProvinceChoiceType.php +++ b/src/Sylius/Bundle/AddressingBundle/Form/Type/ProvinceChoiceType.php @@ -14,7 +14,8 @@ declare(strict_types=1); namespace Sylius\Bundle\AddressingBundle\Form\Type; use Sylius\Component\Addressing\Model\CountryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Component\Addressing\Model\ProvinceInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; use Symfony\Component\OptionsResolver\Options; @@ -22,6 +23,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class ProvinceChoiceType extends AbstractType { + /** @param RepositoryInterface $provinceRepository */ public function __construct(private RepositoryInterface $provinceRepository) { } diff --git a/src/Sylius/Bundle/AddressingBundle/Form/Type/ProvinceCodeChoiceType.php b/src/Sylius/Bundle/AddressingBundle/Form/Type/ProvinceCodeChoiceType.php index 3b3f9b0226..ba039e5204 100644 --- a/src/Sylius/Bundle/AddressingBundle/Form/Type/ProvinceCodeChoiceType.php +++ b/src/Sylius/Bundle/AddressingBundle/Form/Type/ProvinceCodeChoiceType.php @@ -14,13 +14,15 @@ declare(strict_types=1); namespace Sylius\Bundle\AddressingBundle\Form\Type; use Sylius\Bundle\ResourceBundle\Form\DataTransformer\ResourceToIdentifierTransformer; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Component\Addressing\Model\ProvinceInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\ReversedTransformer; final class ProvinceCodeChoiceType extends AbstractType { + /** @param RepositoryInterface $provinceRepository */ public function __construct(private RepositoryInterface $provinceRepository) { } diff --git a/src/Sylius/Bundle/AddressingBundle/Form/Type/ZoneChoiceType.php b/src/Sylius/Bundle/AddressingBundle/Form/Type/ZoneChoiceType.php index 745e349983..22389166e4 100644 --- a/src/Sylius/Bundle/AddressingBundle/Form/Type/ZoneChoiceType.php +++ b/src/Sylius/Bundle/AddressingBundle/Form/Type/ZoneChoiceType.php @@ -14,7 +14,8 @@ declare(strict_types=1); namespace Sylius\Bundle\AddressingBundle\Form\Type; use Sylius\Component\Addressing\Model\Scope as AddressingScope; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Component\Addressing\Model\ZoneInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; use Symfony\Component\OptionsResolver\Options; @@ -23,7 +24,10 @@ use Webmozart\Assert\Assert; final class ZoneChoiceType extends AbstractType { - /** @param string[] $scopeTypes */ + /** + * @param RepositoryInterface $zoneRepository + * @param array $scopeTypes + */ public function __construct( private readonly RepositoryInterface $zoneRepository, private readonly array $scopeTypes, diff --git a/src/Sylius/Bundle/AddressingBundle/Form/Type/ZoneCodeChoiceType.php b/src/Sylius/Bundle/AddressingBundle/Form/Type/ZoneCodeChoiceType.php index ecb8fef519..b1f93d2041 100644 --- a/src/Sylius/Bundle/AddressingBundle/Form/Type/ZoneCodeChoiceType.php +++ b/src/Sylius/Bundle/AddressingBundle/Form/Type/ZoneCodeChoiceType.php @@ -14,7 +14,8 @@ declare(strict_types=1); namespace Sylius\Bundle\AddressingBundle\Form\Type; use Sylius\Bundle\ResourceBundle\Form\DataTransformer\ResourceToIdentifierTransformer; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Component\Addressing\Model\ZoneInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; use Symfony\Component\Form\FormBuilderInterface; @@ -24,6 +25,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class ZoneCodeChoiceType extends AbstractType { + /** @param RepositoryInterface $zoneRepository */ public function __construct(private RepositoryInterface $zoneRepository) { } diff --git a/src/Sylius/Bundle/AddressingBundle/Tests/Form/Type/CountryChoiceTypeTest.php b/src/Sylius/Bundle/AddressingBundle/Tests/Form/Type/CountryChoiceTypeTest.php index 4056a6cc98..c86d8a89f9 100644 --- a/src/Sylius/Bundle/AddressingBundle/Tests/Form/Type/CountryChoiceTypeTest.php +++ b/src/Sylius/Bundle/AddressingBundle/Tests/Form/Type/CountryChoiceTypeTest.php @@ -19,7 +19,7 @@ use Prophecy\Prophecy\ObjectProphecy; use Prophecy\Prophecy\ProphecyInterface; use Sylius\Bundle\AddressingBundle\Form\Type\CountryChoiceType; use Sylius\Component\Addressing\Model\CountryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Form\ChoiceList\View\ChoiceView; use Symfony\Component\Form\PreloadedExtension; use Symfony\Component\Form\Test\TypeTestCase; diff --git a/src/Sylius/Bundle/AddressingBundle/Tests/Form/Type/ZoneChoiceTypeTest.php b/src/Sylius/Bundle/AddressingBundle/Tests/Form/Type/ZoneChoiceTypeTest.php index a87d4fca54..637fa66cb0 100644 --- a/src/Sylius/Bundle/AddressingBundle/Tests/Form/Type/ZoneChoiceTypeTest.php +++ b/src/Sylius/Bundle/AddressingBundle/Tests/Form/Type/ZoneChoiceTypeTest.php @@ -20,7 +20,7 @@ use Prophecy\Prophecy\ProphecyInterface; use Sylius\Bundle\AddressingBundle\Form\Type\ZoneChoiceType; use Sylius\Component\Addressing\Model\Scope as AddressingScope; use Sylius\Component\Addressing\Model\ZoneInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Form\ChoiceList\View\ChoiceView; use Symfony\Component\Form\PreloadedExtension; use Symfony\Component\Form\Test\TypeTestCase; diff --git a/src/Sylius/Bundle/AddressingBundle/Validator/Constraints/ProvinceAddressConstraintValidator.php b/src/Sylius/Bundle/AddressingBundle/Validator/Constraints/ProvinceAddressConstraintValidator.php index fa4996c84a..e69566d95a 100644 --- a/src/Sylius/Bundle/AddressingBundle/Validator/Constraints/ProvinceAddressConstraintValidator.php +++ b/src/Sylius/Bundle/AddressingBundle/Validator/Constraints/ProvinceAddressConstraintValidator.php @@ -16,13 +16,17 @@ namespace Sylius\Bundle\AddressingBundle\Validator\Constraints; use Sylius\Component\Addressing\Model\AddressInterface; use Sylius\Component\Addressing\Model\CountryInterface; use Sylius\Component\Addressing\Model\ProvinceInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; use Webmozart\Assert\Assert; class ProvinceAddressConstraintValidator extends ConstraintValidator { + /** + * @param RepositoryInterface $countryRepository + * @param RepositoryInterface $provinceRepository + */ public function __construct(private RepositoryInterface $countryRepository, private RepositoryInterface $provinceRepository) { } diff --git a/src/Sylius/Bundle/AddressingBundle/composer.json b/src/Sylius/Bundle/AddressingBundle/composer.json index 0dad993959..0ec5df27b7 100644 --- a/src/Sylius/Bundle/AddressingBundle/composer.json +++ b/src/Sylius/Bundle/AddressingBundle/composer.json @@ -29,7 +29,7 @@ "php": "^8.2", "stof/doctrine-extensions-bundle": "^1.4", "sylius/addressing": "^2.0", - "sylius/resource-bundle": "^1.10", + "sylius/resource-bundle": "^1.11", "symfony/framework-bundle": "^6.4.1", "symfony/intl": "^6.4.0" }, diff --git a/src/Sylius/Bundle/AddressingBundle/spec/Form/EventListener/BuildAddressFormSubscriberSpec.php b/src/Sylius/Bundle/AddressingBundle/spec/Form/EventListener/BuildAddressFormSubscriberSpec.php index c320998a01..fd6ade952c 100644 --- a/src/Sylius/Bundle/AddressingBundle/spec/Form/EventListener/BuildAddressFormSubscriberSpec.php +++ b/src/Sylius/Bundle/AddressingBundle/spec/Form/EventListener/BuildAddressFormSubscriberSpec.php @@ -19,7 +19,7 @@ use Sylius\Bundle\AddressingBundle\Form\EventListener\BuildAddressFormSubscriber use Sylius\Bundle\AddressingBundle\Form\Type\ProvinceCodeChoiceType; use Sylius\Component\Addressing\Model\AddressInterface; use Sylius\Component\Addressing\Model\CountryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\FormEvent; diff --git a/src/Sylius/Bundle/AddressingBundle/spec/Validator/Constraints/ProvinceAddressConstraintValidatorSpec.php b/src/Sylius/Bundle/AddressingBundle/spec/Validator/Constraints/ProvinceAddressConstraintValidatorSpec.php index 0ee0c36842..fd1ed88905 100644 --- a/src/Sylius/Bundle/AddressingBundle/spec/Validator/Constraints/ProvinceAddressConstraintValidatorSpec.php +++ b/src/Sylius/Bundle/AddressingBundle/spec/Validator/Constraints/ProvinceAddressConstraintValidatorSpec.php @@ -20,7 +20,7 @@ use Sylius\Bundle\AddressingBundle\Validator\Constraints\ProvinceAddressConstrai use Sylius\Component\Addressing\Model\AddressInterface; use Sylius\Component\Addressing\Model\Country; use Sylius\Component\Addressing\Model\Province; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintViolation; use Symfony\Component\Validator\ConstraintViolationList; diff --git a/src/Sylius/Bundle/AdminBundle/CommandHandler/CreateAdminUserHandler.php b/src/Sylius/Bundle/AdminBundle/CommandHandler/CreateAdminUserHandler.php index 0939ff0f1b..f9a5136b68 100644 --- a/src/Sylius/Bundle/AdminBundle/CommandHandler/CreateAdminUserHandler.php +++ b/src/Sylius/Bundle/AdminBundle/CommandHandler/CreateAdminUserHandler.php @@ -16,9 +16,9 @@ namespace Sylius\Bundle\AdminBundle\CommandHandler; use Sylius\Bundle\AdminBundle\Command\CreateAdminUser; use Sylius\Bundle\AdminBundle\Exception\CreateAdminUserFailedException; use Sylius\Component\Core\Model\AdminUserInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; use Sylius\Component\User\Canonicalizer\CanonicalizerInterface; use Sylius\Component\User\Repository\UserRepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\Messenger\Handler\MessageHandlerInterface; use Symfony\Component\Validator\ConstraintViolationListInterface; use Symfony\Component\Validator\Validator\ValidatorInterface; diff --git a/src/Sylius/Bundle/AdminBundle/Controller/CustomerStatisticsController.php b/src/Sylius/Bundle/AdminBundle/Controller/CustomerStatisticsController.php index 35e862a546..8d7d662539 100644 --- a/src/Sylius/Bundle/AdminBundle/Controller/CustomerStatisticsController.php +++ b/src/Sylius/Bundle/AdminBundle/Controller/CustomerStatisticsController.php @@ -15,7 +15,7 @@ namespace Sylius\Bundle\AdminBundle\Controller; use Sylius\Component\Core\Customer\Statistics\CustomerStatisticsProviderInterface; use Sylius\Component\Core\Model\CustomerInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Exception\HttpException; @@ -23,6 +23,7 @@ use Twig\Environment; final class CustomerStatisticsController { + /** @param RepositoryInterface $customerRepository */ public function __construct( private CustomerStatisticsProviderInterface $statisticsProvider, private RepositoryInterface $customerRepository, diff --git a/src/Sylius/Bundle/AdminBundle/Controller/RedirectHandler.php b/src/Sylius/Bundle/AdminBundle/Controller/RedirectHandler.php index 92811c5b51..7b8e26fa59 100644 --- a/src/Sylius/Bundle/AdminBundle/Controller/RedirectHandler.php +++ b/src/Sylius/Bundle/AdminBundle/Controller/RedirectHandler.php @@ -16,7 +16,7 @@ namespace Sylius\Bundle\AdminBundle\Controller; use Sylius\Bundle\ResourceBundle\Controller\RedirectHandlerInterface; use Sylius\Bundle\ResourceBundle\Controller\RequestConfiguration; use Sylius\Bundle\UiBundle\Storage\FilterStorageInterface; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ResourceInterface; use Symfony\Component\HttpFoundation\Response; final class RedirectHandler implements RedirectHandlerInterface diff --git a/src/Sylius/Bundle/AdminBundle/EventListener/LocaleListener.php b/src/Sylius/Bundle/AdminBundle/EventListener/LocaleListener.php index 9b966e7824..e1769cad82 100644 --- a/src/Sylius/Bundle/AdminBundle/EventListener/LocaleListener.php +++ b/src/Sylius/Bundle/AdminBundle/EventListener/LocaleListener.php @@ -14,8 +14,8 @@ declare(strict_types=1); namespace Sylius\Bundle\AdminBundle\EventListener; use Sylius\Bundle\LocaleBundle\Checker\LocaleUsageCheckerInterface; -use Sylius\Bundle\ResourceBundle\Event\ResourceControllerEvent; use Sylius\Component\Locale\Model\LocaleInterface; +use Sylius\Resource\Symfony\EventDispatcher\GenericEvent; use Symfony\Component\HttpFoundation\Response; final class LocaleListener @@ -24,7 +24,7 @@ final class LocaleListener { } - public function preDelete(ResourceControllerEvent $event): void + public function preDelete(GenericEvent $event): void { /** @var LocaleInterface $locale */ $locale = $event->getSubject(); diff --git a/src/Sylius/Bundle/AdminBundle/EventListener/ResourceDeleteSubscriber.php b/src/Sylius/Bundle/AdminBundle/EventListener/ResourceDeleteSubscriber.php index 83128a778f..644ac7d3a2 100644 --- a/src/Sylius/Bundle/AdminBundle/EventListener/ResourceDeleteSubscriber.php +++ b/src/Sylius/Bundle/AdminBundle/EventListener/ResourceDeleteSubscriber.php @@ -15,7 +15,7 @@ namespace Sylius\Bundle\AdminBundle\EventListener; use Doctrine\DBAL\Exception\ForeignKeyConstraintViolationException; use Sylius\Bundle\CoreBundle\Provider\FlashBagProvider; -use Sylius\Component\Resource\ResourceActions; +use Sylius\Resource\ResourceActions; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; diff --git a/src/Sylius/Bundle/AdminBundle/Form/DataTransformer/ProductsToProductAssociationsTransformer.php b/src/Sylius/Bundle/AdminBundle/Form/DataTransformer/ProductsToProductAssociationsTransformer.php index cb6071735e..2292ba472f 100644 --- a/src/Sylius/Bundle/AdminBundle/Form/DataTransformer/ProductsToProductAssociationsTransformer.php +++ b/src/Sylius/Bundle/AdminBundle/Form/DataTransformer/ProductsToProductAssociationsTransformer.php @@ -18,8 +18,8 @@ use Doctrine\Common\Collections\Collection; use Sylius\Component\Product\Model\ProductAssociationInterface; use Sylius\Component\Product\Model\ProductAssociationTypeInterface; use Sylius\Component\Product\Model\ProductInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\Form\DataTransformerInterface; use Webmozart\Assert\Assert; diff --git a/src/Sylius/Bundle/AdminBundle/Form/DataTransformer/ResourceToIdentifierTransformer.php b/src/Sylius/Bundle/AdminBundle/Form/DataTransformer/ResourceToIdentifierTransformer.php index d92fdb6b62..4d7fa849f1 100644 --- a/src/Sylius/Bundle/AdminBundle/Form/DataTransformer/ResourceToIdentifierTransformer.php +++ b/src/Sylius/Bundle/AdminBundle/Form/DataTransformer/ResourceToIdentifierTransformer.php @@ -13,8 +13,8 @@ declare(strict_types=1); namespace Sylius\Bundle\AdminBundle\Form\DataTransformer; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Form\DataTransformerInterface; use Symfony\Component\Form\Exception\TransformationFailedException; use Symfony\Component\PropertyAccess\PropertyAccess; diff --git a/src/Sylius/Bundle/AdminBundle/Form/Type/CountryType.php b/src/Sylius/Bundle/AdminBundle/Form/Type/CountryType.php index fd173096f8..4c5336d015 100644 --- a/src/Sylius/Bundle/AdminBundle/Form/Type/CountryType.php +++ b/src/Sylius/Bundle/AdminBundle/Form/Type/CountryType.php @@ -16,7 +16,7 @@ namespace Sylius\Bundle\AdminBundle\Form\Type; use Sylius\Bundle\AddressingBundle\Form\Type\CountryType as BaseCountryType; use Sylius\Bundle\AddressingBundle\Form\Type\ProvinceType; use Sylius\Component\Addressing\Model\CountryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\CheckboxType; use Symfony\Component\Form\Extension\Core\Type\CountryType as SymfonyCountryType; diff --git a/src/Sylius/Bundle/AdminBundle/Form/Type/LocaleType.php b/src/Sylius/Bundle/AdminBundle/Form/Type/LocaleType.php index 5d06dbda6b..b5da24b0b0 100644 --- a/src/Sylius/Bundle/AdminBundle/Form/Type/LocaleType.php +++ b/src/Sylius/Bundle/AdminBundle/Form/Type/LocaleType.php @@ -15,7 +15,7 @@ namespace Sylius\Bundle\AdminBundle\Form\Type; use Sylius\Bundle\LocaleBundle\Form\Type\LocaleType as BaseLocaleType; use Sylius\Component\Locale\Model\LocaleInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\LocaleType as SymfonyLocaleType; use Symfony\Component\Form\FormBuilderInterface; diff --git a/src/Sylius/Bundle/AdminBundle/Tests/CommandHandler/CreateAdminUserHandlerTest.php b/src/Sylius/Bundle/AdminBundle/Tests/CommandHandler/CreateAdminUserHandlerTest.php index 414c44d62c..02f4e16d4e 100644 --- a/src/Sylius/Bundle/AdminBundle/Tests/CommandHandler/CreateAdminUserHandlerTest.php +++ b/src/Sylius/Bundle/AdminBundle/Tests/CommandHandler/CreateAdminUserHandlerTest.php @@ -19,9 +19,9 @@ use Sylius\Bundle\AdminBundle\Command\CreateAdminUser; use Sylius\Bundle\AdminBundle\CommandHandler\CreateAdminUserHandler; use Sylius\Bundle\AdminBundle\Exception\CreateAdminUserFailedException; use Sylius\Component\Core\Model\AdminUserInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; use Sylius\Component\User\Canonicalizer\CanonicalizerInterface; use Sylius\Component\User\Repository\UserRepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\Validator\ConstraintViolation; use Symfony\Component\Validator\ConstraintViolationList; use Symfony\Component\Validator\Validator\ValidatorInterface; diff --git a/src/Sylius/Bundle/AdminBundle/Twig/Component/Order/AddressHistoryComponent.php b/src/Sylius/Bundle/AdminBundle/Twig/Component/Order/AddressHistoryComponent.php index cf6429dcf1..ba444bfe92 100644 --- a/src/Sylius/Bundle/AdminBundle/Twig/Component/Order/AddressHistoryComponent.php +++ b/src/Sylius/Bundle/AdminBundle/Twig/Component/Order/AddressHistoryComponent.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Bundle\AdminBundle\Twig\Component\Order; use Sylius\Component\Addressing\Model\AddressLogEntry; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\UX\TwigComponent\Attribute\ExposeInTemplate; class AddressHistoryComponent diff --git a/src/Sylius/Bundle/AdminBundle/Twig/Component/Product/FormComponent.php b/src/Sylius/Bundle/AdminBundle/Twig/Component/Product/FormComponent.php index 90712eda2d..9ec29a8937 100644 --- a/src/Sylius/Bundle/AdminBundle/Twig/Component/Product/FormComponent.php +++ b/src/Sylius/Bundle/AdminBundle/Twig/Component/Product/FormComponent.php @@ -14,11 +14,12 @@ declare(strict_types=1); namespace Sylius\Bundle\AdminBundle\Twig\Component\Product; use Sylius\Component\Core\Model\Product; +use Sylius\Component\Core\Model\ProductInterface; use Sylius\Component\Product\Factory\ProductFactoryInterface; use Sylius\Component\Product\Generator\SlugGeneratorInterface; use Sylius\Component\Product\Model\ProductAttributeInterface; use Sylius\Component\Product\Model\ProductAttributeValueInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Sylius\TwigHooks\LiveComponent\HookableLiveComponentTrait; use Symfony\Component\Form\FormFactoryInterface; use Symfony\Component\Form\FormInterface; @@ -58,6 +59,7 @@ class FormComponent /** * @param class-string $formClass * @param RepositoryInterface $productAttributeRepository + * @param ProductFactoryInterface $productFactory */ public function __construct( private readonly FormFactoryInterface $formFactory, diff --git a/src/Sylius/Bundle/AdminBundle/spec/Controller/RedirectHandlerSpec.php b/src/Sylius/Bundle/AdminBundle/spec/Controller/RedirectHandlerSpec.php index 9271d8f4fd..37db65394d 100644 --- a/src/Sylius/Bundle/AdminBundle/spec/Controller/RedirectHandlerSpec.php +++ b/src/Sylius/Bundle/AdminBundle/spec/Controller/RedirectHandlerSpec.php @@ -17,7 +17,7 @@ use PhpSpec\ObjectBehavior; use Sylius\Bundle\ResourceBundle\Controller\RedirectHandlerInterface; use Sylius\Bundle\ResourceBundle\Controller\RequestConfiguration; use Sylius\Bundle\UiBundle\Storage\FilterStorageInterface; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ResourceInterface; use Symfony\Component\HttpFoundation\Response; final class RedirectHandlerSpec extends ObjectBehavior diff --git a/src/Sylius/Bundle/AdminBundle/spec/EventListener/LocaleListenerSpec.php b/src/Sylius/Bundle/AdminBundle/spec/EventListener/LocaleListenerSpec.php index d43b4310d9..60024ec6e0 100644 --- a/src/Sylius/Bundle/AdminBundle/spec/EventListener/LocaleListenerSpec.php +++ b/src/Sylius/Bundle/AdminBundle/spec/EventListener/LocaleListenerSpec.php @@ -15,8 +15,8 @@ namespace spec\Sylius\Bundle\AdminBundle\EventListener; use PhpSpec\ObjectBehavior; use Sylius\Bundle\LocaleBundle\Checker\LocaleUsageCheckerInterface; -use Sylius\Bundle\ResourceBundle\Event\ResourceControllerEvent; use Sylius\Component\Locale\Model\LocaleInterface; +use Sylius\Resource\Symfony\EventDispatcher\GenericEvent; use Symfony\Component\HttpFoundation\Response; final class LocaleListenerSpec extends ObjectBehavior @@ -29,7 +29,7 @@ final class LocaleListenerSpec extends ObjectBehavior function it_does_nothing_if_locale_is_not_used( LocaleUsageCheckerInterface $localeUsageChecker, LocaleInterface $locale, - ResourceControllerEvent $event, + GenericEvent $event, ): void { $localeUsageChecker->isUsed('en_US')->willReturn(false); @@ -44,7 +44,7 @@ final class LocaleListenerSpec extends ObjectBehavior function it_stops_event_if_locale_is_used( LocaleUsageCheckerInterface $localeUsageChecker, LocaleInterface $locale, - ResourceControllerEvent $event, + GenericEvent $event, ): void { $localeUsageChecker->isUsed('en_US')->willReturn(true); diff --git a/src/Sylius/Bundle/AdminBundle/spec/Form/DataTransformer/ProductsToProductAssociationsTransformerSpec.php b/src/Sylius/Bundle/AdminBundle/spec/Form/DataTransformer/ProductsToProductAssociationsTransformerSpec.php index 2def195a31..1323b7b3e4 100644 --- a/src/Sylius/Bundle/AdminBundle/spec/Form/DataTransformer/ProductsToProductAssociationsTransformerSpec.php +++ b/src/Sylius/Bundle/AdminBundle/spec/Form/DataTransformer/ProductsToProductAssociationsTransformerSpec.php @@ -18,8 +18,8 @@ use PhpSpec\ObjectBehavior; use Sylius\Component\Product\Model\ProductAssociationInterface; use Sylius\Component\Product\Model\ProductAssociationTypeInterface; use Sylius\Component\Product\Model\ProductInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\Form\DataTransformerInterface; final class ProductsToProductAssociationsTransformerSpec extends ObjectBehavior diff --git a/src/Sylius/Bundle/ApiBundle/CommandHandler/Account/RegisterShopUserHandler.php b/src/Sylius/Bundle/ApiBundle/CommandHandler/Account/RegisterShopUserHandler.php index 41228ba6d9..8ca0fbe09f 100644 --- a/src/Sylius/Bundle/ApiBundle/CommandHandler/Account/RegisterShopUserHandler.php +++ b/src/Sylius/Bundle/ApiBundle/CommandHandler/Account/RegisterShopUserHandler.php @@ -21,14 +21,15 @@ use Sylius\Bundle\CoreBundle\Resolver\CustomerResolverInterface; use Sylius\Component\Channel\Repository\ChannelRepositoryInterface; use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Component\Core\Model\ShopUserInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; use Sylius\Component\User\Security\Generator\GeneratorInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\Messenger\Handler\MessageHandlerInterface; use Symfony\Component\Messenger\MessageBusInterface; use Symfony\Component\Messenger\Stamp\DispatchAfterCurrentBusStamp; final readonly class RegisterShopUserHandler implements MessageHandlerInterface { + /** @param FactoryInterface $shopUserFactory */ public function __construct( private FactoryInterface $shopUserFactory, private ObjectManager $shopUserManager, diff --git a/src/Sylius/Bundle/ApiBundle/CommandHandler/Account/VerifyShopUserHandler.php b/src/Sylius/Bundle/ApiBundle/CommandHandler/Account/VerifyShopUserHandler.php index cf80865d29..b7c49a50df 100644 --- a/src/Sylius/Bundle/ApiBundle/CommandHandler/Account/VerifyShopUserHandler.php +++ b/src/Sylius/Bundle/ApiBundle/CommandHandler/Account/VerifyShopUserHandler.php @@ -17,7 +17,7 @@ use InvalidArgumentException; use Sylius\Bundle\ApiBundle\Command\Account\SendAccountRegistrationEmail; use Sylius\Bundle\ApiBundle\Command\Account\VerifyShopUser; use Sylius\Component\Core\Model\ShopUserInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Clock\ClockInterface; use Symfony\Component\Messenger\Handler\MessageHandlerInterface; use Symfony\Component\Messenger\MessageBusInterface; diff --git a/src/Sylius/Bundle/ApiBundle/CommandHandler/Cart/PickupCartHandler.php b/src/Sylius/Bundle/ApiBundle/CommandHandler/Cart/PickupCartHandler.php index 8b6581ba32..df67d5faa9 100644 --- a/src/Sylius/Bundle/ApiBundle/CommandHandler/Cart/PickupCartHandler.php +++ b/src/Sylius/Bundle/ApiBundle/CommandHandler/Cart/PickupCartHandler.php @@ -23,7 +23,7 @@ use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Core\Repository\CustomerRepositoryInterface; use Sylius\Component\Core\Repository\OrderRepositoryInterface; use Sylius\Component\Locale\Model\LocaleInterface; -use Sylius\Component\Resource\Generator\RandomnessGeneratorInterface; +use Sylius\Resource\Generator\RandomnessGeneratorInterface; use Symfony\Component\Messenger\Handler\MessageHandlerInterface; use Webmozart\Assert\Assert; diff --git a/src/Sylius/Bundle/ApiBundle/CommandHandler/Catalog/AddProductReviewHandler.php b/src/Sylius/Bundle/ApiBundle/CommandHandler/Catalog/AddProductReviewHandler.php index b0b62b975f..1aef2a5193 100644 --- a/src/Sylius/Bundle/ApiBundle/CommandHandler/Catalog/AddProductReviewHandler.php +++ b/src/Sylius/Bundle/ApiBundle/CommandHandler/Catalog/AddProductReviewHandler.php @@ -17,15 +17,20 @@ use Sylius\Bundle\ApiBundle\Command\Catalog\AddProductReview; use Sylius\Bundle\ApiBundle\Exception\ProductNotFoundException; use Sylius\Bundle\CoreBundle\Resolver\CustomerResolverInterface; use Sylius\Component\Core\Model\ProductInterface; +use Sylius\Component\Core\Model\ProductReviewInterface; use Sylius\Component\Core\Repository\ProductRepositoryInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; use Sylius\Component\Review\Model\ReviewInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Messenger\Handler\MessageHandlerInterface; final readonly class AddProductReviewHandler implements MessageHandlerInterface { + /** + * @param FactoryInterface $productReviewFactory + * @param RepositoryInterface $productReviewRepository + */ public function __construct( private FactoryInterface $productReviewFactory, private RepositoryInterface $productReviewRepository, diff --git a/src/Sylius/Bundle/ApiBundle/Creator/AvatarImageCreator.php b/src/Sylius/Bundle/ApiBundle/Creator/AvatarImageCreator.php index a8c59fe510..3fcc4d695e 100644 --- a/src/Sylius/Bundle/ApiBundle/Creator/AvatarImageCreator.php +++ b/src/Sylius/Bundle/ApiBundle/Creator/AvatarImageCreator.php @@ -19,8 +19,8 @@ use Sylius\Component\Core\Model\AdminUserInterface; use Sylius\Component\Core\Model\AvatarImageInterface; use Sylius\Component\Core\Model\ImageInterface; use Sylius\Component\Core\Uploader\ImageUploaderInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class AvatarImageCreator implements ImageCreatorInterface { diff --git a/src/Sylius/Bundle/ApiBundle/Creator/ProductImageCreator.php b/src/Sylius/Bundle/ApiBundle/Creator/ProductImageCreator.php index 18cfbad631..05c66e6ffa 100644 --- a/src/Sylius/Bundle/ApiBundle/Creator/ProductImageCreator.php +++ b/src/Sylius/Bundle/ApiBundle/Creator/ProductImageCreator.php @@ -22,7 +22,7 @@ use Sylius\Component\Core\Model\ProductInterface; use Sylius\Component\Core\Model\ProductVariantInterface; use Sylius\Component\Core\Repository\ProductRepositoryInterface; use Sylius\Component\Core\Uploader\ImageUploaderInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Webmozart\Assert\Assert; final class ProductImageCreator implements ImageCreatorInterface diff --git a/src/Sylius/Bundle/ApiBundle/Creator/TaxonImageCreator.php b/src/Sylius/Bundle/ApiBundle/Creator/TaxonImageCreator.php index 97aaa68744..6d7da6fa22 100644 --- a/src/Sylius/Bundle/ApiBundle/Creator/TaxonImageCreator.php +++ b/src/Sylius/Bundle/ApiBundle/Creator/TaxonImageCreator.php @@ -19,8 +19,8 @@ use Sylius\Component\Core\Model\ImageInterface; use Sylius\Component\Core\Model\TaxonImageInterface; use Sylius\Component\Core\Model\TaxonInterface; use Sylius\Component\Core\Uploader\ImageUploaderInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; use Sylius\Component\Taxonomy\Repository\TaxonRepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class TaxonImageCreator implements ImageCreatorInterface { diff --git a/src/Sylius/Bundle/ApiBundle/Doctrine/ORM/QueryExtension/Common/TranslationOrderLocaleExtension.php b/src/Sylius/Bundle/ApiBundle/Doctrine/ORM/QueryExtension/Common/TranslationOrderLocaleExtension.php index 753851f230..f87a1f0699 100644 --- a/src/Sylius/Bundle/ApiBundle/Doctrine/ORM/QueryExtension/Common/TranslationOrderLocaleExtension.php +++ b/src/Sylius/Bundle/ApiBundle/Doctrine/ORM/QueryExtension/Common/TranslationOrderLocaleExtension.php @@ -20,7 +20,7 @@ use Doctrine\ORM\Query\Expr\Join; use Doctrine\ORM\QueryBuilder; use Sylius\Bundle\ApiBundle\SectionResolver\ShopApiSection; use Sylius\Bundle\CoreBundle\SectionResolver\SectionProviderInterface; -use Sylius\Component\Resource\Model\TranslatableInterface; +use Sylius\Resource\Model\TranslatableInterface; final class TranslationOrderLocaleExtension implements QueryCollectionExtensionInterface { diff --git a/src/Sylius/Bundle/ApiBundle/EventListener/ApiCartBlamerListener.php b/src/Sylius/Bundle/ApiBundle/EventListener/ApiCartBlamerListener.php index 58ae1bc9f1..c58e2fa689 100644 --- a/src/Sylius/Bundle/ApiBundle/EventListener/ApiCartBlamerListener.php +++ b/src/Sylius/Bundle/ApiBundle/EventListener/ApiCartBlamerListener.php @@ -20,7 +20,7 @@ use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Core\Model\ShopUserInterface; use Sylius\Component\Order\Context\CartContextInterface; use Sylius\Component\Order\Context\CartNotFoundException; -use Sylius\Component\Resource\Exception\UnexpectedTypeException; +use Sylius\Resource\Exception\UnexpectedTypeException; use Symfony\Component\Messenger\MessageBusInterface; use Symfony\Component\Security\Http\Event\LoginSuccessEvent; diff --git a/src/Sylius/Bundle/ApiBundle/OpenApi/Documentation/AcceptLanguageHeaderDocumentationModifier.php b/src/Sylius/Bundle/ApiBundle/OpenApi/Documentation/AcceptLanguageHeaderDocumentationModifier.php index ba3e1c32a1..a9bf92fdb5 100644 --- a/src/Sylius/Bundle/ApiBundle/OpenApi/Documentation/AcceptLanguageHeaderDocumentationModifier.php +++ b/src/Sylius/Bundle/ApiBundle/OpenApi/Documentation/AcceptLanguageHeaderDocumentationModifier.php @@ -17,13 +17,11 @@ use ApiPlatform\OpenApi\Model\Parameter; use ApiPlatform\OpenApi\Model\PathItem; use ApiPlatform\OpenApi\OpenApi; use Sylius\Component\Locale\Model\LocaleInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class AcceptLanguageHeaderDocumentationModifier implements DocumentationModifierInterface { - /** - * @param RepositoryInterface $localeRepository - */ + /** @param RepositoryInterface $localeRepository */ public function __construct(private RepositoryInterface $localeRepository) { } diff --git a/src/Sylius/Bundle/ApiBundle/Serializer/ChannelDenormalizer.php b/src/Sylius/Bundle/ApiBundle/Serializer/ChannelDenormalizer.php index 03dcd835c7..4bf2758ec5 100644 --- a/src/Sylius/Bundle/ApiBundle/Serializer/ChannelDenormalizer.php +++ b/src/Sylius/Bundle/ApiBundle/Serializer/ChannelDenormalizer.php @@ -16,7 +16,7 @@ namespace Sylius\Bundle\ApiBundle\Serializer; use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Component\Core\Model\ChannelPriceHistoryConfigInterface; use Sylius\Component\Core\Model\ShopBillingDataInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; diff --git a/src/Sylius/Bundle/ApiBundle/Serializer/Denormalizer/ChannelPriceHistoryConfigDenormalizer.php b/src/Sylius/Bundle/ApiBundle/Serializer/Denormalizer/ChannelPriceHistoryConfigDenormalizer.php index fbbe8439d9..f6b065baaa 100644 --- a/src/Sylius/Bundle/ApiBundle/Serializer/Denormalizer/ChannelPriceHistoryConfigDenormalizer.php +++ b/src/Sylius/Bundle/ApiBundle/Serializer/Denormalizer/ChannelPriceHistoryConfigDenormalizer.php @@ -16,7 +16,7 @@ namespace Sylius\Bundle\ApiBundle\Serializer\Denormalizer; use ApiPlatform\Api\IriConverterInterface; use Sylius\Component\Core\Model\ChannelPriceHistoryConfigInterface; use Sylius\Component\Core\Model\TaxonInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -28,6 +28,10 @@ final class ChannelPriceHistoryConfigDenormalizer implements DenormalizerInterfa private const ALREADY_CALLED = 'sylius_channel_price_history_config_denormalizer_already_called'; + /** + * @param FactoryInterface $channelPriceHistoryConfigFactory + * @param array $validationGroups + */ public function __construct( private readonly IriConverterInterface $iriConverter, private readonly FactoryInterface $channelPriceHistoryConfigFactory, diff --git a/src/Sylius/Bundle/ApiBundle/Serializer/Denormalizer/TranslatableDenormalizer.php b/src/Sylius/Bundle/ApiBundle/Serializer/Denormalizer/TranslatableDenormalizer.php index 1a789bdfd8..a63cc8b612 100644 --- a/src/Sylius/Bundle/ApiBundle/Serializer/Denormalizer/TranslatableDenormalizer.php +++ b/src/Sylius/Bundle/ApiBundle/Serializer/Denormalizer/TranslatableDenormalizer.php @@ -14,8 +14,8 @@ declare(strict_types=1); namespace Sylius\Bundle\ApiBundle\Serializer\Denormalizer; use Sylius\Bundle\ApiBundle\Serializer\ContextKeys; -use Sylius\Component\Resource\Model\TranslatableInterface; -use Sylius\Component\Resource\Translation\Provider\TranslationLocaleProviderInterface; +use Sylius\Resource\Model\TranslatableInterface; +use Sylius\Resource\Translation\Provider\TranslationLocaleProviderInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; diff --git a/src/Sylius/Bundle/ApiBundle/Serializer/Denormalizer/TranslatableLocaleKeyDenormalizer.php b/src/Sylius/Bundle/ApiBundle/Serializer/Denormalizer/TranslatableLocaleKeyDenormalizer.php index 2ee5a789d4..bd8a876ea1 100644 --- a/src/Sylius/Bundle/ApiBundle/Serializer/Denormalizer/TranslatableLocaleKeyDenormalizer.php +++ b/src/Sylius/Bundle/ApiBundle/Serializer/Denormalizer/TranslatableLocaleKeyDenormalizer.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Bundle\ApiBundle\Serializer\Denormalizer; use Sylius\Bundle\ApiBundle\Exception\TranslationLocaleMismatchException; -use Sylius\Component\Resource\Model\TranslatableInterface; +use Sylius\Resource\Model\TranslatableInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; diff --git a/src/Sylius/Bundle/ApiBundle/StateProvider/Common/Adjustment/CollectionProvider.php b/src/Sylius/Bundle/ApiBundle/StateProvider/Common/Adjustment/CollectionProvider.php index 2ea3262faa..4482aa14b3 100644 --- a/src/Sylius/Bundle/ApiBundle/StateProvider/Common/Adjustment/CollectionProvider.php +++ b/src/Sylius/Bundle/ApiBundle/StateProvider/Common/Adjustment/CollectionProvider.php @@ -19,7 +19,7 @@ use ApiPlatform\State\ProviderInterface; use Doctrine\Common\Collections\Collection; use Sylius\Component\Core\Model\AdjustmentInterface; use Sylius\Component\Order\Model\RecursiveAdjustmentsAwareInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Webmozart\Assert\Assert; /** @implements ProviderInterface */ diff --git a/src/Sylius/Bundle/ApiBundle/Tests/Application/src/Entity/FooSyliusResource.php b/src/Sylius/Bundle/ApiBundle/Tests/Application/src/Entity/FooSyliusResource.php index 5f98af80d0..14c1b75070 100644 --- a/src/Sylius/Bundle/ApiBundle/Tests/Application/src/Entity/FooSyliusResource.php +++ b/src/Sylius/Bundle/ApiBundle/Tests/Application/src/Entity/FooSyliusResource.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Bundle\ApiBundle\Application\Entity; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ResourceInterface; class FooSyliusResource implements ResourceInterface { diff --git a/src/Sylius/Bundle/ApiBundle/Tests/CommandHandler/ChangeAddressOrderHandlerTest.php b/src/Sylius/Bundle/ApiBundle/Tests/CommandHandler/ChangeAddressOrderHandlerTest.php index 40b2acf9eb..5884420e21 100644 --- a/src/Sylius/Bundle/ApiBundle/Tests/CommandHandler/ChangeAddressOrderHandlerTest.php +++ b/src/Sylius/Bundle/ApiBundle/Tests/CommandHandler/ChangeAddressOrderHandlerTest.php @@ -24,7 +24,7 @@ use Sylius\Bundle\ApiBundle\Modifier\OrderAddressModifierInterface; use Sylius\Bundle\CoreBundle\Resolver\CustomerResolverInterface; use Sylius\Component\Core\Model\Address; use Sylius\Component\Core\Repository\OrderRepositoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; final class ChangeAddressOrderHandlerTest extends KernelTestCase diff --git a/src/Sylius/Bundle/ApiBundle/Validator/Constraints/CorrectOrderAddressValidator.php b/src/Sylius/Bundle/ApiBundle/Validator/Constraints/CorrectOrderAddressValidator.php index 61735ed5fa..55b3567e1b 100644 --- a/src/Sylius/Bundle/ApiBundle/Validator/Constraints/CorrectOrderAddressValidator.php +++ b/src/Sylius/Bundle/ApiBundle/Validator/Constraints/CorrectOrderAddressValidator.php @@ -16,13 +16,14 @@ namespace Sylius\Bundle\ApiBundle\Validator\Constraints; use Sylius\Bundle\ApiBundle\Command\Checkout\UpdateCart; use Sylius\Component\Addressing\Model\CountryInterface; use Sylius\Component\Core\Model\AddressInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; use Webmozart\Assert\Assert; final class CorrectOrderAddressValidator extends ConstraintValidator { + /** @param RepositoryInterface $countryRepository */ public function __construct(private readonly RepositoryInterface $countryRepository) { } diff --git a/src/Sylius/Bundle/ApiBundle/Validator/Constraints/ShopUserVerificationTokenEligibilityValidator.php b/src/Sylius/Bundle/ApiBundle/Validator/Constraints/ShopUserVerificationTokenEligibilityValidator.php index f0903738ce..c8d8f35538 100644 --- a/src/Sylius/Bundle/ApiBundle/Validator/Constraints/ShopUserVerificationTokenEligibilityValidator.php +++ b/src/Sylius/Bundle/ApiBundle/Validator/Constraints/ShopUserVerificationTokenEligibilityValidator.php @@ -15,15 +15,15 @@ namespace Sylius\Bundle\ApiBundle\Validator\Constraints; use Sylius\Bundle\ApiBundle\Command\Account\VerifyShopUser; use Sylius\Component\Core\Model\ShopUserInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; use Sylius\Component\User\Model\UserInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; use Webmozart\Assert\Assert; final class ShopUserVerificationTokenEligibilityValidator extends ConstraintValidator { - /** @param RepositoryInterface */ + /** @param RepositoryInterface $shopUserRepository */ public function __construct(private RepositoryInterface $shopUserRepository) { } diff --git a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Account/RegisterShopUserHandlerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Account/RegisterShopUserHandlerSpec.php index 30bf0d96fd..4363c3d8c0 100644 --- a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Account/RegisterShopUserHandlerSpec.php +++ b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Account/RegisterShopUserHandlerSpec.php @@ -23,8 +23,8 @@ use Sylius\Component\Channel\Repository\ChannelRepositoryInterface; use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Component\Core\Model\CustomerInterface; use Sylius\Component\Core\Model\ShopUserInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; use Sylius\Component\User\Security\Generator\GeneratorInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\Messenger\Envelope; use Symfony\Component\Messenger\Handler\MessageHandlerInterface; use Symfony\Component\Messenger\MessageBusInterface; diff --git a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Account/VerifyShopUserHandlerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Account/VerifyShopUserHandlerSpec.php index ed01fa5a53..5dc3567d1c 100644 --- a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Account/VerifyShopUserHandlerSpec.php +++ b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Account/VerifyShopUserHandlerSpec.php @@ -17,8 +17,8 @@ use PhpSpec\ObjectBehavior; use Prophecy\Argument; use Sylius\Bundle\ApiBundle\Command\Account\SendAccountRegistrationEmail; use Sylius\Bundle\ApiBundle\Command\Account\VerifyShopUser; -use Sylius\Component\Resource\Repository\RepositoryInterface; use Sylius\Component\User\Model\UserInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Clock\ClockInterface; use Symfony\Component\Messenger\Envelope; use Symfony\Component\Messenger\Handler\MessageHandlerInterface; diff --git a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Cart/PickupCartHandlerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Cart/PickupCartHandlerSpec.php index 12ce419455..e62ec9d540 100644 --- a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Cart/PickupCartHandlerSpec.php +++ b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Cart/PickupCartHandlerSpec.php @@ -26,7 +26,7 @@ use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Core\Repository\CustomerRepositoryInterface; use Sylius\Component\Core\Repository\OrderRepositoryInterface; use Sylius\Component\Locale\Model\LocaleInterface; -use Sylius\Component\Resource\Generator\RandomnessGeneratorInterface; +use Sylius\Resource\Generator\RandomnessGeneratorInterface; use Symfony\Component\Messenger\Handler\MessageHandlerInterface; final class PickupCartHandlerSpec extends ObjectBehavior diff --git a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Catalog/AddProductReviewHandlerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Catalog/AddProductReviewHandlerSpec.php index 63eb1186bf..e117436c45 100644 --- a/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Catalog/AddProductReviewHandlerSpec.php +++ b/src/Sylius/Bundle/ApiBundle/spec/CommandHandler/Catalog/AddProductReviewHandlerSpec.php @@ -20,9 +20,9 @@ use Sylius\Bundle\CoreBundle\Resolver\CustomerResolverInterface; use Sylius\Component\Core\Model\CustomerInterface; use Sylius\Component\Core\Model\ProductInterface; use Sylius\Component\Core\Repository\ProductRepositoryInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; use Sylius\Component\Review\Model\ReviewInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class AddProductReviewHandlerSpec extends ObjectBehavior { diff --git a/src/Sylius/Bundle/ApiBundle/spec/Creator/AvatarImageCreatorSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Creator/AvatarImageCreatorSpec.php index ca2cca1923..fc6cd7d0bb 100644 --- a/src/Sylius/Bundle/ApiBundle/spec/Creator/AvatarImageCreatorSpec.php +++ b/src/Sylius/Bundle/ApiBundle/spec/Creator/AvatarImageCreatorSpec.php @@ -20,8 +20,8 @@ use Sylius\Bundle\ApiBundle\Exception\NoFileUploadedException; use Sylius\Component\Core\Model\AdminUserInterface; use Sylius\Component\Core\Model\AvatarImageInterface; use Sylius\Component\Core\Uploader\ImageUploaderInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class AvatarImageCreatorSpec extends ObjectBehavior { diff --git a/src/Sylius/Bundle/ApiBundle/spec/Creator/ProductImageCreatorSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Creator/ProductImageCreatorSpec.php index 4bdb88eb48..64e3af179f 100644 --- a/src/Sylius/Bundle/ApiBundle/spec/Creator/ProductImageCreatorSpec.php +++ b/src/Sylius/Bundle/ApiBundle/spec/Creator/ProductImageCreatorSpec.php @@ -23,7 +23,7 @@ use Sylius\Component\Core\Model\ProductInterface; use Sylius\Component\Core\Model\ProductVariantInterface; use Sylius\Component\Core\Repository\ProductRepositoryInterface; use Sylius\Component\Core\Uploader\ImageUploaderInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class ProductImageCreatorSpec extends ObjectBehavior { diff --git a/src/Sylius/Bundle/ApiBundle/spec/Creator/TaxonImageCreatorSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Creator/TaxonImageCreatorSpec.php index e446b700c9..bb86356d66 100644 --- a/src/Sylius/Bundle/ApiBundle/spec/Creator/TaxonImageCreatorSpec.php +++ b/src/Sylius/Bundle/ApiBundle/spec/Creator/TaxonImageCreatorSpec.php @@ -20,8 +20,8 @@ use Sylius\Bundle\ApiBundle\Exception\TaxonNotFoundException; use Sylius\Component\Core\Model\TaxonImageInterface; use Sylius\Component\Core\Model\TaxonInterface; use Sylius\Component\Core\Uploader\ImageUploaderInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; use Sylius\Component\Taxonomy\Repository\TaxonRepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class TaxonImageCreatorSpec extends ObjectBehavior { diff --git a/src/Sylius/Bundle/ApiBundle/spec/Doctrine/ORM/QueryExtension/Shop/Order/ChannelBasedExtensionSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Doctrine/ORM/QueryExtension/Shop/Order/ChannelBasedExtensionSpec.php index 8333f35d39..63fd0a2179 100644 --- a/src/Sylius/Bundle/ApiBundle/spec/Doctrine/ORM/QueryExtension/Shop/Order/ChannelBasedExtensionSpec.php +++ b/src/Sylius/Bundle/ApiBundle/spec/Doctrine/ORM/QueryExtension/Shop/Order/ChannelBasedExtensionSpec.php @@ -23,7 +23,7 @@ use Sylius\Bundle\ApiBundle\Serializer\ContextKeys; use Sylius\Bundle\CoreBundle\SectionResolver\SectionProviderInterface; use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Component\Core\Model\OrderInterface; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ResourceInterface; final class ChannelBasedExtensionSpec extends ObjectBehavior { diff --git a/src/Sylius/Bundle/ApiBundle/spec/Doctrine/ORM/QueryExtension/Shop/Order/ShopUserBasedExtensionSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Doctrine/ORM/QueryExtension/Shop/Order/ShopUserBasedExtensionSpec.php index 9c2550c72f..1e1b9432b0 100644 --- a/src/Sylius/Bundle/ApiBundle/spec/Doctrine/ORM/QueryExtension/Shop/Order/ShopUserBasedExtensionSpec.php +++ b/src/Sylius/Bundle/ApiBundle/spec/Doctrine/ORM/QueryExtension/Shop/Order/ShopUserBasedExtensionSpec.php @@ -26,7 +26,7 @@ use Sylius\Component\Core\Model\AdminUserInterface; use Sylius\Component\Core\Model\CustomerInterface; use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Core\Model\ShopUserInterface; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ResourceInterface; final class ShopUserBasedExtensionSpec extends ObjectBehavior { diff --git a/src/Sylius/Bundle/ApiBundle/spec/Doctrine/ORM/QueryExtension/Shop/Order/StateBasedExtensionSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Doctrine/ORM/QueryExtension/Shop/Order/StateBasedExtensionSpec.php index 6988980d66..152ed6850a 100644 --- a/src/Sylius/Bundle/ApiBundle/spec/Doctrine/ORM/QueryExtension/Shop/Order/StateBasedExtensionSpec.php +++ b/src/Sylius/Bundle/ApiBundle/spec/Doctrine/ORM/QueryExtension/Shop/Order/StateBasedExtensionSpec.php @@ -25,7 +25,7 @@ use Sylius\Bundle\CoreBundle\SectionResolver\SectionProviderInterface; use Sylius\Component\Core\Model\CustomerInterface; use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Core\Model\ShopUserInterface; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ResourceInterface; final class StateBasedExtensionSpec extends ObjectBehavior { diff --git a/src/Sylius/Bundle/ApiBundle/spec/Doctrine/ORM/QueryExtension/Shop/Order/VisitorBasedExtensionSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Doctrine/ORM/QueryExtension/Shop/Order/VisitorBasedExtensionSpec.php index 777a4b756f..e74814c7e6 100644 --- a/src/Sylius/Bundle/ApiBundle/spec/Doctrine/ORM/QueryExtension/Shop/Order/VisitorBasedExtensionSpec.php +++ b/src/Sylius/Bundle/ApiBundle/spec/Doctrine/ORM/QueryExtension/Shop/Order/VisitorBasedExtensionSpec.php @@ -24,7 +24,7 @@ use Sylius\Bundle\ApiBundle\SectionResolver\ShopApiSection; use Sylius\Bundle\CoreBundle\SectionResolver\SectionProviderInterface; use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Core\Model\ShopUserInterface; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ResourceInterface; final class VisitorBasedExtensionSpec extends ObjectBehavior { diff --git a/src/Sylius/Bundle/ApiBundle/spec/Doctrine/ORM/QueryExtension/Shop/OrderItem/ShopUserBasedExtensionSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Doctrine/ORM/QueryExtension/Shop/OrderItem/ShopUserBasedExtensionSpec.php index 265ea05690..7920a9783e 100644 --- a/src/Sylius/Bundle/ApiBundle/spec/Doctrine/ORM/QueryExtension/Shop/OrderItem/ShopUserBasedExtensionSpec.php +++ b/src/Sylius/Bundle/ApiBundle/spec/Doctrine/ORM/QueryExtension/Shop/OrderItem/ShopUserBasedExtensionSpec.php @@ -27,7 +27,7 @@ use Sylius\Component\Core\Model\CustomerInterface; use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Core\Model\OrderItemInterface; use Sylius\Component\Core\Model\ShopUserInterface; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ResourceInterface; final class ShopUserBasedExtensionSpec extends ObjectBehavior { diff --git a/src/Sylius/Bundle/ApiBundle/spec/Doctrine/ORM/QueryExtension/Shop/OrderItem/VisitorBasedExtensionSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Doctrine/ORM/QueryExtension/Shop/OrderItem/VisitorBasedExtensionSpec.php index 2b72c144ec..717e5d6961 100644 --- a/src/Sylius/Bundle/ApiBundle/spec/Doctrine/ORM/QueryExtension/Shop/OrderItem/VisitorBasedExtensionSpec.php +++ b/src/Sylius/Bundle/ApiBundle/spec/Doctrine/ORM/QueryExtension/Shop/OrderItem/VisitorBasedExtensionSpec.php @@ -25,7 +25,7 @@ use Sylius\Bundle\CoreBundle\SectionResolver\SectionProviderInterface; use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Core\Model\OrderItemInterface; use Sylius\Component\Core\Model\ShopUserInterface; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ResourceInterface; final class VisitorBasedExtensionSpec extends ObjectBehavior { diff --git a/src/Sylius/Bundle/ApiBundle/spec/EventListener/ApiCartBlamerListenerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/EventListener/ApiCartBlamerListenerSpec.php index a2e5183772..72b5d2701b 100644 --- a/src/Sylius/Bundle/ApiBundle/spec/EventListener/ApiCartBlamerListenerSpec.php +++ b/src/Sylius/Bundle/ApiBundle/spec/EventListener/ApiCartBlamerListenerSpec.php @@ -26,7 +26,7 @@ use Sylius\Component\Core\Model\ShopUserInterface; use Sylius\Component\Order\Context\CartContextInterface; use Sylius\Component\Order\Context\CartNotFoundException; use Sylius\Component\Order\Model\OrderInterface as BaseOrderInterface; -use Sylius\Component\Resource\Exception\UnexpectedTypeException; +use Sylius\Resource\Exception\UnexpectedTypeException; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Messenger\Envelope; use Symfony\Component\Messenger\MessageBusInterface; diff --git a/src/Sylius/Bundle/ApiBundle/spec/Serializer/ChannelDenormalizerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Serializer/ChannelDenormalizerSpec.php index 64770e448e..7898be9061 100644 --- a/src/Sylius/Bundle/ApiBundle/spec/Serializer/ChannelDenormalizerSpec.php +++ b/src/Sylius/Bundle/ApiBundle/spec/Serializer/ChannelDenormalizerSpec.php @@ -18,7 +18,7 @@ use Prophecy\Argument; use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Component\Core\Model\ChannelPriceHistoryConfigInterface; use Sylius\Component\Core\Model\ShopBillingDataInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; final class ChannelDenormalizerSpec extends ObjectBehavior diff --git a/src/Sylius/Bundle/ApiBundle/spec/Serializer/Denormalizer/ChannelPriceHistoryConfigDenormalizerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Serializer/Denormalizer/ChannelPriceHistoryConfigDenormalizerSpec.php index 579481a925..7ae1772892 100644 --- a/src/Sylius/Bundle/ApiBundle/spec/Serializer/Denormalizer/ChannelPriceHistoryConfigDenormalizerSpec.php +++ b/src/Sylius/Bundle/ApiBundle/spec/Serializer/Denormalizer/ChannelPriceHistoryConfigDenormalizerSpec.php @@ -19,7 +19,7 @@ use PhpSpec\ObjectBehavior; use Prophecy\Argument; use Sylius\Component\Core\Model\ChannelPriceHistoryConfigInterface; use Sylius\Component\Core\Model\TaxonInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; final class ChannelPriceHistoryConfigDenormalizerSpec extends ObjectBehavior diff --git a/src/Sylius/Bundle/ApiBundle/spec/Serializer/Denormalizer/TranslatableDenormalizerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Serializer/Denormalizer/TranslatableDenormalizerSpec.php index b16060ae5c..815bc95cce 100644 --- a/src/Sylius/Bundle/ApiBundle/spec/Serializer/Denormalizer/TranslatableDenormalizerSpec.php +++ b/src/Sylius/Bundle/ApiBundle/spec/Serializer/Denormalizer/TranslatableDenormalizerSpec.php @@ -15,8 +15,8 @@ namespace spec\Sylius\Bundle\ApiBundle\Serializer\Denormalizer; use PhpSpec\ObjectBehavior; use Sylius\Bundle\ApiBundle\Serializer\ContextKeys; -use Sylius\Component\Resource\Model\TranslatableInterface; -use Sylius\Component\Resource\Translation\Provider\TranslationLocaleProviderInterface; +use Sylius\Resource\Model\TranslatableInterface; +use Sylius\Resource\Translation\Provider\TranslationLocaleProviderInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; final class TranslatableDenormalizerSpec extends ObjectBehavior @@ -37,7 +37,7 @@ final class TranslatableDenormalizerSpec extends ObjectBehavior ])->shouldReturn(false); $this->supportsDenormalization([], TranslatableInterface::class, null, [ - 'sylius_translatable_denormalizer_already_called_for_Sylius\Component\Resource\Model\TranslatableInterface' => true, + 'sylius_translatable_denormalizer_already_called_for_Sylius\Resource\Model\TranslatableInterface' => true, ContextKeys::HTTP_REQUEST_METHOD_TYPE => 'POST', ])->shouldReturn(false); @@ -55,7 +55,7 @@ final class TranslatableDenormalizerSpec extends ObjectBehavior $localeProvider->getDefaultLocaleCode()->willReturn('en'); $denormalizer->denormalize($data, TranslatableInterface::class, null, [ - 'sylius_translatable_denormalizer_already_called_for_Sylius\Component\Resource\Model\TranslatableInterface' => true, + 'sylius_translatable_denormalizer_already_called_for_Sylius\Resource\Model\TranslatableInterface' => true, ContextKeys::HTTP_REQUEST_METHOD_TYPE => 'POST', ])->shouldBeCalled()->willReturn($data); @@ -74,7 +74,7 @@ final class TranslatableDenormalizerSpec extends ObjectBehavior $updatedData = ['translations' => ['en' => ['locale' => 'en']]]; $denormalizer->denormalize($updatedData, TranslatableInterface::class, null, [ - 'sylius_translatable_denormalizer_already_called_for_Sylius\Component\Resource\Model\TranslatableInterface' => true, + 'sylius_translatable_denormalizer_already_called_for_Sylius\Resource\Model\TranslatableInterface' => true, ContextKeys::HTTP_REQUEST_METHOD_TYPE => 'POST', ])->shouldBeCalled()->willReturn($updatedData); @@ -94,7 +94,7 @@ final class TranslatableDenormalizerSpec extends ObjectBehavior $updatedData = ['translations' => ['en' => ['locale' => 'en']]]; $denormalizer->denormalize($updatedData, TranslatableInterface::class, null, [ - 'sylius_translatable_denormalizer_already_called_for_Sylius\Component\Resource\Model\TranslatableInterface' => true, + 'sylius_translatable_denormalizer_already_called_for_Sylius\Resource\Model\TranslatableInterface' => true, ContextKeys::HTTP_REQUEST_METHOD_TYPE => 'POST', ])->shouldBeCalled()->willReturn($updatedData); @@ -114,7 +114,7 @@ final class TranslatableDenormalizerSpec extends ObjectBehavior $updatedData = ['translations' => ['en' => ['locale' => 'en']]]; $denormalizer->denormalize($updatedData, TranslatableInterface::class, null, [ - 'sylius_translatable_denormalizer_already_called_for_Sylius\Component\Resource\Model\TranslatableInterface' => true, + 'sylius_translatable_denormalizer_already_called_for_Sylius\Resource\Model\TranslatableInterface' => true, ContextKeys::HTTP_REQUEST_METHOD_TYPE => 'POST', ])->shouldBeCalled()->willReturn($updatedData); @@ -134,7 +134,7 @@ final class TranslatableDenormalizerSpec extends ObjectBehavior $updatedData = ['translations' => ['en' => ['locale' => 'en']]]; $denormalizer->denormalize($updatedData, TranslatableInterface::class, null, [ - 'sylius_translatable_denormalizer_already_called_for_Sylius\Component\Resource\Model\TranslatableInterface' => true, + 'sylius_translatable_denormalizer_already_called_for_Sylius\Resource\Model\TranslatableInterface' => true, ContextKeys::HTTP_REQUEST_METHOD_TYPE => 'POST', ])->shouldBeCalled()->willReturn($updatedData); @@ -154,7 +154,7 @@ final class TranslatableDenormalizerSpec extends ObjectBehavior $updatedData = ['translations' => ['en' => ['locale' => 'en']]]; $denormalizer->denormalize($updatedData, TranslatableInterface::class, null, [ - 'sylius_translatable_denormalizer_already_called_for_Sylius\Component\Resource\Model\TranslatableInterface' => true, + 'sylius_translatable_denormalizer_already_called_for_Sylius\Resource\Model\TranslatableInterface' => true, ContextKeys::HTTP_REQUEST_METHOD_TYPE => 'POST', ])->shouldBeCalled()->willReturn($updatedData); @@ -174,7 +174,7 @@ final class TranslatableDenormalizerSpec extends ObjectBehavior $updatedData = ['translations' => ['en' => ['locale' => 'en'], 'pl' => ['locale' => 'pl']]]; $denormalizer->denormalize($updatedData, TranslatableInterface::class, null, [ - 'sylius_translatable_denormalizer_already_called_for_Sylius\Component\Resource\Model\TranslatableInterface' => true, + 'sylius_translatable_denormalizer_already_called_for_Sylius\Resource\Model\TranslatableInterface' => true, ContextKeys::HTTP_REQUEST_METHOD_TYPE => 'POST', ])->shouldBeCalled()->willReturn($updatedData); diff --git a/src/Sylius/Bundle/ApiBundle/spec/Serializer/Denormalizer/TranslatableLocaleKeyDenormalizerSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Serializer/Denormalizer/TranslatableLocaleKeyDenormalizerSpec.php index 71bb6013a3..f7398510d6 100644 --- a/src/Sylius/Bundle/ApiBundle/spec/Serializer/Denormalizer/TranslatableLocaleKeyDenormalizerSpec.php +++ b/src/Sylius/Bundle/ApiBundle/spec/Serializer/Denormalizer/TranslatableLocaleKeyDenormalizerSpec.php @@ -15,7 +15,7 @@ namespace spec\Sylius\Bundle\ApiBundle\Serializer\Denormalizer; use PhpSpec\ObjectBehavior; use Sylius\Bundle\ApiBundle\Exception\TranslationLocaleMismatchException; -use Sylius\Component\Resource\Model\TranslatableInterface; +use Sylius\Resource\Model\TranslatableInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; final class TranslatableLocaleKeyDenormalizerSpec extends ObjectBehavior @@ -24,7 +24,7 @@ final class TranslatableLocaleKeyDenormalizerSpec extends ObjectBehavior { $this ->supportsDenormalization([], TranslatableInterface::class, context: [ - 'sylius_translatable_locale_key_denormalizer_already_called_for_Sylius\Component\Resource\Model\TranslatableInterface' => true, + 'sylius_translatable_locale_key_denormalizer_already_called_for_Sylius\Resource\Model\TranslatableInterface' => true, ])->shouldReturn(false) ; } @@ -47,7 +47,7 @@ final class TranslatableLocaleKeyDenormalizerSpec extends ObjectBehavior $this->denormalize([], TranslatableInterface::class); $denormalizer->denormalize([], TranslatableInterface::class, null, [ - 'sylius_translatable_locale_key_denormalizer_already_called_for_Sylius\Component\Resource\Model\TranslatableInterface' => true, + 'sylius_translatable_locale_key_denormalizer_already_called_for_Sylius\Resource\Model\TranslatableInterface' => true, ])->shouldHaveBeenCalledOnce(); } @@ -65,7 +65,7 @@ final class TranslatableLocaleKeyDenormalizerSpec extends ObjectBehavior $updatedData, TranslatableInterface::class, null, - ['sylius_translatable_locale_key_denormalizer_already_called_for_Sylius\Component\Resource\Model\TranslatableInterface' => true], + ['sylius_translatable_locale_key_denormalizer_already_called_for_Sylius\Resource\Model\TranslatableInterface' => true], )->shouldHaveBeenCalledOnce(); } diff --git a/src/Sylius/Bundle/ApiBundle/spec/StateProvider/Common/Adjustment/CollectionProviderSpec.php b/src/Sylius/Bundle/ApiBundle/spec/StateProvider/Common/Adjustment/CollectionProviderSpec.php index beec16e4ac..7c9d431a60 100644 --- a/src/Sylius/Bundle/ApiBundle/spec/StateProvider/Common/Adjustment/CollectionProviderSpec.php +++ b/src/Sylius/Bundle/ApiBundle/spec/StateProvider/Common/Adjustment/CollectionProviderSpec.php @@ -20,7 +20,7 @@ use PhpSpec\ObjectBehavior; use Prophecy\Argument; use Sylius\Component\Core\Model\AdjustmentInterface; use Sylius\Component\Core\Model\OrderItem; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\HttpFoundation\Request; final class CollectionProviderSpec extends ObjectBehavior diff --git a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/CorrectOrderAddressValidatorSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/CorrectOrderAddressValidatorSpec.php index ca8d10bc03..71d0e1a6f9 100644 --- a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/CorrectOrderAddressValidatorSpec.php +++ b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/CorrectOrderAddressValidatorSpec.php @@ -19,7 +19,7 @@ use Sylius\Bundle\ApiBundle\Command\Checkout\UpdateCart; use Sylius\Bundle\ApiBundle\Validator\Constraints\CorrectOrderAddress; use Sylius\Component\Addressing\Model\CountryInterface; use Sylius\Component\Core\Model\AddressInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidatorInterface; use Symfony\Component\Validator\Context\ExecutionContextInterface; diff --git a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/ShopUserVerificationTokenEligibilityValidatorSpec.php b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/ShopUserVerificationTokenEligibilityValidatorSpec.php index 14a600bfec..7db81764c4 100644 --- a/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/ShopUserVerificationTokenEligibilityValidatorSpec.php +++ b/src/Sylius/Bundle/ApiBundle/spec/Validator/Constraints/ShopUserVerificationTokenEligibilityValidatorSpec.php @@ -18,7 +18,7 @@ use Sylius\Bundle\ApiBundle\Command\Account\VerifyShopUser; use Sylius\Bundle\ApiBundle\Validator\Constraints\OrderPaymentMethodEligibility; use Sylius\Bundle\ApiBundle\Validator\Constraints\ShopUserVerificationTokenEligibility; use Sylius\Component\Core\Model\ShopUserInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Validator\ConstraintValidatorInterface; use Symfony\Component\Validator\Context\ExecutionContextInterface; diff --git a/src/Sylius/Bundle/AttributeBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/AttributeBundle/DependencyInjection/Configuration.php index d8de136c9d..1d27d13f0e 100644 --- a/src/Sylius/Bundle/AttributeBundle/DependencyInjection/Configuration.php +++ b/src/Sylius/Bundle/AttributeBundle/DependencyInjection/Configuration.php @@ -22,8 +22,8 @@ use Sylius\Component\Attribute\Model\Attribute; use Sylius\Component\Attribute\Model\AttributeInterface; use Sylius\Component\Attribute\Model\AttributeTranslation; use Sylius\Component\Attribute\Model\AttributeTranslationInterface; -use Sylius\Component\Resource\Factory\Factory; -use Sylius\Component\Resource\Factory\TranslatableFactory; +use Sylius\Resource\Factory\Factory; +use Sylius\Resource\Factory\TranslatableFactory; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; diff --git a/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeChoiceType.php b/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeChoiceType.php index 95740c084e..f0fe3a46ff 100644 --- a/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeChoiceType.php +++ b/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeChoiceType.php @@ -13,7 +13,8 @@ declare(strict_types=1); namespace Sylius\Bundle\AttributeBundle\Form\Type; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Component\Attribute\Model\AttributeInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Bridge\Doctrine\Form\DataTransformer\CollectionToArrayTransformer; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; @@ -22,6 +23,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; abstract class AttributeChoiceType extends AbstractType { + /** @param RepositoryInterface $attributeRepository */ public function __construct(protected RepositoryInterface $attributeRepository) { } diff --git a/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeType/Configuration/SelectAttributeValueTranslationsType.php b/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeType/Configuration/SelectAttributeValueTranslationsType.php index 2888e64acb..c5d9216a86 100644 --- a/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeType/Configuration/SelectAttributeValueTranslationsType.php +++ b/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeType/Configuration/SelectAttributeValueTranslationsType.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Bundle\AttributeBundle\Form\Type\AttributeType\Configuration; use Sylius\Bundle\ResourceBundle\Form\Type\FixedCollectionType; -use Sylius\Component\Resource\Translation\Provider\TranslationLocaleProviderInterface; +use Sylius\Resource\Translation\Provider\TranslationLocaleProviderInterface; use Symfony\Component\Form\AbstractType; use Symfony\Component\OptionsResolver\OptionsResolver; diff --git a/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeType/SelectAttributeType.php b/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeType/SelectAttributeType.php index a914f437b6..844c62d634 100644 --- a/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeType/SelectAttributeType.php +++ b/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeType/SelectAttributeType.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Bundle\AttributeBundle\Form\Type\AttributeType; -use Sylius\Component\Resource\Translation\Provider\TranslationLocaleProviderInterface; +use Sylius\Resource\Translation\Provider\TranslationLocaleProviderInterface; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\CallbackTransformer; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; diff --git a/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeValueType.php b/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeValueType.php index 8addbeaf9a..e8ad0d0be2 100644 --- a/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeValueType.php +++ b/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeValueType.php @@ -21,7 +21,7 @@ use Sylius\Bundle\ResourceBundle\Form\Type\AbstractResourceType; use Sylius\Component\Attribute\Model\AttributeInterface; use Sylius\Component\Attribute\Model\AttributeValueInterface; use Sylius\Component\Locale\Model\LocaleInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Form\DataTransformerInterface; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormEvent; @@ -33,6 +33,8 @@ abstract class AttributeValueType extends AbstractResourceType { /** * @param DataTransformerInterface|null $localeToCodeTransformer + * @param RepositoryInterface $attributeRepository + * @param RepositoryInterface $localeRepository */ public function __construct( string $dataClass, diff --git a/src/Sylius/Bundle/AttributeBundle/Tests/Form/Type/AttributeType/SelectAttributeTypeTest.php b/src/Sylius/Bundle/AttributeBundle/Tests/Form/Type/AttributeType/SelectAttributeTypeTest.php index 8ac8bed1c2..27a34e0775 100644 --- a/src/Sylius/Bundle/AttributeBundle/Tests/Form/Type/AttributeType/SelectAttributeTypeTest.php +++ b/src/Sylius/Bundle/AttributeBundle/Tests/Form/Type/AttributeType/SelectAttributeTypeTest.php @@ -17,7 +17,7 @@ use PHPUnit\Framework\Assert; use Prophecy\PhpUnit\ProphecyTrait; use Prophecy\Prophecy\ObjectProphecy; use Sylius\Bundle\AttributeBundle\Form\Type\AttributeType\SelectAttributeType; -use Sylius\Component\Resource\Translation\Provider\TranslationLocaleProviderInterface; +use Sylius\Resource\Translation\Provider\TranslationLocaleProviderInterface; use Symfony\Component\Form\ChoiceList\View\ChoiceView; use Symfony\Component\Form\PreloadedExtension; use Symfony\Component\Form\Test\TypeTestCase; diff --git a/src/Sylius/Bundle/AttributeBundle/Validator/Constraints/ValidAttributeValueValidator.php b/src/Sylius/Bundle/AttributeBundle/Validator/Constraints/ValidAttributeValueValidator.php index 096702ff86..542104a600 100644 --- a/src/Sylius/Bundle/AttributeBundle/Validator/Constraints/ValidAttributeValueValidator.php +++ b/src/Sylius/Bundle/AttributeBundle/Validator/Constraints/ValidAttributeValueValidator.php @@ -16,7 +16,7 @@ namespace Sylius\Bundle\AttributeBundle\Validator\Constraints; use Sylius\Component\Attribute\AttributeType\AttributeTypeInterface; use Sylius\Component\Attribute\Model\AttributeValueInterface; use Sylius\Component\Registry\ServiceRegistryInterface; -use Sylius\Component\Resource\Exception\UnexpectedTypeException; +use Sylius\Resource\Exception\UnexpectedTypeException; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; diff --git a/src/Sylius/Bundle/AttributeBundle/composer.json b/src/Sylius/Bundle/AttributeBundle/composer.json index 07a3451c9d..a8002af4e4 100644 --- a/src/Sylius/Bundle/AttributeBundle/composer.json +++ b/src/Sylius/Bundle/AttributeBundle/composer.json @@ -30,7 +30,7 @@ "ramsey/uuid": "^4.0", "stof/doctrine-extensions-bundle": "^1.4", "sylius/attribute": "^2.0", - "sylius/resource-bundle": "^1.10", + "sylius/resource-bundle": "^1.11", "symfony/framework-bundle": "^6.4.1" }, "require-dev": { diff --git a/src/Sylius/Bundle/AttributeBundle/spec/Validator/Constraints/ValidAttributeValueValidatorSpec.php b/src/Sylius/Bundle/AttributeBundle/spec/Validator/Constraints/ValidAttributeValueValidatorSpec.php index 7783ccfe8d..2e031c72af 100644 --- a/src/Sylius/Bundle/AttributeBundle/spec/Validator/Constraints/ValidAttributeValueValidatorSpec.php +++ b/src/Sylius/Bundle/AttributeBundle/spec/Validator/Constraints/ValidAttributeValueValidatorSpec.php @@ -22,7 +22,7 @@ use Sylius\Component\Attribute\AttributeType\TextAttributeType; use Sylius\Component\Attribute\Model\AttributeInterface; use Sylius\Component\Attribute\Model\AttributeValueInterface; use Sylius\Component\Registry\ServiceRegistryInterface; -use Sylius\Component\Resource\Exception\UnexpectedTypeException; +use Sylius\Resource\Exception\UnexpectedTypeException; use Symfony\Component\Validator\ConstraintValidator; use Symfony\Component\Validator\Context\ExecutionContextInterface; diff --git a/src/Sylius/Bundle/ChannelBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/ChannelBundle/DependencyInjection/Configuration.php index 873e3be2ec..087456f4ce 100644 --- a/src/Sylius/Bundle/ChannelBundle/DependencyInjection/Configuration.php +++ b/src/Sylius/Bundle/ChannelBundle/DependencyInjection/Configuration.php @@ -18,7 +18,7 @@ use Sylius\Bundle\ResourceBundle\Controller\ResourceController; use Sylius\Bundle\ResourceBundle\SyliusResourceBundle; use Sylius\Component\Channel\Model\Channel; use Sylius\Component\Channel\Model\ChannelInterface; -use Sylius\Component\Resource\Factory\Factory; +use Sylius\Resource\Factory\Factory; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; diff --git a/src/Sylius/Bundle/ChannelBundle/Form/Type/ChannelChoiceType.php b/src/Sylius/Bundle/ChannelBundle/Form/Type/ChannelChoiceType.php index 8b5d9b90c8..45c9708b99 100644 --- a/src/Sylius/Bundle/ChannelBundle/Form/Type/ChannelChoiceType.php +++ b/src/Sylius/Bundle/ChannelBundle/Form/Type/ChannelChoiceType.php @@ -13,7 +13,8 @@ declare(strict_types=1); namespace Sylius\Bundle\ChannelBundle\Form\Type; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Component\Core\Model\ChannelInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Bridge\Doctrine\Form\DataTransformer\CollectionToArrayTransformer; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; @@ -23,6 +24,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class ChannelChoiceType extends AbstractType { + /** @param RepositoryInterface $channelRepository */ public function __construct(private RepositoryInterface $channelRepository) { } diff --git a/src/Sylius/Bundle/ChannelBundle/composer.json b/src/Sylius/Bundle/ChannelBundle/composer.json index 721f5b6fa7..17d75414cc 100644 --- a/src/Sylius/Bundle/ChannelBundle/composer.json +++ b/src/Sylius/Bundle/ChannelBundle/composer.json @@ -27,7 +27,7 @@ "require": { "php": "^8.2", "sylius/channel": "^2.0", - "sylius/resource-bundle": "^1.10", + "sylius/resource-bundle": "^1.11", "symfony/framework-bundle": "^6.4.1" }, "require-dev": { diff --git a/src/Sylius/Bundle/CoreBundle/CatalogPromotion/CommandHandler/UpdateCatalogPromotionStateHandler.php b/src/Sylius/Bundle/CoreBundle/CatalogPromotion/CommandHandler/UpdateCatalogPromotionStateHandler.php index aa01ab00ca..767d0cdfc4 100644 --- a/src/Sylius/Bundle/CoreBundle/CatalogPromotion/CommandHandler/UpdateCatalogPromotionStateHandler.php +++ b/src/Sylius/Bundle/CoreBundle/CatalogPromotion/CommandHandler/UpdateCatalogPromotionStateHandler.php @@ -16,10 +16,11 @@ namespace Sylius\Bundle\CoreBundle\CatalogPromotion\CommandHandler; use Sylius\Bundle\CoreBundle\CatalogPromotion\Command\UpdateCatalogPromotionState; use Sylius\Bundle\CoreBundle\CatalogPromotion\Processor\CatalogPromotionStateProcessorInterface; use Sylius\Component\Core\Model\CatalogPromotionInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class UpdateCatalogPromotionStateHandler { + /** @param RepositoryInterface $catalogPromotionRepository */ public function __construct( private CatalogPromotionStateProcessorInterface $catalogPromotionStateProcessor, private RepositoryInterface $catalogPromotionRepository, diff --git a/src/Sylius/Bundle/CoreBundle/CatalogPromotion/Listener/CatalogPromotionCreatedListener.php b/src/Sylius/Bundle/CoreBundle/CatalogPromotion/Listener/CatalogPromotionCreatedListener.php index e77c5b0c16..8998b3072b 100644 --- a/src/Sylius/Bundle/CoreBundle/CatalogPromotion/Listener/CatalogPromotionCreatedListener.php +++ b/src/Sylius/Bundle/CoreBundle/CatalogPromotion/Listener/CatalogPromotionCreatedListener.php @@ -18,11 +18,12 @@ use Sylius\Bundle\CoreBundle\CatalogPromotion\Command\UpdateCatalogPromotionStat use Sylius\Bundle\CoreBundle\CatalogPromotion\Processor\AllProductVariantsCatalogPromotionsProcessorInterface; use Sylius\Component\Core\Model\CatalogPromotionInterface; use Sylius\Component\Promotion\Event\CatalogPromotionCreated; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Messenger\MessageBusInterface; final class CatalogPromotionCreatedListener { + /** @param RepositoryInterface $catalogPromotionRepository */ public function __construct( private AllProductVariantsCatalogPromotionsProcessorInterface $allProductVariantsCatalogPromotionsProcessor, private RepositoryInterface $catalogPromotionRepository, diff --git a/src/Sylius/Bundle/CoreBundle/CatalogPromotion/Listener/CatalogPromotionEndedListener.php b/src/Sylius/Bundle/CoreBundle/CatalogPromotion/Listener/CatalogPromotionEndedListener.php index 1d92144948..80709632bd 100644 --- a/src/Sylius/Bundle/CoreBundle/CatalogPromotion/Listener/CatalogPromotionEndedListener.php +++ b/src/Sylius/Bundle/CoreBundle/CatalogPromotion/Listener/CatalogPromotionEndedListener.php @@ -18,11 +18,12 @@ use Sylius\Bundle\CoreBundle\CatalogPromotion\Command\UpdateCatalogPromotionStat use Sylius\Bundle\CoreBundle\CatalogPromotion\Processor\AllProductVariantsCatalogPromotionsProcessorInterface; use Sylius\Component\Core\Model\CatalogPromotionInterface; use Sylius\Component\Promotion\Event\CatalogPromotionEnded; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Messenger\MessageBusInterface; final class CatalogPromotionEndedListener { + /** @param RepositoryInterface $catalogPromotionRepository */ public function __construct( private AllProductVariantsCatalogPromotionsProcessorInterface $allProductVariantsCatalogPromotionsProcessor, private RepositoryInterface $catalogPromotionRepository, diff --git a/src/Sylius/Bundle/CoreBundle/CatalogPromotion/Listener/CatalogPromotionUpdatedListener.php b/src/Sylius/Bundle/CoreBundle/CatalogPromotion/Listener/CatalogPromotionUpdatedListener.php index 7f050fbc82..b0a3540e75 100644 --- a/src/Sylius/Bundle/CoreBundle/CatalogPromotion/Listener/CatalogPromotionUpdatedListener.php +++ b/src/Sylius/Bundle/CoreBundle/CatalogPromotion/Listener/CatalogPromotionUpdatedListener.php @@ -18,11 +18,12 @@ use Sylius\Bundle\CoreBundle\CatalogPromotion\Command\UpdateCatalogPromotionStat use Sylius\Bundle\CoreBundle\CatalogPromotion\Processor\AllProductVariantsCatalogPromotionsProcessorInterface; use Sylius\Component\Core\Model\CatalogPromotionInterface; use Sylius\Component\Promotion\Event\CatalogPromotionUpdated; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Messenger\MessageBusInterface; final class CatalogPromotionUpdatedListener { + /** @param RepositoryInterface $catalogPromotionRepository */ public function __construct( private AllProductVariantsCatalogPromotionsProcessorInterface $allProductVariantsCatalogPromotionsProcessor, private RepositoryInterface $catalogPromotionRepository, diff --git a/src/Sylius/Bundle/CoreBundle/Checkout/CheckoutRedirectListener.php b/src/Sylius/Bundle/CoreBundle/Checkout/CheckoutRedirectListener.php index afbf13f2e0..9a792a67bc 100644 --- a/src/Sylius/Bundle/CoreBundle/Checkout/CheckoutRedirectListener.php +++ b/src/Sylius/Bundle/CoreBundle/Checkout/CheckoutRedirectListener.php @@ -13,8 +13,8 @@ declare(strict_types=1); namespace Sylius\Bundle\CoreBundle\Checkout; -use Sylius\Bundle\ResourceBundle\Event\ResourceControllerEvent; use Sylius\Component\Core\Model\OrderInterface; +use Sylius\Resource\Symfony\EventDispatcher\GenericEvent; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\RequestMatcherInterface; use Symfony\Component\HttpFoundation\RequestStack; @@ -29,7 +29,7 @@ final class CheckoutRedirectListener ) { } - public function handleCheckoutRedirect(ResourceControllerEvent $resourceControllerEvent): void + public function handleCheckoutRedirect(GenericEvent $event): void { $request = $this->requestStack->getCurrentRequest(); if ( @@ -40,10 +40,10 @@ final class CheckoutRedirectListener return; } - $order = $resourceControllerEvent->getSubject(); + $order = $event->getSubject(); Assert::isInstanceOf($order, OrderInterface::class); - $resourceControllerEvent->setResponse( + $event->setResponse( new RedirectResponse($this->checkoutStateUrlGenerator->generateForOrderCheckoutState($order)), ); } diff --git a/src/Sylius/Bundle/CoreBundle/CommandHandler/ResendOrderConfirmationEmailHandler.php b/src/Sylius/Bundle/CoreBundle/CommandHandler/ResendOrderConfirmationEmailHandler.php index aae99a9cfb..734bbd7f48 100644 --- a/src/Sylius/Bundle/CoreBundle/CommandHandler/ResendOrderConfirmationEmailHandler.php +++ b/src/Sylius/Bundle/CoreBundle/CommandHandler/ResendOrderConfirmationEmailHandler.php @@ -16,7 +16,7 @@ namespace Sylius\Bundle\CoreBundle\CommandHandler; use Sylius\Bundle\CoreBundle\Command\ResendOrderConfirmationEmail; use Sylius\Bundle\CoreBundle\Mailer\OrderEmailManagerInterface; use Sylius\Component\Core\Model\OrderInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\Messenger\Handler\MessageHandlerInterface; diff --git a/src/Sylius/Bundle/CoreBundle/CommandHandler/ResendShipmentConfirmationEmailHandler.php b/src/Sylius/Bundle/CoreBundle/CommandHandler/ResendShipmentConfirmationEmailHandler.php index 71e56365f5..0f3e03755c 100644 --- a/src/Sylius/Bundle/CoreBundle/CommandHandler/ResendShipmentConfirmationEmailHandler.php +++ b/src/Sylius/Bundle/CoreBundle/CommandHandler/ResendShipmentConfirmationEmailHandler.php @@ -16,15 +16,13 @@ namespace Sylius\Bundle\CoreBundle\CommandHandler; use Sylius\Bundle\CoreBundle\Command\ResendShipmentConfirmationEmail; use Sylius\Bundle\CoreBundle\Mailer\ShipmentEmailManagerInterface; use Sylius\Component\Core\Model\ShipmentInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\Messenger\Handler\MessageHandlerInterface; final class ResendShipmentConfirmationEmailHandler implements MessageHandlerInterface { - /** - * @param RepositoryInterface $shipmentRepository - */ + /** @param RepositoryInterface $shipmentRepository */ public function __construct( private RepositoryInterface $shipmentRepository, private ShipmentEmailManagerInterface $shipmentEmailManager, diff --git a/src/Sylius/Bundle/CoreBundle/Controller/OrderController.php b/src/Sylius/Bundle/CoreBundle/Controller/OrderController.php index a148546fe0..eaf51d9dd9 100644 --- a/src/Sylius/Bundle/CoreBundle/Controller/OrderController.php +++ b/src/Sylius/Bundle/CoreBundle/Controller/OrderController.php @@ -17,7 +17,7 @@ use FOS\RestBundle\View\View; use Sylius\Bundle\OrderBundle\Controller\OrderController as BaseOrderController; use Sylius\Component\Core\Repository\OrderRepositoryInterface; use Sylius\Component\Order\SyliusCartEvents; -use Sylius\Component\Resource\ResourceActions; +use Sylius\Resource\ResourceActions; use Symfony\Component\EventDispatcher\GenericEvent; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; diff --git a/src/Sylius/Bundle/CoreBundle/Controller/ProductTaxonController.php b/src/Sylius/Bundle/CoreBundle/Controller/ProductTaxonController.php index 1307d41108..77c96f0af1 100644 --- a/src/Sylius/Bundle/CoreBundle/Controller/ProductTaxonController.php +++ b/src/Sylius/Bundle/CoreBundle/Controller/ProductTaxonController.php @@ -17,7 +17,7 @@ use Sylius\Bundle\ResourceBundle\Controller\RequestConfiguration; use Sylius\Bundle\ResourceBundle\Controller\ResourceController; use Sylius\Component\Core\Model\ProductTaxonInterface; use Sylius\Component\Core\Positioner\PositionerInterface; -use Sylius\Component\Resource\ResourceActions; +use Sylius\Resource\ResourceActions; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\RequestStack; diff --git a/src/Sylius/Bundle/CoreBundle/Controller/ProductVariantController.php b/src/Sylius/Bundle/CoreBundle/Controller/ProductVariantController.php index 12d8010ab0..8b7d877fd7 100644 --- a/src/Sylius/Bundle/CoreBundle/Controller/ProductVariantController.php +++ b/src/Sylius/Bundle/CoreBundle/Controller/ProductVariantController.php @@ -15,7 +15,7 @@ namespace Sylius\Bundle\CoreBundle\Controller; use Sylius\Bundle\ResourceBundle\Controller\ResourceController; use Sylius\Component\Core\Model\ProductVariantInterface; -use Sylius\Component\Resource\ResourceActions; +use Sylius\Resource\ResourceActions; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; diff --git a/src/Sylius/Bundle/CoreBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/CoreBundle/DependencyInjection/Configuration.php index d3f646f3bb..b3a5cb624f 100644 --- a/src/Sylius/Bundle/CoreBundle/DependencyInjection/Configuration.php +++ b/src/Sylius/Bundle/CoreBundle/DependencyInjection/Configuration.php @@ -37,7 +37,7 @@ use Sylius\Component\Core\Model\ShopBillingData; use Sylius\Component\Core\Model\ShopBillingDataInterface; use Sylius\Component\Core\Model\TaxonImage; use Sylius\Component\Core\Model\TaxonImageInterface; -use Sylius\Component\Resource\Factory\Factory; +use Sylius\Resource\Factory\Factory; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; diff --git a/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/Handler/ResourceDeleteHandler.php b/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/Handler/ResourceDeleteHandler.php index f3ee968c23..675a717eb0 100644 --- a/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/Handler/ResourceDeleteHandler.php +++ b/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/Handler/ResourceDeleteHandler.php @@ -17,17 +17,21 @@ use Doctrine\DBAL\Exception\ForeignKeyConstraintViolationException; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\ORMException; use Sylius\Bundle\ResourceBundle\Controller\ResourceDeleteHandlerInterface; -use Sylius\Component\Resource\Exception\DeleteHandlingException; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Exception\DeleteHandlingException; +use Sylius\Resource\Model\ResourceInterface; final class ResourceDeleteHandler implements ResourceDeleteHandlerInterface { - public function __construct(private ResourceDeleteHandlerInterface $decoratedHandler, private EntityManagerInterface $entityManager) - { + public function __construct( + private ResourceDeleteHandlerInterface $decoratedHandler, + private EntityManagerInterface $entityManager, + ) { } /** + * @param RepositoryInterface $repository + * * @throws DeleteHandlingException */ public function handle(ResourceInterface $resource, RepositoryInterface $repository): void diff --git a/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/Handler/ResourceUpdateHandler.php b/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/Handler/ResourceUpdateHandler.php index dd2e95906e..98a9a99261 100644 --- a/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/Handler/ResourceUpdateHandler.php +++ b/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/Handler/ResourceUpdateHandler.php @@ -18,8 +18,8 @@ use Doctrine\ORM\OptimisticLockException; use Doctrine\Persistence\ObjectManager; use Sylius\Bundle\ResourceBundle\Controller\RequestConfiguration; use Sylius\Bundle\ResourceBundle\Controller\ResourceUpdateHandlerInterface; -use Sylius\Component\Resource\Exception\RaceConditionException; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Exception\RaceConditionException; +use Sylius\Resource\Model\ResourceInterface; final class ResourceUpdateHandler implements ResourceUpdateHandlerInterface { diff --git a/src/Sylius/Bundle/CoreBundle/EventListener/ChannelDeletionListener.php b/src/Sylius/Bundle/CoreBundle/EventListener/ChannelDeletionListener.php index 9966020af5..ac20706a70 100644 --- a/src/Sylius/Bundle/CoreBundle/EventListener/ChannelDeletionListener.php +++ b/src/Sylius/Bundle/CoreBundle/EventListener/ChannelDeletionListener.php @@ -13,10 +13,10 @@ declare(strict_types=1); namespace Sylius\Bundle\CoreBundle\EventListener; -use Sylius\Bundle\ResourceBundle\Event\ResourceControllerEvent; use Sylius\Component\Channel\Checker\ChannelDeletionCheckerInterface; use Sylius\Component\Channel\Model\ChannelInterface; -use Sylius\Component\Resource\Exception\UnexpectedTypeException; +use Sylius\Resource\Exception\UnexpectedTypeException; +use Sylius\Resource\Symfony\EventDispatcher\GenericEvent; final class ChannelDeletionListener { @@ -27,7 +27,7 @@ final class ChannelDeletionListener /** * Prevent channel deletion if no more channels enabled. */ - public function onChannelPreDelete(ResourceControllerEvent $event): void + public function onChannelPreDelete(GenericEvent $event): void { $channel = $event->getSubject(); diff --git a/src/Sylius/Bundle/CoreBundle/EventListener/CustomerDefaultAddressListener.php b/src/Sylius/Bundle/CoreBundle/EventListener/CustomerDefaultAddressListener.php index e0c5c61f7c..94f409aded 100644 --- a/src/Sylius/Bundle/CoreBundle/EventListener/CustomerDefaultAddressListener.php +++ b/src/Sylius/Bundle/CoreBundle/EventListener/CustomerDefaultAddressListener.php @@ -13,14 +13,14 @@ declare(strict_types=1); namespace Sylius\Bundle\CoreBundle\EventListener; -use Sylius\Bundle\ResourceBundle\Event\ResourceControllerEvent; use Sylius\Component\Core\Model\AddressInterface; use Sylius\Component\Core\Model\Customer; +use Sylius\Resource\Symfony\EventDispatcher\GenericEvent; use Webmozart\Assert\Assert; final class CustomerDefaultAddressListener { - public function preCreate(ResourceControllerEvent $event): void + public function preCreate(GenericEvent $event): void { $address = $event->getSubject(); diff --git a/src/Sylius/Bundle/CoreBundle/EventListener/LockingListener.php b/src/Sylius/Bundle/CoreBundle/EventListener/LockingListener.php index d24d1719a9..df0a58fe37 100644 --- a/src/Sylius/Bundle/CoreBundle/EventListener/LockingListener.php +++ b/src/Sylius/Bundle/CoreBundle/EventListener/LockingListener.php @@ -15,7 +15,7 @@ namespace Sylius\Bundle\CoreBundle\EventListener; use Doctrine\DBAL\LockMode; use Doctrine\ORM\EntityManagerInterface; -use Sylius\Component\Resource\Model\VersionedInterface; +use Sylius\Resource\Model\VersionedInterface; use Symfony\Component\EventDispatcher\GenericEvent; use Webmozart\Assert\Assert; diff --git a/src/Sylius/Bundle/CoreBundle/EventListener/PaymentPreCompleteListener.php b/src/Sylius/Bundle/CoreBundle/EventListener/PaymentPreCompleteListener.php index 8e756270bb..2c9fe0ca63 100644 --- a/src/Sylius/Bundle/CoreBundle/EventListener/PaymentPreCompleteListener.php +++ b/src/Sylius/Bundle/CoreBundle/EventListener/PaymentPreCompleteListener.php @@ -13,11 +13,11 @@ declare(strict_types=1); namespace Sylius\Bundle\CoreBundle\EventListener; -use Sylius\Bundle\ResourceBundle\Event\ResourceControllerEvent; use Sylius\Component\Core\Inventory\Checker\OrderItemAvailabilityCheckerInterface; use Sylius\Component\Core\Model\PaymentInterface; use Sylius\Component\Core\Model\ProductVariantInterface; use Sylius\Component\Inventory\Checker\AvailabilityCheckerInterface; +use Sylius\Resource\Symfony\EventDispatcher\GenericEvent; final class PaymentPreCompleteListener { @@ -26,7 +26,7 @@ final class PaymentPreCompleteListener ) { } - public function checkStockAvailability(ResourceControllerEvent $event): void + public function checkStockAvailability(GenericEvent $event): void { /** @var PaymentInterface $payment */ $payment = $event->getSubject(); @@ -65,7 +65,7 @@ final class PaymentPreCompleteListener ; } - private function stopEvent(ResourceControllerEvent $event, string $variantCode): void + private function stopEvent(GenericEvent $event, string $variantCode): void { $event->setMessageType('error'); $event->setMessage('sylius.resource.payment.cannot_be_completed'); diff --git a/src/Sylius/Bundle/CoreBundle/EventListener/ProductDeletionListener.php b/src/Sylius/Bundle/CoreBundle/EventListener/ProductDeletionListener.php index 95ae775742..faea584418 100644 --- a/src/Sylius/Bundle/CoreBundle/EventListener/ProductDeletionListener.php +++ b/src/Sylius/Bundle/CoreBundle/EventListener/ProductDeletionListener.php @@ -13,9 +13,9 @@ declare(strict_types=1); namespace Sylius\Bundle\CoreBundle\EventListener; -use Sylius\Bundle\ResourceBundle\Event\ResourceControllerEvent; use Sylius\Component\Core\Model\ProductInterface; use Sylius\Component\Core\Promotion\Checker\ProductInPromotionRuleCheckerInterface; +use Sylius\Resource\Symfony\EventDispatcher\GenericEvent; use Webmozart\Assert\Assert; final class ProductDeletionListener @@ -24,7 +24,7 @@ final class ProductDeletionListener { } - public function protectFromRemovingProductInUseByPromotionRule(ResourceControllerEvent $event): void + public function protectFromRemovingProductInUseByPromotionRule(GenericEvent $event): void { $product = $event->getSubject(); Assert::isInstanceOf($product, ProductInterface::class); diff --git a/src/Sylius/Bundle/CoreBundle/EventListener/TaxonDeletionListener.php b/src/Sylius/Bundle/CoreBundle/EventListener/TaxonDeletionListener.php index d7c3075970..f93b0d7d9f 100644 --- a/src/Sylius/Bundle/CoreBundle/EventListener/TaxonDeletionListener.php +++ b/src/Sylius/Bundle/CoreBundle/EventListener/TaxonDeletionListener.php @@ -14,12 +14,12 @@ declare(strict_types=1); namespace Sylius\Bundle\CoreBundle\EventListener; use Sylius\Bundle\CoreBundle\Provider\FlashBagProvider; -use Sylius\Bundle\ResourceBundle\Event\ResourceControllerEvent; use Sylius\Component\Channel\Repository\ChannelRepositoryInterface; use Sylius\Component\Core\Model\TaxonInterface; use Sylius\Component\Core\Promotion\Checker\TaxonInPromotionRuleCheckerInterface; use Sylius\Component\Core\Promotion\Updater\Rule\TaxonAwareRuleUpdaterInterface; -use Symfony\Component\EventDispatcher\GenericEvent; +use Sylius\Resource\Symfony\EventDispatcher\GenericEvent; +use Symfony\Component\EventDispatcher\GenericEvent as SymfonyGenericEvent; use Symfony\Component\HttpFoundation\RequestStack; use Webmozart\Assert\Assert; @@ -37,7 +37,7 @@ final class TaxonDeletionListener $this->ruleUpdaters = $ruleUpdaters; } - public function protectFromRemovingMenuTaxon(GenericEvent $event): void + public function protectFromRemovingMenuTaxon(SymfonyGenericEvent $event): void { $taxon = $event->getSubject(); Assert::isInstanceOf($taxon, TaxonInterface::class); @@ -51,7 +51,7 @@ final class TaxonDeletionListener } } - public function protectFromRemovingTaxonInUseByPromotionRule(ResourceControllerEvent $event): void + public function protectFromRemovingTaxonInUseByPromotionRule(GenericEvent $event): void { $taxon = $event->getSubject(); Assert::isInstanceOf($taxon, TaxonInterface::class); @@ -63,7 +63,7 @@ final class TaxonDeletionListener } } - public function removeTaxonFromPromotionRules(GenericEvent $event): void + public function removeTaxonFromPromotionRules(SymfonyGenericEvent $event): void { $taxon = $event->getSubject(); Assert::isInstanceOf($taxon, TaxonInterface::class); @@ -82,7 +82,7 @@ final class TaxonDeletionListener } } - public function handleRemovingRootTaxonAtPositionZero(GenericEvent $event): void + public function handleRemovingRootTaxonAtPositionZero(SymfonyGenericEvent $event): void { /** @var TaxonInterface $taxon */ $taxon = $event->getSubject(); diff --git a/src/Sylius/Bundle/CoreBundle/Factory/OrderFactory.php b/src/Sylius/Bundle/CoreBundle/Factory/OrderFactory.php index 1f94530c6e..71e0ccccb4 100644 --- a/src/Sylius/Bundle/CoreBundle/Factory/OrderFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Factory/OrderFactory.php @@ -17,13 +17,16 @@ use Sylius\Component\Core\Model\AddressInterface; use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Component\Core\Model\CustomerInterface; use Sylius\Component\Core\Model\OrderInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; /** - * @implements OrderFactoryInterface + * @template T of OrderInterface + * + * @implements OrderFactoryInterface */ final class OrderFactory implements OrderFactoryInterface { + /** @param FactoryInterface $decoratedFactory */ public function __construct( private FactoryInterface $decoratedFactory, ) { diff --git a/src/Sylius/Bundle/CoreBundle/Factory/OrderFactoryInterface.php b/src/Sylius/Bundle/CoreBundle/Factory/OrderFactoryInterface.php index 88f9fa7ac6..612bd9c0f8 100644 --- a/src/Sylius/Bundle/CoreBundle/Factory/OrderFactoryInterface.php +++ b/src/Sylius/Bundle/CoreBundle/Factory/OrderFactoryInterface.php @@ -16,8 +16,8 @@ namespace Sylius\Bundle\CoreBundle\Factory; use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Component\Core\Model\CustomerInterface; use Sylius\Component\Core\Model\OrderInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Factory\FactoryInterface; +use Sylius\Resource\Model\ResourceInterface; /** * @template T of ResourceInterface diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/CurrencyFixture.php b/src/Sylius/Bundle/CoreBundle/Fixture/CurrencyFixture.php index 7bb01b8c2c..860e29b2de 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/CurrencyFixture.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/CurrencyFixture.php @@ -16,11 +16,12 @@ namespace Sylius\Bundle\CoreBundle\Fixture; use Doctrine\Persistence\ObjectManager; use Sylius\Bundle\FixturesBundle\Fixture\AbstractFixture; use Sylius\Component\Currency\Model\CurrencyInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; class CurrencyFixture extends AbstractFixture { + /** @param FactoryInterface $currencyFactory */ public function __construct(private FactoryInterface $currencyFactory, private ObjectManager $currencyManager) { } diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/AddressExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/AddressExampleFactory.php index fc89622233..0bd5ab859f 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/AddressExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/AddressExampleFactory.php @@ -21,8 +21,8 @@ use Sylius\Component\Addressing\Model\CountryInterface; use Sylius\Component\Addressing\Model\ProvinceInterface; use Sylius\Component\Core\Model\AddressInterface; use Sylius\Component\Core\Model\CustomerInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\OptionsResolver\Options; use Symfony\Component\OptionsResolver\OptionsResolver; use Webmozart\Assert\Assert; @@ -33,6 +33,11 @@ class AddressExampleFactory extends AbstractExampleFactory private OptionsResolver $optionsResolver; + /** + * @param FactoryInterface $addressFactory + * @param RepositoryInterface $countryRepository + * @param RepositoryInterface $customerRepository + */ public function __construct( private FactoryInterface $addressFactory, private RepositoryInterface $countryRepository, diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/AdminUserExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/AdminUserExampleFactory.php index 98a4671999..5ab1bae697 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/AdminUserExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/AdminUserExampleFactory.php @@ -16,8 +16,9 @@ namespace Sylius\Bundle\CoreBundle\Fixture\Factory; use Faker\Factory; use Faker\Generator; use Sylius\Component\Core\Model\AdminUserInterface; +use Sylius\Component\Core\Model\ImageInterface; use Sylius\Component\Core\Uploader\ImageUploaderInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\Config\FileLocatorInterface; use Symfony\Component\HttpFoundation\File\UploadedFile; use Symfony\Component\OptionsResolver\Options; @@ -29,6 +30,10 @@ class AdminUserExampleFactory extends AbstractExampleFactory implements ExampleF private OptionsResolver $optionsResolver; + /** + * @param FactoryInterface $userFactory + * @param FactoryInterface $avatarImageFactory + */ public function __construct( private FactoryInterface $userFactory, private string $localeCode, diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/CatalogPromotionActionExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/CatalogPromotionActionExampleFactory.php index 63195979a5..09887fb798 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/CatalogPromotionActionExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/CatalogPromotionActionExampleFactory.php @@ -16,7 +16,7 @@ namespace Sylius\Bundle\CoreBundle\Fixture\Factory; use Sylius\Bundle\CoreBundle\CatalogPromotion\Calculator\FixedDiscountPriceCalculator; use Sylius\Bundle\CoreBundle\CatalogPromotion\Calculator\PercentageDiscountPriceCalculator; use Sylius\Component\Promotion\Model\CatalogPromotionActionInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\OptionsResolver\Options; use Symfony\Component\OptionsResolver\OptionsResolver; @@ -24,6 +24,7 @@ final class CatalogPromotionActionExampleFactory extends AbstractExampleFactory { private OptionsResolver $optionsResolver; + /** @param FactoryInterface $catalogPromotionActionFactory */ public function __construct(private FactoryInterface $catalogPromotionActionFactory) { $this->optionsResolver = new OptionsResolver(); diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/CatalogPromotionExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/CatalogPromotionExampleFactory.php index 80ccc89f99..2c15dee6c3 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/CatalogPromotionExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/CatalogPromotionExampleFactory.php @@ -22,8 +22,8 @@ use Sylius\Component\Core\Model\CatalogPromotionInterface; use Sylius\Component\Locale\Model\LocaleInterface; use Sylius\Component\Promotion\Model\CatalogPromotionActionInterface; use Sylius\Component\Promotion\Model\CatalogPromotionScopeInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\OptionsResolver\Options; use Symfony\Component\OptionsResolver\OptionsResolver; @@ -33,6 +33,10 @@ class CatalogPromotionExampleFactory extends AbstractExampleFactory implements E private OptionsResolver $optionsResolver; + /** + * @param FactoryInterface $catalogPromotionFactory + * @param RepositoryInterface $localeRepository + */ public function __construct( private FactoryInterface $catalogPromotionFactory, private RepositoryInterface $localeRepository, diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/CatalogPromotionScopeExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/CatalogPromotionScopeExampleFactory.php index 6eaa7fedbc..01630938ea 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/CatalogPromotionScopeExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/CatalogPromotionScopeExampleFactory.php @@ -15,13 +15,14 @@ namespace Sylius\Bundle\CoreBundle\Fixture\Factory; use Sylius\Bundle\CoreBundle\CatalogPromotion\Checker\InForVariantsScopeVariantChecker; use Sylius\Component\Promotion\Model\CatalogPromotionScopeInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\OptionsResolver\OptionsResolver; final class CatalogPromotionScopeExampleFactory extends AbstractExampleFactory implements ExampleFactoryInterface { private OptionsResolver $optionsResolver; + /** @param FactoryInterface $catalogPromotionScopeFactory */ public function __construct(private FactoryInterface $catalogPromotionScopeFactory) { $this->optionsResolver = new OptionsResolver(); diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ChannelExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ChannelExampleFactory.php index d4a8cf3842..bcd456ad50 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ChannelExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ChannelExampleFactory.php @@ -22,12 +22,13 @@ use Sylius\Component\Channel\Factory\ChannelFactoryInterface; use Sylius\Component\Core\Formatter\StringInflector; use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Component\Core\Model\Scope; +use Sylius\Component\Core\Model\ShopBillingDataInterface; use Sylius\Component\Core\Model\TaxonInterface; use Sylius\Component\Currency\Model\CurrencyInterface; use Sylius\Component\Locale\Model\LocaleInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; use Sylius\Component\Taxonomy\Repository\TaxonRepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\OptionsResolver\Options; use Symfony\Component\OptionsResolver\OptionsResolver; @@ -37,6 +38,12 @@ class ChannelExampleFactory extends AbstractExampleFactory implements ExampleFac private OptionsResolver $optionsResolver; + /** + * @param RepositoryInterface $localeRepository + * @param RepositoryInterface $currencyRepository + * @param RepositoryInterface $zoneRepository + * @param FactoryInterface $shopBillingDataFactory + */ public function __construct( private ChannelFactoryInterface $channelFactory, private RepositoryInterface $localeRepository, diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/CustomerGroupExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/CustomerGroupExampleFactory.php index f96fd650ab..ab0360f128 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/CustomerGroupExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/CustomerGroupExampleFactory.php @@ -17,7 +17,7 @@ use Faker\Factory; use Faker\Generator; use Sylius\Component\Core\Formatter\StringInflector; use Sylius\Component\Customer\Model\CustomerGroupInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\OptionsResolver\Options; use Symfony\Component\OptionsResolver\OptionsResolver; @@ -27,6 +27,7 @@ class CustomerGroupExampleFactory extends AbstractExampleFactory implements Exam private OptionsResolver $optionsResolver; + /** @param FactoryInterface $customerGroupFactory */ public function __construct(private FactoryInterface $customerGroupFactory) { $this->faker = Factory::create(); diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/OrderExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/OrderExampleFactory.php index cc10b9cf81..0f894e04c8 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/OrderExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/OrderExampleFactory.php @@ -36,9 +36,9 @@ use Sylius\Component\Core\Repository\ProductRepositoryInterface; use Sylius\Component\Core\Repository\ShippingMethodRepositoryInterface; use Sylius\Component\Order\Modifier\OrderItemQuantityModifierInterface; use Sylius\Component\Payment\PaymentTransitions; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; use Sylius\Component\Shipping\ShipmentTransitions; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\OptionsResolver\Options; use Symfony\Component\OptionsResolver\OptionsResolver; use Webmozart\Assert\Assert; @@ -51,6 +51,14 @@ class OrderExampleFactory extends AbstractExampleFactory implements ExampleFacto /** @var Generator */ protected $faker; + /** + * @param FactoryInterface $orderFactory + * @param FactoryInterface $orderItemFactory + * @param RepositoryInterface $channelRepository + * @param RepositoryInterface $customerRepository + * @param RepositoryInterface $countryRepository + * @param FactoryInterface $addressFactory + */ public function __construct( protected FactoryInterface $orderFactory, protected FactoryInterface $orderItemFactory, diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/PaymentMethodExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/PaymentMethodExampleFactory.php index 7fe80efef8..74aa7217d0 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/PaymentMethodExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/PaymentMethodExampleFactory.php @@ -21,7 +21,7 @@ use Sylius\Component\Core\Factory\PaymentMethodFactoryInterface; use Sylius\Component\Core\Formatter\StringInflector; use Sylius\Component\Core\Model\PaymentMethodInterface; use Sylius\Component\Locale\Model\LocaleInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\OptionsResolver\Options; use Symfony\Component\OptionsResolver\OptionsResolver; @@ -33,6 +33,7 @@ class PaymentMethodExampleFactory extends AbstractExampleFactory implements Exam private OptionsResolver $optionsResolver; + /** @param RepositoryInterface $localeRepository */ public function __construct( private PaymentMethodFactoryInterface $paymentMethodFactory, private RepositoryInterface $localeRepository, diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductAssociationExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductAssociationExampleFactory.php index 6406cd1ddc..c2b92fe644 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductAssociationExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductAssociationExampleFactory.php @@ -19,13 +19,14 @@ use Sylius\Component\Core\Repository\ProductRepositoryInterface; use Sylius\Component\Product\Model\ProductAssociationInterface; use Sylius\Component\Product\Model\ProductAssociationTypeInterface; use Sylius\Component\Product\Repository\ProductAssociationTypeRepositoryInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\OptionsResolver\OptionsResolver; class ProductAssociationExampleFactory extends AbstractExampleFactory implements ExampleFactoryInterface { private OptionsResolver $optionsResolver; + /** @param FactoryInterface $productAssociationFactory */ public function __construct( private FactoryInterface $productAssociationFactory, private ProductAssociationTypeRepositoryInterface $productAssociationTypeRepository, diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductAssociationTypeExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductAssociationTypeExampleFactory.php index c9d3a3807e..1d3d3ca1d9 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductAssociationTypeExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductAssociationTypeExampleFactory.php @@ -18,8 +18,8 @@ use Faker\Generator; use Sylius\Component\Core\Formatter\StringInflector; use Sylius\Component\Locale\Model\LocaleInterface; use Sylius\Component\Product\Model\ProductAssociationTypeInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\OptionsResolver\Options; use Symfony\Component\OptionsResolver\OptionsResolver; @@ -29,6 +29,10 @@ class ProductAssociationTypeExampleFactory extends AbstractExampleFactory implem private OptionsResolver $optionsResolver; + /** + * @param FactoryInterface $productAssociationTypeFactory + * @param RepositoryInterface $localeRepository + */ public function __construct( private FactoryInterface $productAssociationTypeFactory, private RepositoryInterface $localeRepository, diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductAttributeExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductAttributeExampleFactory.php index 4ff5ff34c7..920d5e6896 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductAttributeExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductAttributeExampleFactory.php @@ -19,7 +19,7 @@ use Sylius\Component\Attribute\Factory\AttributeFactoryInterface; use Sylius\Component\Core\Formatter\StringInflector; use Sylius\Component\Locale\Model\LocaleInterface; use Sylius\Component\Product\Model\ProductAttributeInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\OptionsResolver\Options; use Symfony\Component\OptionsResolver\OptionsResolver; @@ -29,6 +29,10 @@ class ProductAttributeExampleFactory extends AbstractExampleFactory implements E private OptionsResolver $optionsResolver; + /** + * @param RepositoryInterface $localeRepository + * @param array $attributeTypes + */ public function __construct( private AttributeFactoryInterface $productAttributeFactory, private RepositoryInterface $localeRepository, diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductExampleFactory.php index 2e16934cd7..86cb34f6fe 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductExampleFactory.php @@ -21,6 +21,7 @@ use Sylius\Component\Core\Formatter\StringInflector; use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Component\Core\Model\ChannelPricingInterface; use Sylius\Component\Core\Model\ImageInterface; +use Sylius\Component\Core\Model\ProductImageInterface; use Sylius\Component\Core\Model\ProductInterface; use Sylius\Component\Core\Model\ProductTaxonInterface; use Sylius\Component\Core\Model\ProductVariantInterface; @@ -31,10 +32,11 @@ use Sylius\Component\Product\Generator\ProductVariantGeneratorInterface; use Sylius\Component\Product\Generator\SlugGeneratorInterface; use Sylius\Component\Product\Model\ProductAttributeInterface; use Sylius\Component\Product\Model\ProductAttributeValueInterface; +use Sylius\Component\Product\Model\ProductOptionInterface; use Sylius\Component\Product\Model\ProductOptionValueInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; use Sylius\Component\Taxation\Model\TaxCategoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\Config\FileLocatorInterface; use Symfony\Component\HttpFoundation\File\UploadedFile; use Symfony\Component\OptionsResolver\Options; @@ -47,6 +49,20 @@ class ProductExampleFactory extends AbstractExampleFactory implements ExampleFac private OptionsResolver $optionsResolver; + /** + * @param FactoryInterface $productFactory + * @param FactoryInterface $productVariantFactory + * @param FactoryInterface $channelPricingFactory + * @param FactoryInterface $productAttributeValueFactory + * @param FactoryInterface $productImageFactory + * @param FactoryInterface $productTaxonFactory + * @param RepositoryInterface $taxonRepository + * @param RepositoryInterface $productAttributeRepository + * @param RepositoryInterface $productOptionRepository + * @param RepositoryInterface $channelRepository + * @param RepositoryInterface $localeRepository + * @param RepositoryInterface $taxCategoryRepository + */ public function __construct( private FactoryInterface $productFactory, private FactoryInterface $productVariantFactory, diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductOptionExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductOptionExampleFactory.php index 064b0ad7dd..157232cc4c 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductOptionExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductOptionExampleFactory.php @@ -19,8 +19,8 @@ use Sylius\Component\Core\Formatter\StringInflector; use Sylius\Component\Locale\Model\LocaleInterface; use Sylius\Component\Product\Model\ProductOptionInterface; use Sylius\Component\Product\Model\ProductOptionValueInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\OptionsResolver\Options; use Symfony\Component\OptionsResolver\OptionsResolver; @@ -30,6 +30,11 @@ class ProductOptionExampleFactory extends AbstractExampleFactory implements Exam private OptionsResolver $optionsResolver; + /** + * @param FactoryInterface $productOptionFactory + * @param FactoryInterface $productOptionValueFactory + * @param RepositoryInterface $localeRepository + */ public function __construct( private FactoryInterface $productOptionFactory, private FactoryInterface $productOptionValueFactory, diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/PromotionExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/PromotionExampleFactory.php index 1c0ab70b2b..de32b5dc0c 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/PromotionExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/PromotionExampleFactory.php @@ -23,8 +23,8 @@ use Sylius\Component\Core\Model\PromotionInterface; use Sylius\Component\Locale\Model\LocaleInterface; use Sylius\Component\Promotion\Model\PromotionActionInterface; use Sylius\Component\Promotion\Model\PromotionRuleInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\OptionsResolver\Exception\InvalidArgumentException; use Symfony\Component\OptionsResolver\Options; use Symfony\Component\OptionsResolver\OptionsResolver; @@ -35,7 +35,11 @@ class PromotionExampleFactory extends AbstractExampleFactory implements ExampleF private OptionsResolver $optionsResolver; - /** @param RepositoryInterface $localeRepository */ + /** + * @param FactoryInterface $promotionFactory + * @param FactoryInterface $couponFactory + * @param RepositoryInterface $localeRepository + */ public function __construct( private FactoryInterface $promotionFactory, private ExampleFactoryInterface $promotionRuleExampleFactory, @@ -151,6 +155,7 @@ class PromotionExampleFactory extends AbstractExampleFactory implements ExampleF ; } + /** @param FactoryInterface $couponFactory */ private static function getCouponNormalizer(FactoryInterface $couponFactory): \Closure { return function (Options $options, array $couponDefinitions) use ($couponFactory): array { diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ShippingCategoryExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ShippingCategoryExampleFactory.php index a3420c14fd..77bd5be8e1 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ShippingCategoryExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ShippingCategoryExampleFactory.php @@ -16,8 +16,8 @@ namespace Sylius\Bundle\CoreBundle\Fixture\Factory; use Faker\Factory; use Faker\Generator; use Sylius\Component\Core\Formatter\StringInflector; -use Sylius\Component\Resource\Factory\FactoryInterface; use Sylius\Component\Shipping\Model\ShippingCategoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\OptionsResolver\Options; use Symfony\Component\OptionsResolver\OptionsResolver; @@ -27,6 +27,7 @@ class ShippingCategoryExampleFactory extends AbstractExampleFactory implements E private OptionsResolver $optionsResolver; + /** @param FactoryInterface $shippingCategoryFactory */ public function __construct(private FactoryInterface $shippingCategoryFactory) { $this->faker = Factory::create(); diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ShippingMethodExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ShippingMethodExampleFactory.php index ae151788f3..59de5b3cd7 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ShippingMethodExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ShippingMethodExampleFactory.php @@ -22,11 +22,11 @@ use Sylius\Component\Core\Formatter\StringInflector; use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Component\Core\Model\ShippingMethodInterface; use Sylius\Component\Locale\Model\LocaleInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; use Sylius\Component\Shipping\Calculator\DefaultCalculators; use Sylius\Component\Shipping\Model\ShippingCategoryInterface; use Sylius\Component\Taxation\Model\TaxCategoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\OptionsResolver\Options; use Symfony\Component\OptionsResolver\OptionsResolver; @@ -36,6 +36,13 @@ class ShippingMethodExampleFactory extends AbstractExampleFactory implements Exa private OptionsResolver $optionsResolver; + /** + * @param FactoryInterface $shippingMethodFactory + * @param RepositoryInterface $zoneRepository + * @param RepositoryInterface $shippingCategoryRepository + * @param RepositoryInterface $localeRepository + * @param RepositoryInterface $taxCategoryRepository + */ public function __construct( private FactoryInterface $shippingMethodFactory, private RepositoryInterface $zoneRepository, diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ShopUserExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ShopUserExampleFactory.php index 98fa2a283b..1e244ca11b 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ShopUserExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ShopUserExampleFactory.php @@ -20,8 +20,8 @@ use Sylius\Component\Core\Model\CustomerInterface; use Sylius\Component\Core\Model\ShopUserInterface; use Sylius\Component\Customer\Model\CustomerGroupInterface; use Sylius\Component\Customer\Model\CustomerInterface as CustomerComponent; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\OptionsResolver\Options; use Symfony\Component\OptionsResolver\OptionsResolver; @@ -31,6 +31,11 @@ class ShopUserExampleFactory extends AbstractExampleFactory implements ExampleFa private OptionsResolver $optionsResolver; + /** + * @param FactoryInterface $shopUserFactory + * @param FactoryInterface $customerFactory + * @param RepositoryInterface $customerGroupRepository + */ public function __construct( private FactoryInterface $shopUserFactory, private FactoryInterface $customerFactory, diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/TaxCategoryExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/TaxCategoryExampleFactory.php index af675b1758..7a68542b44 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/TaxCategoryExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/TaxCategoryExampleFactory.php @@ -16,8 +16,8 @@ namespace Sylius\Bundle\CoreBundle\Fixture\Factory; use Faker\Factory; use Faker\Generator; use Sylius\Component\Core\Formatter\StringInflector; -use Sylius\Component\Resource\Factory\FactoryInterface; use Sylius\Component\Taxation\Model\TaxCategoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\OptionsResolver\Options; use Symfony\Component\OptionsResolver\OptionsResolver; @@ -27,6 +27,7 @@ class TaxCategoryExampleFactory extends AbstractExampleFactory implements Exampl private OptionsResolver $optionsResolver; + /** @param FactoryInterface $taxCategoryFactory */ public function __construct(private FactoryInterface $taxCategoryFactory) { $this->faker = Factory::create(); diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/TaxRateExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/TaxRateExampleFactory.php index b21584b6ae..e65ba8b7d8 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/TaxRateExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/TaxRateExampleFactory.php @@ -19,9 +19,9 @@ use Sylius\Bundle\CoreBundle\Fixture\OptionsResolver\LazyOption; use Sylius\Component\Addressing\Model\ZoneInterface; use Sylius\Component\Core\Formatter\StringInflector; use Sylius\Component\Core\Model\TaxRateInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; use Sylius\Component\Taxation\Model\TaxCategoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\OptionsResolver\Options; use Symfony\Component\OptionsResolver\OptionsResolver; @@ -31,6 +31,11 @@ class TaxRateExampleFactory extends AbstractExampleFactory implements ExampleFac private OptionsResolver $optionsResolver; + /** + * @param FactoryInterface $taxRateFactory + * @param RepositoryInterface $zoneRepository + * @param RepositoryInterface $taxCategoryRepository + */ public function __construct( private FactoryInterface $taxRateFactory, private RepositoryInterface $zoneRepository, diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/TaxonExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/TaxonExampleFactory.php index 8cff99c0c2..518b40b09f 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/TaxonExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/TaxonExampleFactory.php @@ -18,10 +18,10 @@ use Faker\Generator; use Sylius\Component\Core\Formatter\StringInflector; use Sylius\Component\Core\Model\TaxonInterface; use Sylius\Component\Locale\Model\LocaleInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; use Sylius\Component\Taxonomy\Generator\TaxonSlugGeneratorInterface; use Sylius\Component\Taxonomy\Repository\TaxonRepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\OptionsResolver\Options; use Symfony\Component\OptionsResolver\OptionsResolver; @@ -31,6 +31,10 @@ class TaxonExampleFactory extends AbstractExampleFactory implements ExampleFacto private OptionsResolver $optionsResolver; + /** + * @param FactoryInterface $taxonFactory + * @param RepositoryInterface $localeRepository + */ public function __construct( private FactoryInterface $taxonFactory, private TaxonRepositoryInterface $taxonRepository, diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/GeographicalFixture.php b/src/Sylius/Bundle/CoreBundle/Fixture/GeographicalFixture.php index c66f2f2c32..4550f6f0ae 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/GeographicalFixture.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/GeographicalFixture.php @@ -19,13 +19,18 @@ use Sylius\Component\Addressing\Factory\ZoneFactoryInterface; use Sylius\Component\Addressing\Model\CountryInterface; use Sylius\Component\Addressing\Model\ProvinceInterface; use Sylius\Component\Addressing\Model\ZoneInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Intl\Countries; use Webmozart\Assert\Assert; class GeographicalFixture extends AbstractFixture { + /** + * @param FactoryInterface $countryFactory + * @param FactoryInterface $provinceFactory + * @param ZoneFactoryInterface $zoneFactory + */ public function __construct( private FactoryInterface $countryFactory, private ObjectManager $countryManager, diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/LocaleFixture.php b/src/Sylius/Bundle/CoreBundle/Fixture/LocaleFixture.php index e253159363..054cc21733 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/LocaleFixture.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/LocaleFixture.php @@ -16,16 +16,17 @@ namespace Sylius\Bundle\CoreBundle\Fixture; use Doctrine\Persistence\ObjectManager; use Sylius\Bundle\FixturesBundle\Fixture\AbstractFixture; use Sylius\Component\Locale\Model\LocaleInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; class LocaleFixture extends AbstractFixture { - /** - * @param string $baseLocaleCode - */ - public function __construct(private FactoryInterface $localeFactory, private ObjectManager $localeManager, private $baseLocaleCode) - { + /** @param FactoryInterface $localeFactory */ + public function __construct( + private FactoryInterface $localeFactory, + private ObjectManager $localeManager, + private string $baseLocaleCode, + ) { } public function load(array $options): void diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/OptionsResolver/LazyOption.php b/src/Sylius/Bundle/CoreBundle/Fixture/OptionsResolver/LazyOption.php index d66e6960a5..ab9d34a2b3 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/OptionsResolver/LazyOption.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/OptionsResolver/LazyOption.php @@ -14,7 +14,8 @@ declare(strict_types=1); namespace Sylius\Bundle\CoreBundle\Fixture\OptionsResolver; use Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Model\ResourceInterface; use Symfony\Component\OptionsResolver\Options; use Webmozart\Assert\Assert; @@ -36,6 +37,10 @@ use Webmozart\Assert\Assert; */ final class LazyOption { + /** + * @param RepositoryInterface $repository + * @param array $criteria + */ public static function randomOne(RepositoryInterface $repository, array $criteria = []): \Closure { return function (Options $options) use ($repository, $criteria): object { @@ -51,6 +56,10 @@ final class LazyOption }; } + /** + * @param RepositoryInterface $repository + * @param array $criteria + */ public static function randomOneOrNull( RepositoryInterface $repository, int $chanceOfRandomOne = 100, @@ -70,6 +79,10 @@ final class LazyOption }; } + /** + * @param RepositoryInterface $repository + * @param array $criteria + */ public static function randomOnes(RepositoryInterface $repository, int $amount, array $criteria = []): \Closure { return function (Options $options) use ($repository, $amount, $criteria): iterable { @@ -92,11 +105,16 @@ final class LazyOption }; } + /** @param RepositoryInterface $repository */ public static function all(RepositoryInterface $repository): \Closure { return fn (Options $options): iterable => $repository->findAll(); } + /** + * @param RepositoryInterface $repository + * @param array $criteria + */ public static function findBy(RepositoryInterface $repository, string $field, array $criteria = []): \Closure { return function (Options $options, ?array $previousValues) use ($repository, $field, $criteria): ?iterable { @@ -117,6 +135,10 @@ final class LazyOption }; } + /** + * @param RepositoryInterface $repository + * @param array $criteria + */ public static function findOneBy(RepositoryInterface $repository, string $field, array $criteria = []): \Closure { return @@ -135,6 +157,10 @@ final class LazyOption ; } + /** + * @param RepositoryInterface $repository + * @param array $criteria + */ public static function getOneBy(RepositoryInterface $repository, string $field, array $criteria = []): \Closure { return @@ -166,6 +192,7 @@ final class LazyOption ; } + /** @param array $criteria */ private static function findRandomOne( EntityRepository $repository, array $criteria, @@ -181,6 +208,7 @@ final class LazyOption return $object; } + /** @param array $criteria */ private static function findRandom(EntityRepository $repository, array $criteria, int $limit): array { $queryBuilder = $repository->createQueryBuilder('o'); diff --git a/src/Sylius/Bundle/CoreBundle/Form/DataTransformer/ProductTaxonToTaxonTransformer.php b/src/Sylius/Bundle/CoreBundle/Form/DataTransformer/ProductTaxonToTaxonTransformer.php index c6d2e7d344..71adbf09fb 100644 --- a/src/Sylius/Bundle/CoreBundle/Form/DataTransformer/ProductTaxonToTaxonTransformer.php +++ b/src/Sylius/Bundle/CoreBundle/Form/DataTransformer/ProductTaxonToTaxonTransformer.php @@ -16,13 +16,17 @@ namespace Sylius\Bundle\CoreBundle\Form\DataTransformer; use Sylius\Component\Core\Model\ProductInterface; use Sylius\Component\Core\Model\ProductTaxonInterface; use Sylius\Component\Core\Model\TaxonInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\Form\DataTransformerInterface; use Symfony\Component\Form\Exception\TransformationFailedException; final class ProductTaxonToTaxonTransformer implements DataTransformerInterface { + /** + * @param FactoryInterface $productTaxonFactory + * @param RepositoryInterface $productTaxonRepository + */ public function __construct( private FactoryInterface $productTaxonFactory, private RepositoryInterface $productTaxonRepository, diff --git a/src/Sylius/Bundle/CoreBundle/Form/EventSubscriber/AddBaseCurrencySubscriber.php b/src/Sylius/Bundle/CoreBundle/Form/EventSubscriber/AddBaseCurrencySubscriber.php index 0df4ed2620..5bb0a4b034 100644 --- a/src/Sylius/Bundle/CoreBundle/Form/EventSubscriber/AddBaseCurrencySubscriber.php +++ b/src/Sylius/Bundle/CoreBundle/Form/EventSubscriber/AddBaseCurrencySubscriber.php @@ -15,7 +15,7 @@ namespace Sylius\Bundle\CoreBundle\Form\EventSubscriber; use Sylius\Bundle\CurrencyBundle\Form\Type\CurrencyChoiceType; use Sylius\Component\Core\Model\ChannelInterface; -use Sylius\Component\Resource\Exception\UnexpectedTypeException; +use Sylius\Resource\Exception\UnexpectedTypeException; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\Form\FormEvent; use Symfony\Component\Form\FormEvents; diff --git a/src/Sylius/Bundle/CoreBundle/Form/EventSubscriber/CustomerRegistrationFormSubscriber.php b/src/Sylius/Bundle/CoreBundle/Form/EventSubscriber/CustomerRegistrationFormSubscriber.php index 0d7dea0826..b398a351a4 100644 --- a/src/Sylius/Bundle/CoreBundle/Form/EventSubscriber/CustomerRegistrationFormSubscriber.php +++ b/src/Sylius/Bundle/CoreBundle/Form/EventSubscriber/CustomerRegistrationFormSubscriber.php @@ -14,13 +14,14 @@ declare(strict_types=1); namespace Sylius\Bundle\CoreBundle\Form\EventSubscriber; use Sylius\Component\Core\Model\CustomerInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\Form\FormEvent; use Symfony\Component\Form\FormEvents; final class CustomerRegistrationFormSubscriber implements EventSubscriberInterface { + /** @param RepositoryInterface $customerRepository */ public function __construct(private RepositoryInterface $customerRepository) { } diff --git a/src/Sylius/Bundle/CoreBundle/Form/Type/Customer/CustomerCheckoutGuestType.php b/src/Sylius/Bundle/CoreBundle/Form/Type/Customer/CustomerCheckoutGuestType.php index fb674bf7ab..946170614e 100644 --- a/src/Sylius/Bundle/CoreBundle/Form/Type/Customer/CustomerCheckoutGuestType.php +++ b/src/Sylius/Bundle/CoreBundle/Form/Type/Customer/CustomerCheckoutGuestType.php @@ -15,9 +15,9 @@ namespace Sylius\Bundle\CoreBundle\Form\Type\Customer; use Sylius\Bundle\ResourceBundle\Form\Type\AbstractResourceType; use Sylius\Component\Core\Model\CustomerInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; use Sylius\Component\User\Canonicalizer\CanonicalizerInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\Form\Extension\Core\Type\EmailType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormEvent; @@ -25,6 +25,10 @@ use Symfony\Component\Form\FormEvents; final class CustomerCheckoutGuestType extends AbstractResourceType { + /** + * @param RepositoryInterface $customerRepository + * @param FactoryInterface $customerFactory + */ public function __construct( string $dataClass, array $validationGroups, diff --git a/src/Sylius/Bundle/CoreBundle/Form/Type/Customer/CustomerGuestType.php b/src/Sylius/Bundle/CoreBundle/Form/Type/Customer/CustomerGuestType.php index 5e90ffe712..1132fb10db 100644 --- a/src/Sylius/Bundle/CoreBundle/Form/Type/Customer/CustomerGuestType.php +++ b/src/Sylius/Bundle/CoreBundle/Form/Type/Customer/CustomerGuestType.php @@ -15,9 +15,9 @@ namespace Sylius\Bundle\CoreBundle\Form\Type\Customer; use Sylius\Bundle\ResourceBundle\Form\Type\AbstractResourceType; use Sylius\Component\Core\Model\CustomerInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; use Sylius\Component\User\Canonicalizer\CanonicalizerInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\Form\Extension\Core\Type\EmailType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormEvent; @@ -25,6 +25,10 @@ use Symfony\Component\Form\FormEvents; final class CustomerGuestType extends AbstractResourceType { + /** + * @param RepositoryInterface $customerRepository + * @param FactoryInterface $customerFactory + */ public function __construct( string $dataClass, array $validationGroups, diff --git a/src/Sylius/Bundle/CoreBundle/Form/Type/Customer/CustomerSimpleRegistrationType.php b/src/Sylius/Bundle/CoreBundle/Form/Type/Customer/CustomerSimpleRegistrationType.php index f018804178..f02629dd90 100644 --- a/src/Sylius/Bundle/CoreBundle/Form/Type/Customer/CustomerSimpleRegistrationType.php +++ b/src/Sylius/Bundle/CoreBundle/Form/Type/Customer/CustomerSimpleRegistrationType.php @@ -16,7 +16,8 @@ namespace Sylius\Bundle\CoreBundle\Form\Type\Customer; use Sylius\Bundle\CoreBundle\Form\EventSubscriber\CustomerRegistrationFormSubscriber; use Sylius\Bundle\CoreBundle\Form\Type\User\ShopUserRegistrationType; use Sylius\Bundle\ResourceBundle\Form\Type\AbstractResourceType; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Component\Core\Model\CustomerInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Form\Extension\Core\Type\EmailType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; @@ -24,8 +25,12 @@ use Symfony\Component\Validator\Constraints\Valid; final class CustomerSimpleRegistrationType extends AbstractResourceType { - public function __construct(string $dataClass, array $validationGroups, private RepositoryInterface $customerRepository) - { + /** @param RepositoryInterface $customerRepository */ + public function __construct( + string $dataClass, + array $validationGroups, + private RepositoryInterface $customerRepository, + ) { parent::__construct($dataClass, $validationGroups); } diff --git a/src/Sylius/Bundle/CoreBundle/Form/Type/Product/ChannelPricingType.php b/src/Sylius/Bundle/CoreBundle/Form/Type/Product/ChannelPricingType.php index f7bbca0999..cb005c49d9 100644 --- a/src/Sylius/Bundle/CoreBundle/Form/Type/Product/ChannelPricingType.php +++ b/src/Sylius/Bundle/CoreBundle/Form/Type/Product/ChannelPricingType.php @@ -18,6 +18,7 @@ use Sylius\Bundle\ResourceBundle\Form\Type\AbstractResourceType; use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Component\Core\Model\ChannelPricingInterface; use Sylius\Component\Core\Model\ProductVariantInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormEvent; use Symfony\Component\Form\FormEvents; @@ -26,10 +27,11 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class ChannelPricingType extends AbstractResourceType { + /** @param RepositoryInterface|null $channelPricingRepository */ public function __construct( string $dataClass, array $validationGroups, - private ?\Sylius\Component\Resource\Repository\RepositoryInterface $channelPricingRepository = null, + private ?RepositoryInterface $channelPricingRepository = null, ) { parent::__construct($dataClass, $validationGroups); } diff --git a/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Rule/ContainsProductConfigurationType.php b/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Rule/ContainsProductConfigurationType.php index 3fb7c956f0..b8975a42a4 100644 --- a/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Rule/ContainsProductConfigurationType.php +++ b/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Rule/ContainsProductConfigurationType.php @@ -15,13 +15,15 @@ namespace Sylius\Bundle\CoreBundle\Form\Type\Promotion\Rule; use Sylius\Bundle\ProductBundle\Form\Type\ProductAutocompleteChoiceType; use Sylius\Bundle\ResourceBundle\Form\DataTransformer\ResourceToIdentifierTransformer; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Component\Core\Model\ProductInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\ReversedTransformer; final class ContainsProductConfigurationType extends AbstractType { + /** @param RepositoryInterface $productRepository */ public function __construct(private RepositoryInterface $productRepository) { } diff --git a/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Rule/TotalOfItemsFromTaxonConfigurationType.php b/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Rule/TotalOfItemsFromTaxonConfigurationType.php index c2ab4c25e9..acedd0d083 100644 --- a/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Rule/TotalOfItemsFromTaxonConfigurationType.php +++ b/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Rule/TotalOfItemsFromTaxonConfigurationType.php @@ -16,7 +16,8 @@ namespace Sylius\Bundle\CoreBundle\Form\Type\Promotion\Rule; use Sylius\Bundle\MoneyBundle\Form\Type\MoneyType; use Sylius\Bundle\ResourceBundle\Form\DataTransformer\ResourceToIdentifierTransformer; use Sylius\Bundle\TaxonomyBundle\Form\Type\TaxonAutocompleteChoiceType; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Component\Core\Model\TaxonInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\ReversedTransformer; @@ -24,6 +25,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class TotalOfItemsFromTaxonConfigurationType extends AbstractType { + /** @param RepositoryInterface $taxonRepository */ public function __construct(private RepositoryInterface $taxonRepository) { } diff --git a/src/Sylius/Bundle/CoreBundle/Form/Type/Taxon/ProductTaxonAutocompleteChoiceType.php b/src/Sylius/Bundle/CoreBundle/Form/Type/Taxon/ProductTaxonAutocompleteChoiceType.php index 594c3868cf..1cc14709f6 100644 --- a/src/Sylius/Bundle/CoreBundle/Form/Type/Taxon/ProductTaxonAutocompleteChoiceType.php +++ b/src/Sylius/Bundle/CoreBundle/Form/Type/Taxon/ProductTaxonAutocompleteChoiceType.php @@ -17,16 +17,23 @@ use Sylius\Bundle\CoreBundle\Form\DataTransformer\ProductTaxonToTaxonTransformer use Sylius\Bundle\ResourceBundle\Form\DataTransformer\RecursiveTransformer; use Sylius\Bundle\ResourceBundle\Form\Type\ResourceAutocompleteChoiceType; use Sylius\Component\Core\Model\ProductInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Component\Core\Model\ProductTaxonInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; final class ProductTaxonAutocompleteChoiceType extends AbstractType { - public function __construct(private FactoryInterface $productTaxonFactory, private RepositoryInterface $productTaxonRepository) - { + /** + * @param FactoryInterface $productTaxonFactory + * @param RepositoryInterface $productTaxonRepository + */ + public function __construct( + private FactoryInterface $productTaxonFactory, + private RepositoryInterface $productTaxonRepository, + ) { } public function buildForm(FormBuilderInterface $builder, array $options): void diff --git a/src/Sylius/Bundle/CoreBundle/Installer/Setup/ChannelSetup.php b/src/Sylius/Bundle/CoreBundle/Installer/Setup/ChannelSetup.php index 71daa9057c..7d3801134d 100644 --- a/src/Sylius/Bundle/CoreBundle/Installer/Setup/ChannelSetup.php +++ b/src/Sylius/Bundle/CoreBundle/Installer/Setup/ChannelSetup.php @@ -17,11 +17,15 @@ use Doctrine\Persistence\ObjectManager; use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Component\Currency\Model\CurrencyInterface; use Sylius\Component\Locale\Model\LocaleInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class ChannelSetup implements ChannelSetupInterface { + /** + * @param RepositoryInterface $channelRepository + * @param FactoryInterface $channelFactory + */ public function __construct( private RepositoryInterface $channelRepository, private FactoryInterface $channelFactory, diff --git a/src/Sylius/Bundle/CoreBundle/Installer/Setup/CurrencySetup.php b/src/Sylius/Bundle/CoreBundle/Installer/Setup/CurrencySetup.php index 5001f93ae9..3436ff9d16 100644 --- a/src/Sylius/Bundle/CoreBundle/Installer/Setup/CurrencySetup.php +++ b/src/Sylius/Bundle/CoreBundle/Installer/Setup/CurrencySetup.php @@ -14,8 +14,8 @@ declare(strict_types=1); namespace Sylius\Bundle\CoreBundle\Installer\Setup; use Sylius\Component\Currency\Model\CurrencyInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\Console\Helper\QuestionHelper; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -27,6 +27,10 @@ final class CurrencySetup implements CurrencySetupInterface { private string $currency; + /** + * @param RepositoryInterface $currencyRepository + * @param FactoryInterface $currencyFactory + */ public function __construct( private RepositoryInterface $currencyRepository, private FactoryInterface $currencyFactory, diff --git a/src/Sylius/Bundle/CoreBundle/Installer/Setup/LocaleSetup.php b/src/Sylius/Bundle/CoreBundle/Installer/Setup/LocaleSetup.php index c90dc9c96e..c74863acee 100644 --- a/src/Sylius/Bundle/CoreBundle/Installer/Setup/LocaleSetup.php +++ b/src/Sylius/Bundle/CoreBundle/Installer/Setup/LocaleSetup.php @@ -14,8 +14,8 @@ declare(strict_types=1); namespace Sylius\Bundle\CoreBundle\Installer\Setup; use Sylius\Component\Locale\Model\LocaleInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\Console\Helper\QuestionHelper; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -27,6 +27,10 @@ use Symfony\Component\Yaml\Yaml; final class LocaleSetup implements LocaleSetupInterface { + /** + * @param RepositoryInterface $localeRepository + * @param FactoryInterface $localeFactory + */ public function __construct( private RepositoryInterface $localeRepository, private FactoryInterface $localeFactory, diff --git a/src/Sylius/Bundle/CoreBundle/OAuth/UserProvider.php b/src/Sylius/Bundle/CoreBundle/OAuth/UserProvider.php index ccba4cf5a0..7516b9359f 100644 --- a/src/Sylius/Bundle/CoreBundle/OAuth/UserProvider.php +++ b/src/Sylius/Bundle/CoreBundle/OAuth/UserProvider.php @@ -21,11 +21,11 @@ use Sylius\Bundle\UserBundle\Provider\UsernameOrEmailProvider as BaseUserProvide use Sylius\Component\Core\Model\CustomerInterface; use Sylius\Component\Core\Model\ShopUserInterface as SyliusUserInterface; use Sylius\Component\Core\Repository\CustomerRepositoryInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; use Sylius\Component\User\Canonicalizer\CanonicalizerInterface; use Sylius\Component\User\Model\UserOAuthInterface; use Sylius\Component\User\Repository\UserRepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use SyliusLabs\Polyfill\Symfony\Security\Core\Exception\UserNotFoundException; use Symfony\Component\Security\Core\User\UserInterface as SymfonyUserInterface; use Webmozart\Assert\Assert; @@ -35,6 +35,12 @@ use Webmozart\Assert\Assert; */ class UserProvider extends BaseUserProvider implements AccountConnectorInterface, OAuthAwareUserProviderInterface { + /** + * @param FactoryInterface $customerFactory + * @param FactoryInterface $userFactory + * @param FactoryInterface $oauthFactory + * @param RepositoryInterface $oauthRepository + */ public function __construct( string $supportedUserClass, private FactoryInterface $customerFactory, diff --git a/src/Sylius/Bundle/CoreBundle/Order/NumberGenerator/SequentialOrderNumberGenerator.php b/src/Sylius/Bundle/CoreBundle/Order/NumberGenerator/SequentialOrderNumberGenerator.php index fd9019cf99..0c82dace46 100644 --- a/src/Sylius/Bundle/CoreBundle/Order/NumberGenerator/SequentialOrderNumberGenerator.php +++ b/src/Sylius/Bundle/CoreBundle/Order/NumberGenerator/SequentialOrderNumberGenerator.php @@ -18,11 +18,15 @@ use Doctrine\ORM\EntityManagerInterface; use Sylius\Bundle\OrderBundle\NumberGenerator\OrderNumberGeneratorInterface; use Sylius\Component\Core\Model\OrderSequenceInterface; use Sylius\Component\Order\Model\OrderInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class SequentialOrderNumberGenerator implements OrderNumberGeneratorInterface { + /** + * @param RepositoryInterface $sequenceRepository + * @param FactoryInterface $sequenceFactory + */ public function __construct( private RepositoryInterface $sequenceRepository, private FactoryInterface $sequenceFactory, diff --git a/src/Sylius/Bundle/CoreBundle/PriceHistory/CommandDispatcher/BatchedApplyLowestPriceOnChannelPricingsCommandDispatcher.php b/src/Sylius/Bundle/CoreBundle/PriceHistory/CommandDispatcher/BatchedApplyLowestPriceOnChannelPricingsCommandDispatcher.php index 70bca3d7ef..027bad61fb 100644 --- a/src/Sylius/Bundle/CoreBundle/PriceHistory/CommandDispatcher/BatchedApplyLowestPriceOnChannelPricingsCommandDispatcher.php +++ b/src/Sylius/Bundle/CoreBundle/PriceHistory/CommandDispatcher/BatchedApplyLowestPriceOnChannelPricingsCommandDispatcher.php @@ -17,11 +17,12 @@ use Doctrine\Common\Collections\ArrayCollection; use Sylius\Bundle\CoreBundle\PriceHistory\Command\ApplyLowestPriceOnChannelPricings; use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Component\Core\Model\ChannelPricingInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Messenger\MessageBusInterface; final class BatchedApplyLowestPriceOnChannelPricingsCommandDispatcher implements ApplyLowestPriceOnChannelPricingsCommandDispatcherInterface { + /** @param RepositoryInterface $channelPricingRepository */ public function __construct( private RepositoryInterface $channelPricingRepository, private MessageBusInterface $commandBus, diff --git a/src/Sylius/Bundle/CoreBundle/PriceHistory/CommandHandler/ApplyLowestPriceOnChannelPricingsHandler.php b/src/Sylius/Bundle/CoreBundle/PriceHistory/CommandHandler/ApplyLowestPriceOnChannelPricingsHandler.php index 59be192bbe..a9c33bf9fc 100644 --- a/src/Sylius/Bundle/CoreBundle/PriceHistory/CommandHandler/ApplyLowestPriceOnChannelPricingsHandler.php +++ b/src/Sylius/Bundle/CoreBundle/PriceHistory/CommandHandler/ApplyLowestPriceOnChannelPricingsHandler.php @@ -16,10 +16,11 @@ namespace Sylius\Bundle\CoreBundle\PriceHistory\CommandHandler; use Sylius\Bundle\CoreBundle\PriceHistory\Command\ApplyLowestPriceOnChannelPricings; use Sylius\Bundle\CoreBundle\PriceHistory\Processor\ProductLowestPriceBeforeDiscountProcessorInterface; use Sylius\Component\Core\Model\ChannelPricingInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class ApplyLowestPriceOnChannelPricingsHandler { + /** @param RepositoryInterface $channelPricingRepository */ public function __construct( private ProductLowestPriceBeforeDiscountProcessorInterface $productLowestPriceBeforeDiscountProcessor, private RepositoryInterface $channelPricingRepository, diff --git a/src/Sylius/Bundle/CoreBundle/Resolver/CustomerResolver.php b/src/Sylius/Bundle/CoreBundle/Resolver/CustomerResolver.php index 0a9446baa3..d454074031 100644 --- a/src/Sylius/Bundle/CoreBundle/Resolver/CustomerResolver.php +++ b/src/Sylius/Bundle/CoreBundle/Resolver/CustomerResolver.php @@ -16,10 +16,11 @@ namespace Sylius\Bundle\CoreBundle\Resolver; use Sylius\Bundle\CoreBundle\Provider\CustomerProviderInterface; use Sylius\Component\Core\Exception\CustomerNotFoundException; use Sylius\Component\Core\Model\CustomerInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class CustomerResolver implements CustomerResolverInterface { + /** @param FactoryInterface $customerFactory */ public function __construct( private FactoryInterface $customerFactory, private CustomerProviderInterface $customerProvider, diff --git a/src/Sylius/Bundle/CoreBundle/Resource/StateMachine/Controller/CompositeStateMachine.php b/src/Sylius/Bundle/CoreBundle/Resource/StateMachine/Controller/CompositeStateMachine.php index aaccad90b7..8687ffa9cd 100644 --- a/src/Sylius/Bundle/CoreBundle/Resource/StateMachine/Controller/CompositeStateMachine.php +++ b/src/Sylius/Bundle/CoreBundle/Resource/StateMachine/Controller/CompositeStateMachine.php @@ -16,7 +16,7 @@ namespace Sylius\Bundle\CoreBundle\Resource\StateMachine\Controller; use Sylius\Abstraction\StateMachine\StateMachineInterface; use Sylius\Bundle\ResourceBundle\Controller\RequestConfiguration; use Sylius\Bundle\ResourceBundle\Controller\StateMachineInterface as ResourceStateMachineInterface; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ResourceInterface; use Webmozart\Assert\Assert; final class CompositeStateMachine implements ResourceStateMachineInterface diff --git a/src/Sylius/Bundle/CoreBundle/Resources/config/validation/AbstractTranslation.xml b/src/Sylius/Bundle/CoreBundle/Resources/config/validation/AbstractTranslation.xml deleted file mode 100644 index 4ab4fe7297..0000000000 --- a/src/Sylius/Bundle/CoreBundle/Resources/config/validation/AbstractTranslation.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Sylius/Bundle/CoreBundle/Resources/config/validation/TranslatableInterface.xml b/src/Sylius/Bundle/CoreBundle/Resources/config/validation/TranslatableInterface.xml index 95814d8a9e..1f393a166f 100644 --- a/src/Sylius/Bundle/CoreBundle/Resources/config/validation/TranslatableInterface.xml +++ b/src/Sylius/Bundle/CoreBundle/Resources/config/validation/TranslatableInterface.xml @@ -12,12 +12,6 @@ --> - - - - - - diff --git a/src/Sylius/Bundle/CoreBundle/SyliusCoreBundle.php b/src/Sylius/Bundle/CoreBundle/SyliusCoreBundle.php index 1c54db3a02..d177d38b01 100644 --- a/src/Sylius/Bundle/CoreBundle/SyliusCoreBundle.php +++ b/src/Sylius/Bundle/CoreBundle/SyliusCoreBundle.php @@ -36,7 +36,7 @@ use Sylius\Bundle\CoreBundle\DependencyInjection\Compiler\TranslatableEntityLoca use Sylius\Bundle\CoreBundle\Doctrine\ORM\SqlWalker\OrderByIdentifierSqlWalker; use Sylius\Bundle\ResourceBundle\AbstractResourceBundle; use Sylius\Bundle\ResourceBundle\SyliusResourceBundle; -use Sylius\Component\Resource\Metadata\Metadata; +use Sylius\Resource\Metadata\Metadata; use Symfony\Component\DependencyInjection\ContainerBuilder; final class SyliusCoreBundle extends AbstractResourceBundle diff --git a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/CurrencyFixtureTest.php b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/CurrencyFixtureTest.php index 0445e9db93..562397c14c 100644 --- a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/CurrencyFixtureTest.php +++ b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/CurrencyFixtureTest.php @@ -17,7 +17,7 @@ use Doctrine\Persistence\ObjectManager; use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait; use PHPUnit\Framework\TestCase; use Sylius\Bundle\CoreBundle\Fixture\CurrencyFixture; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class CurrencyFixtureTest extends TestCase { diff --git a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/GeographicalFixtureTest.php b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/GeographicalFixtureTest.php index c5043e9291..4c2b9d5df1 100644 --- a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/GeographicalFixtureTest.php +++ b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/GeographicalFixtureTest.php @@ -18,7 +18,7 @@ use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait; use PHPUnit\Framework\TestCase; use Sylius\Bundle\CoreBundle\Fixture\GeographicalFixture; use Sylius\Component\Addressing\Factory\ZoneFactoryInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\Intl\Countries; final class GeographicalFixtureTest extends TestCase diff --git a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/LocaleFixtureTest.php b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/LocaleFixtureTest.php index f98ca2adc7..40a72b08f4 100644 --- a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/LocaleFixtureTest.php +++ b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/LocaleFixtureTest.php @@ -17,7 +17,7 @@ use Doctrine\Persistence\ObjectManager; use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait; use PHPUnit\Framework\TestCase; use Sylius\Bundle\CoreBundle\Fixture\LocaleFixture; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class LocaleFixtureTest extends TestCase { diff --git a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/OptionsResolver/LazyOptionTest.php b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/OptionsResolver/LazyOptionTest.php index f06039d117..91fd708a2c 100644 --- a/src/Sylius/Bundle/CoreBundle/Tests/Fixture/OptionsResolver/LazyOptionTest.php +++ b/src/Sylius/Bundle/CoreBundle/Tests/Fixture/OptionsResolver/LazyOptionTest.php @@ -19,8 +19,8 @@ use Prophecy\PhpUnit\ProphecyTrait; use Prophecy\Prophecy\ObjectProphecy; use Sylius\Bundle\CoreBundle\Fixture\OptionsResolver\LazyOption; use Sylius\Bundle\CoreBundle\Fixture\OptionsResolver\ResourceNotFoundException; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Model\ResourceInterface; use Symfony\Component\OptionsResolver\Options; final class LazyOptionTest extends TestCase diff --git a/src/Sylius/Bundle/CoreBundle/Tests/Form/Type/Taxon/ProductTaxonAutocompleteChoiceTypeTest.php b/src/Sylius/Bundle/CoreBundle/Tests/Form/Type/Taxon/ProductTaxonAutocompleteChoiceTypeTest.php index 701bdbbfa7..876a53d33b 100644 --- a/src/Sylius/Bundle/CoreBundle/Tests/Form/Type/Taxon/ProductTaxonAutocompleteChoiceTypeTest.php +++ b/src/Sylius/Bundle/CoreBundle/Tests/Form/Type/Taxon/ProductTaxonAutocompleteChoiceTypeTest.php @@ -22,9 +22,9 @@ use Sylius\Component\Core\Model\ProductInterface; use Sylius\Component\Core\Model\ProductTaxonInterface; use Sylius\Component\Core\Model\TaxonInterface; use Sylius\Component\Registry\ServiceRegistryInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; use Sylius\Component\Taxonomy\Repository\TaxonRepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\Form\PreloadedExtension; use Symfony\Component\Form\Test\TypeTestCase; diff --git a/src/Sylius/Bundle/CoreBundle/Tests/Functional/StateMachine/OrderCheckoutWorkflowTest.php b/src/Sylius/Bundle/CoreBundle/Tests/Functional/StateMachine/OrderCheckoutWorkflowTest.php index 02690bad61..85328576d0 100644 --- a/src/Sylius/Bundle/CoreBundle/Tests/Functional/StateMachine/OrderCheckoutWorkflowTest.php +++ b/src/Sylius/Bundle/CoreBundle/Tests/Functional/StateMachine/OrderCheckoutWorkflowTest.php @@ -22,7 +22,7 @@ use Sylius\Component\Core\Model\Customer; use Sylius\Component\Core\Model\Order; use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Core\Repository\PromotionRepositoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; final class OrderCheckoutWorkflowTest extends KernelTestCase diff --git a/src/Sylius/Bundle/CoreBundle/Tests/Functional/StateMachine/OrderWorkflowTest.php b/src/Sylius/Bundle/CoreBundle/Tests/Functional/StateMachine/OrderWorkflowTest.php index 9e4d968a37..9234b13a96 100644 --- a/src/Sylius/Bundle/CoreBundle/Tests/Functional/StateMachine/OrderWorkflowTest.php +++ b/src/Sylius/Bundle/CoreBundle/Tests/Functional/StateMachine/OrderWorkflowTest.php @@ -19,7 +19,7 @@ use Sylius\Component\Core\Model\Customer; use Sylius\Component\Core\Model\Order; use Sylius\Component\Order\Model\OrderInterface; use Sylius\Component\Order\OrderTransitions; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; final class OrderWorkflowTest extends KernelTestCase diff --git a/src/Sylius/Bundle/CoreBundle/Tests/Installation/Setup/LocaleSetupTest.php b/src/Sylius/Bundle/CoreBundle/Tests/Installation/Setup/LocaleSetupTest.php index 5efff7e5f7..47adacead0 100644 --- a/src/Sylius/Bundle/CoreBundle/Tests/Installation/Setup/LocaleSetupTest.php +++ b/src/Sylius/Bundle/CoreBundle/Tests/Installation/Setup/LocaleSetupTest.php @@ -17,8 +17,8 @@ use Prophecy\Argument; use Prophecy\PhpUnit\ProphecyTrait; use Sylius\Bundle\CoreBundle\Installer\Setup\LocaleSetup; use Sylius\Component\Locale\Model\LocaleInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; use Symfony\Component\Console\Helper\QuestionHelper; use Symfony\Component\Console\Input\InputInterface; diff --git a/src/Sylius/Bundle/CoreBundle/Validator/Constraints/CountryCodeExistsValidator.php b/src/Sylius/Bundle/CoreBundle/Validator/Constraints/CountryCodeExistsValidator.php index 971b823ede..3741d142b8 100644 --- a/src/Sylius/Bundle/CoreBundle/Validator/Constraints/CountryCodeExistsValidator.php +++ b/src/Sylius/Bundle/CoreBundle/Validator/Constraints/CountryCodeExistsValidator.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Bundle\CoreBundle\Validator\Constraints; use Sylius\Component\Addressing\Model\CountryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; use Symfony\Component\Validator\Exception\UnexpectedTypeException; diff --git a/src/Sylius/Bundle/CoreBundle/Validator/Constraints/LocalesAwareValidAttributeValueValidator.php b/src/Sylius/Bundle/CoreBundle/Validator/Constraints/LocalesAwareValidAttributeValueValidator.php index 9fcc32ce24..f825973050 100644 --- a/src/Sylius/Bundle/CoreBundle/Validator/Constraints/LocalesAwareValidAttributeValueValidator.php +++ b/src/Sylius/Bundle/CoreBundle/Validator/Constraints/LocalesAwareValidAttributeValueValidator.php @@ -16,7 +16,7 @@ namespace Sylius\Bundle\CoreBundle\Validator\Constraints; use Sylius\Component\Attribute\AttributeType\AttributeTypeInterface; use Sylius\Component\Attribute\Model\AttributeValueInterface; use Sylius\Component\Registry\ServiceRegistryInterface; -use Sylius\Component\Resource\Translation\Provider\TranslationLocaleProviderInterface; +use Sylius\Resource\Translation\Provider\TranslationLocaleProviderInterface; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; use Webmozart\Assert\Assert; diff --git a/src/Sylius/Bundle/CoreBundle/Validator/Constraints/ProvinceCodeExistsValidator.php b/src/Sylius/Bundle/CoreBundle/Validator/Constraints/ProvinceCodeExistsValidator.php index b0e890a0fc..ff2f3de8db 100644 --- a/src/Sylius/Bundle/CoreBundle/Validator/Constraints/ProvinceCodeExistsValidator.php +++ b/src/Sylius/Bundle/CoreBundle/Validator/Constraints/ProvinceCodeExistsValidator.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Bundle\CoreBundle\Validator\Constraints; use Sylius\Component\Addressing\Model\ProvinceInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; use Symfony\Component\Validator\Exception\UnexpectedTypeException; diff --git a/src/Sylius/Bundle/CoreBundle/Validator/Constraints/RegisteredUserValidator.php b/src/Sylius/Bundle/CoreBundle/Validator/Constraints/RegisteredUserValidator.php index df4932db6e..54e0444de4 100644 --- a/src/Sylius/Bundle/CoreBundle/Validator/Constraints/RegisteredUserValidator.php +++ b/src/Sylius/Bundle/CoreBundle/Validator/Constraints/RegisteredUserValidator.php @@ -14,13 +14,14 @@ declare(strict_types=1); namespace Sylius\Bundle\CoreBundle\Validator\Constraints; use Sylius\Component\Core\Model\CustomerInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; use Webmozart\Assert\Assert; final class RegisteredUserValidator extends ConstraintValidator { + /** @param RepositoryInterface $customerRepository */ public function __construct(private RepositoryInterface $customerRepository) { } diff --git a/src/Sylius/Bundle/CoreBundle/Validator/Constraints/ResendOrderConfirmationEmailWithValidOrderStateValidator.php b/src/Sylius/Bundle/CoreBundle/Validator/Constraints/ResendOrderConfirmationEmailWithValidOrderStateValidator.php index 2202db2f98..63bb5f02a7 100644 --- a/src/Sylius/Bundle/CoreBundle/Validator/Constraints/ResendOrderConfirmationEmailWithValidOrderStateValidator.php +++ b/src/Sylius/Bundle/CoreBundle/Validator/Constraints/ResendOrderConfirmationEmailWithValidOrderStateValidator.php @@ -15,7 +15,7 @@ namespace Sylius\Bundle\CoreBundle\Validator\Constraints; use Sylius\Bundle\CoreBundle\Command\ResendOrderConfirmationEmail; use Sylius\Component\Core\Model\OrderInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; use Symfony\Component\Validator\Exception\UnexpectedTypeException; diff --git a/src/Sylius/Bundle/CoreBundle/Validator/Constraints/ResendShipmentConfirmationEmailWithValidShipmentStateValidator.php b/src/Sylius/Bundle/CoreBundle/Validator/Constraints/ResendShipmentConfirmationEmailWithValidShipmentStateValidator.php index ba53fd42c4..8917d8aa51 100644 --- a/src/Sylius/Bundle/CoreBundle/Validator/Constraints/ResendShipmentConfirmationEmailWithValidShipmentStateValidator.php +++ b/src/Sylius/Bundle/CoreBundle/Validator/Constraints/ResendShipmentConfirmationEmailWithValidShipmentStateValidator.php @@ -15,16 +15,14 @@ namespace Sylius\Bundle\CoreBundle\Validator\Constraints; use Sylius\Bundle\CoreBundle\Command\ResendShipmentConfirmationEmail; use Sylius\Component\Core\Model\ShipmentInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; use Symfony\Component\Validator\Exception\UnexpectedTypeException; final class ResendShipmentConfirmationEmailWithValidShipmentStateValidator extends ConstraintValidator { - /** - * @param RepositoryInterface $shipmentRepository - */ + /** @param RepositoryInterface $shipmentRepository */ public function __construct(private RepositoryInterface $shipmentRepository) { } diff --git a/src/Sylius/Bundle/CoreBundle/Validator/Constraints/TranslationForExistingLocalesValidator.php b/src/Sylius/Bundle/CoreBundle/Validator/Constraints/TranslationForExistingLocalesValidator.php index 62e22356fe..eec9a3f472 100644 --- a/src/Sylius/Bundle/CoreBundle/Validator/Constraints/TranslationForExistingLocalesValidator.php +++ b/src/Sylius/Bundle/CoreBundle/Validator/Constraints/TranslationForExistingLocalesValidator.php @@ -14,15 +14,16 @@ declare(strict_types=1); namespace Sylius\Bundle\CoreBundle\Validator\Constraints; use Sylius\Component\Locale\Model\LocaleInterface; -use Sylius\Component\Resource\Model\TranslatableInterface; -use Sylius\Component\Resource\Model\TranslationInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Model\TranslatableInterface; +use Sylius\Resource\Model\TranslationInterface; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; use Webmozart\Assert\Assert; final class TranslationForExistingLocalesValidator extends ConstraintValidator { + /** @param RepositoryInterface $localeRepository */ public function __construct(private RepositoryInterface $localeRepository) { } diff --git a/src/Sylius/Bundle/CoreBundle/Validator/Constraints/ZoneCodeExistsValidator.php b/src/Sylius/Bundle/CoreBundle/Validator/Constraints/ZoneCodeExistsValidator.php index 514dc93130..59fde65aec 100644 --- a/src/Sylius/Bundle/CoreBundle/Validator/Constraints/ZoneCodeExistsValidator.php +++ b/src/Sylius/Bundle/CoreBundle/Validator/Constraints/ZoneCodeExistsValidator.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Bundle\CoreBundle\Validator\Constraints; use Sylius\Component\Addressing\Model\ZoneInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; use Symfony\Component\Validator\Exception\UnexpectedTypeException; diff --git a/src/Sylius/Bundle/CoreBundle/composer.json b/src/Sylius/Bundle/CoreBundle/composer.json index fb00d47cbe..7cc9fad6ba 100644 --- a/src/Sylius/Bundle/CoreBundle/composer.json +++ b/src/Sylius/Bundle/CoreBundle/composer.json @@ -57,7 +57,7 @@ "sylius/payum-bundle": "^2.0", "sylius/product-bundle": "^2.0", "sylius/promotion-bundle": "^2.0", - "sylius/resource-bundle": "^1.10", + "sylius/resource-bundle": "^1.11", "sylius/review-bundle": "^2.0", "sylius/shipping-bundle": "^2.0", "sylius/state-machine-abstraction": "^2.0", diff --git a/src/Sylius/Bundle/CoreBundle/spec/CatalogPromotion/CommandHandler/UpdateCatalogPromotionStateHandlerSpec.php b/src/Sylius/Bundle/CoreBundle/spec/CatalogPromotion/CommandHandler/UpdateCatalogPromotionStateHandlerSpec.php index 8d0b94cb43..c84879a25d 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/CatalogPromotion/CommandHandler/UpdateCatalogPromotionStateHandlerSpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/CatalogPromotion/CommandHandler/UpdateCatalogPromotionStateHandlerSpec.php @@ -18,7 +18,7 @@ use Prophecy\Argument; use Sylius\Bundle\CoreBundle\CatalogPromotion\Command\UpdateCatalogPromotionState; use Sylius\Bundle\CoreBundle\CatalogPromotion\Processor\CatalogPromotionStateProcessorInterface; use Sylius\Component\Core\Model\CatalogPromotionInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class UpdateCatalogPromotionStateHandlerSpec extends ObjectBehavior { diff --git a/src/Sylius/Bundle/CoreBundle/spec/CatalogPromotion/Listener/CatalogPromotionCreatedListenerSpec.php b/src/Sylius/Bundle/CoreBundle/spec/CatalogPromotion/Listener/CatalogPromotionCreatedListenerSpec.php index 3f8f23a05e..9feb315670 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/CatalogPromotion/Listener/CatalogPromotionCreatedListenerSpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/CatalogPromotion/Listener/CatalogPromotionCreatedListenerSpec.php @@ -20,7 +20,7 @@ use Sylius\Bundle\CoreBundle\CatalogPromotion\Command\UpdateCatalogPromotionStat use Sylius\Bundle\CoreBundle\CatalogPromotion\Processor\AllProductVariantsCatalogPromotionsProcessorInterface; use Sylius\Component\Core\Model\CatalogPromotionInterface; use Sylius\Component\Promotion\Event\CatalogPromotionCreated; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Messenger\Envelope; use Symfony\Component\Messenger\MessageBusInterface; diff --git a/src/Sylius/Bundle/CoreBundle/spec/CatalogPromotion/Listener/CatalogPromotionEndedListenerSpec.php b/src/Sylius/Bundle/CoreBundle/spec/CatalogPromotion/Listener/CatalogPromotionEndedListenerSpec.php index 90fc2d8d90..3f9f3d6f96 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/CatalogPromotion/Listener/CatalogPromotionEndedListenerSpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/CatalogPromotion/Listener/CatalogPromotionEndedListenerSpec.php @@ -20,7 +20,7 @@ use Sylius\Bundle\CoreBundle\CatalogPromotion\Command\UpdateCatalogPromotionStat use Sylius\Bundle\CoreBundle\CatalogPromotion\Processor\AllProductVariantsCatalogPromotionsProcessorInterface; use Sylius\Component\Core\Model\CatalogPromotionInterface; use Sylius\Component\Promotion\Event\CatalogPromotionEnded; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Messenger\Envelope; use Symfony\Component\Messenger\MessageBusInterface; diff --git a/src/Sylius/Bundle/CoreBundle/spec/CatalogPromotion/Listener/CatalogPromotionUpdatedListenerSpec.php b/src/Sylius/Bundle/CoreBundle/spec/CatalogPromotion/Listener/CatalogPromotionUpdatedListenerSpec.php index c1b12d792b..ec163ff39f 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/CatalogPromotion/Listener/CatalogPromotionUpdatedListenerSpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/CatalogPromotion/Listener/CatalogPromotionUpdatedListenerSpec.php @@ -20,7 +20,7 @@ use Sylius\Bundle\CoreBundle\CatalogPromotion\Command\UpdateCatalogPromotionStat use Sylius\Bundle\CoreBundle\CatalogPromotion\Processor\AllProductVariantsCatalogPromotionsProcessorInterface; use Sylius\Component\Core\Model\CatalogPromotionInterface; use Sylius\Component\Promotion\Event\CatalogPromotionUpdated; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Messenger\Envelope; use Symfony\Component\Messenger\MessageBusInterface; diff --git a/src/Sylius/Bundle/CoreBundle/spec/Checkout/CheckoutRedirectListenerSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Checkout/CheckoutRedirectListenerSpec.php index de8ad80fd9..c46542b6a4 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/Checkout/CheckoutRedirectListenerSpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/Checkout/CheckoutRedirectListenerSpec.php @@ -16,8 +16,8 @@ namespace spec\Sylius\Bundle\CoreBundle\Checkout; use PhpSpec\ObjectBehavior; use Prophecy\Argument; use Sylius\Bundle\CoreBundle\Checkout\CheckoutStateUrlGeneratorInterface; -use Sylius\Bundle\ResourceBundle\Event\ResourceControllerEvent; use Sylius\Component\Core\Model\OrderInterface; +use Sylius\Resource\Symfony\EventDispatcher\GenericEvent; use Symfony\Component\HttpFoundation\ParameterBag; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; @@ -40,7 +40,7 @@ final class CheckoutRedirectListenerSpec extends ObjectBehavior Request $request, RequestMatcherInterface $requestMatcher, RequestStack $requestStack, - ResourceControllerEvent $resourceControllerEvent, + GenericEvent $resourceControllerEvent, ): void { $requestStack->getCurrentRequest()->willReturn($request); $requestMatcher->matches($request)->willReturn(true); @@ -58,7 +58,7 @@ final class CheckoutRedirectListenerSpec extends ObjectBehavior Request $request, RequestMatcherInterface $requestMatcher, RequestStack $requestStack, - ResourceControllerEvent $resourceControllerEvent, + GenericEvent $resourceControllerEvent, ): void { $requestStack->getCurrentRequest()->willReturn($request); $requestMatcher->matches($request)->willReturn(false); @@ -72,7 +72,7 @@ final class CheckoutRedirectListenerSpec extends ObjectBehavior Request $request, RequestMatcherInterface $requestMatcher, RequestStack $requestStack, - ResourceControllerEvent $resourceControllerEvent, + GenericEvent $resourceControllerEvent, ): void { $requestStack->getCurrentRequest()->willReturn($request); $requestMatcher->matches($request)->willReturn(true); @@ -87,7 +87,7 @@ final class CheckoutRedirectListenerSpec extends ObjectBehavior Request $request, RequestMatcherInterface $requestMatcher, RequestStack $requestStack, - ResourceControllerEvent $resourceControllerEvent, + GenericEvent $resourceControllerEvent, ): void { $requestStack->getCurrentRequest()->willReturn($request); $requestMatcher->matches($request)->willReturn(true); diff --git a/src/Sylius/Bundle/CoreBundle/spec/CommandHandler/ResendOrderConfirmationEmailHandlerSpec.php b/src/Sylius/Bundle/CoreBundle/spec/CommandHandler/ResendOrderConfirmationEmailHandlerSpec.php index e67ef76810..8440126b21 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/CommandHandler/ResendOrderConfirmationEmailHandlerSpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/CommandHandler/ResendOrderConfirmationEmailHandlerSpec.php @@ -17,7 +17,7 @@ use PhpSpec\ObjectBehavior; use Sylius\Bundle\CoreBundle\Command\ResendOrderConfirmationEmail; use Sylius\Bundle\CoreBundle\Mailer\OrderEmailManagerInterface; use Sylius\Component\Core\Model\Order; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\Messenger\Handler\MessageHandlerInterface; diff --git a/src/Sylius/Bundle/CoreBundle/spec/CommandHandler/ResendShipmentConfirmationEmailHandlerSpec.php b/src/Sylius/Bundle/CoreBundle/spec/CommandHandler/ResendShipmentConfirmationEmailHandlerSpec.php index 712dc98309..c00009e20c 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/CommandHandler/ResendShipmentConfirmationEmailHandlerSpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/CommandHandler/ResendShipmentConfirmationEmailHandlerSpec.php @@ -17,7 +17,7 @@ use PhpSpec\ObjectBehavior; use Sylius\Bundle\CoreBundle\Command\ResendShipmentConfirmationEmail; use Sylius\Bundle\CoreBundle\Mailer\ShipmentEmailManagerInterface; use Sylius\Component\Core\Model\ShipmentInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\Messenger\Handler\MessageHandlerInterface; diff --git a/src/Sylius/Bundle/CoreBundle/spec/Doctrine/ORM/Handler/ResourceDeleteHandlerSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Doctrine/ORM/Handler/ResourceDeleteHandlerSpec.php index 6038458371..5fde7f61c6 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/Doctrine/ORM/Handler/ResourceDeleteHandlerSpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/Doctrine/ORM/Handler/ResourceDeleteHandlerSpec.php @@ -18,9 +18,9 @@ use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\ORMException; use PhpSpec\ObjectBehavior; use Sylius\Bundle\ResourceBundle\Controller\ResourceDeleteHandlerInterface; -use Sylius\Component\Resource\Exception\DeleteHandlingException; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Exception\DeleteHandlingException; +use Sylius\Resource\Model\ResourceInterface; final class ResourceDeleteHandlerSpec extends ObjectBehavior { diff --git a/src/Sylius/Bundle/CoreBundle/spec/Doctrine/ORM/Handler/ResourceUpdateHandlerSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Doctrine/ORM/Handler/ResourceUpdateHandlerSpec.php index e7a1c61807..7f43db2929 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/Doctrine/ORM/Handler/ResourceUpdateHandlerSpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/Doctrine/ORM/Handler/ResourceUpdateHandlerSpec.php @@ -19,8 +19,8 @@ use Doctrine\Persistence\ObjectManager; use PhpSpec\ObjectBehavior; use Sylius\Bundle\ResourceBundle\Controller\RequestConfiguration; use Sylius\Bundle\ResourceBundle\Controller\ResourceUpdateHandlerInterface; -use Sylius\Component\Resource\Exception\RaceConditionException; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Exception\RaceConditionException; +use Sylius\Resource\Model\ResourceInterface; final class ResourceUpdateHandlerSpec extends ObjectBehavior { diff --git a/src/Sylius/Bundle/CoreBundle/spec/EventListener/CustomerDefaultAddressListenerSpec.php b/src/Sylius/Bundle/CoreBundle/spec/EventListener/CustomerDefaultAddressListenerSpec.php index 8ce87edebc..0f0bfc09e8 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/EventListener/CustomerDefaultAddressListenerSpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/EventListener/CustomerDefaultAddressListenerSpec.php @@ -15,14 +15,14 @@ namespace spec\Sylius\Bundle\CoreBundle\EventListener; use PhpSpec\ObjectBehavior; use Prophecy\Argument; -use Sylius\Bundle\ResourceBundle\Event\ResourceControllerEvent; use Sylius\Component\Core\Model\AddressInterface; use Sylius\Component\Core\Model\CustomerInterface; +use Sylius\Resource\Symfony\EventDispatcher\GenericEvent; final class CustomerDefaultAddressListenerSpec extends ObjectBehavior { function it_adds_the_address_as_default_to_the_customer_on_pre_create_resource_controller_event( - ResourceControllerEvent $event, + GenericEvent $event, AddressInterface $address, CustomerInterface $customer, ): void { @@ -41,7 +41,7 @@ final class CustomerDefaultAddressListenerSpec extends ObjectBehavior } function it_does_not_set_address_as_default_if_customer_already_have_a_default_address( - ResourceControllerEvent $event, + GenericEvent $event, AddressInterface $address, CustomerInterface $customer, AddressInterface $anotherAddress, @@ -59,7 +59,7 @@ final class CustomerDefaultAddressListenerSpec extends ObjectBehavior } function it_throws_an_exception_if_event_subject_is_not_an_address( - ResourceControllerEvent $event, + GenericEvent $event, ): void { $event->getSubject()->willReturn(Argument::any()); @@ -70,7 +70,7 @@ final class CustomerDefaultAddressListenerSpec extends ObjectBehavior } function it_does_nothing_if_address_does_have_an_id( - ResourceControllerEvent $event, + GenericEvent $event, AddressInterface $address, ): void { $event->getSubject()->willReturn($address); @@ -83,7 +83,7 @@ final class CustomerDefaultAddressListenerSpec extends ObjectBehavior } function it_does_nothing_if_address_does_not_have_a_customer_assigned( - ResourceControllerEvent $event, + GenericEvent $event, AddressInterface $address, CustomerInterface $customer, ): void { diff --git a/src/Sylius/Bundle/CoreBundle/spec/EventListener/LockingListenerSpec.php b/src/Sylius/Bundle/CoreBundle/spec/EventListener/LockingListenerSpec.php index ea86805580..6914142e24 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/EventListener/LockingListenerSpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/EventListener/LockingListenerSpec.php @@ -17,7 +17,7 @@ use Doctrine\DBAL\LockMode; use Doctrine\ORM\EntityManagerInterface; use PhpSpec\ObjectBehavior; use Sylius\Component\Product\Resolver\ProductVariantResolverInterface; -use Sylius\Component\Resource\Model\VersionedInterface; +use Sylius\Resource\Model\VersionedInterface; use Symfony\Component\EventDispatcher\GenericEvent; final class LockingListenerSpec extends ObjectBehavior diff --git a/src/Sylius/Bundle/CoreBundle/spec/EventListener/PaymentPreCompleteListenerSpec.php b/src/Sylius/Bundle/CoreBundle/spec/EventListener/PaymentPreCompleteListenerSpec.php index 180ad1bf26..f8ae6ccddc 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/EventListener/PaymentPreCompleteListenerSpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/EventListener/PaymentPreCompleteListenerSpec.php @@ -15,13 +15,13 @@ namespace spec\Sylius\Bundle\CoreBundle\EventListener; use Doctrine\Common\Collections\ArrayCollection; use PhpSpec\ObjectBehavior; -use Sylius\Bundle\ResourceBundle\Event\ResourceControllerEvent; use Sylius\Component\Core\Inventory\Checker\OrderItemAvailabilityCheckerInterface; use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Core\Model\OrderItemInterface; use Sylius\Component\Core\Model\PaymentInterface; use Sylius\Component\Core\Model\ProductVariantInterface; use Sylius\Component\Inventory\Checker\AvailabilityCheckerInterface; +use Sylius\Resource\Symfony\EventDispatcher\GenericEvent; final class PaymentPreCompleteListenerSpec extends ObjectBehavior { @@ -32,7 +32,7 @@ final class PaymentPreCompleteListenerSpec extends ObjectBehavior function it_does_nothing_if_reserved_stock_is_sufficient( OrderItemAvailabilityCheckerInterface $orderItemAvailabilityChecker, - ResourceControllerEvent $event, + GenericEvent $event, PaymentInterface $payment, OrderInterface $order, OrderItemInterface $orderItem, @@ -52,7 +52,7 @@ final class PaymentPreCompleteListenerSpec extends ObjectBehavior function it_prevents_completing_the_payment_if_reserved_stock_is_not_sufficient( OrderItemAvailabilityCheckerInterface $orderItemAvailabilityChecker, - ResourceControllerEvent $event, + GenericEvent $event, PaymentInterface $payment, OrderInterface $order, OrderItemInterface $orderItem, @@ -77,7 +77,7 @@ final class PaymentPreCompleteListenerSpec extends ObjectBehavior function it_does_nothing_if_no_item_is_tracked_when_order_item_availability_checker_is_not_passed( AvailabilityCheckerInterface $availabilityChecker, - ResourceControllerEvent $event, + GenericEvent $event, PaymentInterface $payment, OrderInterface $order, OrderItemInterface $orderItem, @@ -103,7 +103,7 @@ final class PaymentPreCompleteListenerSpec extends ObjectBehavior function it_does_nothing_if_stock_is_sufficient_for_items_when_order_item_availability_checker_is_not_passed( AvailabilityCheckerInterface $availabilityChecker, - ResourceControllerEvent $event, + GenericEvent $event, PaymentInterface $payment, OrderInterface $order, OrderItemInterface $orderItem, @@ -131,7 +131,7 @@ final class PaymentPreCompleteListenerSpec extends ObjectBehavior function it_prevents_completing_the_payment_if_on_hold_amount_is_not_sufficient_for_item_when_order_item_availability_checker_is_not_passed( AvailabilityCheckerInterface $availabilityChecker, - ResourceControllerEvent $event, + GenericEvent $event, PaymentInterface $payment, OrderInterface $order, OrderItemInterface $orderItem, @@ -161,7 +161,7 @@ final class PaymentPreCompleteListenerSpec extends ObjectBehavior function it_prevents_completing_the_payment_if_on_hand_amount_is_not_sufficient_for_item_when_order_item_availability_checker_is_not_passed( AvailabilityCheckerInterface $availabilityChecker, - ResourceControllerEvent $event, + GenericEvent $event, PaymentInterface $payment, OrderInterface $order, OrderItemInterface $orderItem, diff --git a/src/Sylius/Bundle/CoreBundle/spec/EventListener/ProductDeletionListenerSpec.php b/src/Sylius/Bundle/CoreBundle/spec/EventListener/ProductDeletionListenerSpec.php index 93354940ad..49d96d448a 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/EventListener/ProductDeletionListenerSpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/EventListener/ProductDeletionListenerSpec.php @@ -14,9 +14,9 @@ declare(strict_types=1); namespace spec\Sylius\Bundle\CoreBundle\EventListener; use PhpSpec\ObjectBehavior; -use Sylius\Bundle\ResourceBundle\Event\ResourceControllerEvent; use Sylius\Component\Core\Model\ProductInterface; use Sylius\Component\Core\Promotion\Checker\ProductInPromotionRuleCheckerInterface; +use Sylius\Resource\Symfony\EventDispatcher\GenericEvent; use Symfony\Component\HttpFoundation\Session\SessionInterface; final class ProductDeletionListenerSpec extends ObjectBehavior @@ -26,7 +26,7 @@ final class ProductDeletionListenerSpec extends ObjectBehavior $this->beConstructedWith($productInPromotionRuleChecker); } - function it_throws_an_exception_when_subject_is_not_a_product(ResourceControllerEvent $event): void + function it_throws_an_exception_when_subject_is_not_a_product(GenericEvent $event): void { $event->getSubject()->willReturn('subject'); @@ -36,7 +36,7 @@ final class ProductDeletionListenerSpec extends ObjectBehavior function it_does_nothing_when_product_is_not_assigned_to_rule( ProductInPromotionRuleCheckerInterface $productInPromotionRuleChecker, SessionInterface $session, - ResourceControllerEvent $event, + GenericEvent $event, ProductInterface $product, ): void { $event->getSubject()->willReturn($product); @@ -52,7 +52,7 @@ final class ProductDeletionListenerSpec extends ObjectBehavior function it_prevents_to_remove_product_if_it_is_assigned_to_rule( ProductInPromotionRuleCheckerInterface $productInPromotionRuleChecker, - ResourceControllerEvent $event, + GenericEvent $event, ProductInterface $product, ): void { $event->getSubject()->willReturn($product); diff --git a/src/Sylius/Bundle/CoreBundle/spec/EventListener/TaxonDeletionListenerSpec.php b/src/Sylius/Bundle/CoreBundle/spec/EventListener/TaxonDeletionListenerSpec.php index ba40e6997a..b4e15f0209 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/EventListener/TaxonDeletionListenerSpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/EventListener/TaxonDeletionListenerSpec.php @@ -14,13 +14,13 @@ declare(strict_types=1); namespace spec\Sylius\Bundle\CoreBundle\EventListener; use PhpSpec\ObjectBehavior; -use Sylius\Bundle\ResourceBundle\Event\ResourceControllerEvent; use Sylius\Component\Channel\Repository\ChannelRepositoryInterface; use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Component\Core\Model\TaxonInterface; use Sylius\Component\Core\Promotion\Checker\TaxonInPromotionRuleCheckerInterface; use Sylius\Component\Core\Promotion\Updater\Rule\TaxonAwareRuleUpdaterInterface; -use Symfony\Component\EventDispatcher\GenericEvent; +use Sylius\Resource\Symfony\EventDispatcher\GenericEvent; +use Symfony\Component\EventDispatcher\GenericEvent as SymfonyGenericEvent; use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface; use Symfony\Component\HttpFoundation\Session\SessionInterface; @@ -43,7 +43,7 @@ final class TaxonDeletionListenerSpec extends ObjectBehavior ); } - function it_throws_an_exception_when_subject_is_not_a_taxon(ResourceControllerEvent $event): void + function it_throws_an_exception_when_subject_is_not_a_taxon(GenericEvent $event): void { $event->getSubject()->willReturn('subject'); @@ -54,7 +54,7 @@ final class TaxonDeletionListenerSpec extends ObjectBehavior RequestStack $requestStack, SessionInterface $session, ChannelRepositoryInterface $channelRepository, - GenericEvent $event, + SymfonyGenericEvent $event, TaxonInterface $taxon, ChannelInterface $channel, FlashBagInterface $flashes, @@ -75,7 +75,7 @@ final class TaxonDeletionListenerSpec extends ObjectBehavior RequestStack $requestStack, SessionInterface $session, ChannelRepositoryInterface $channelRepository, - GenericEvent $event, + SymfonyGenericEvent $event, TaxonInterface $taxon, ): void { $event->getSubject()->willReturn($taxon); @@ -87,7 +87,7 @@ final class TaxonDeletionListenerSpec extends ObjectBehavior $this->protectFromRemovingMenuTaxon($event); } - function it_throws_an_exception_if_an_event_subject_is_not_taxon(GenericEvent $event): void + function it_throws_an_exception_if_an_event_subject_is_not_taxon(SymfonyGenericEvent $event): void { $event->getSubject()->willReturn('wrongSubject'); @@ -103,7 +103,7 @@ final class TaxonDeletionListenerSpec extends ObjectBehavior TaxonAwareRuleUpdaterInterface $hasTaxonRuleUpdater, TaxonAwareRuleUpdaterInterface $taxonAwareRuleUpdater, FlashBagInterface $flashes, - GenericEvent $event, + SymfonyGenericEvent $event, TaxonInterface $taxon, ): void { $event->getSubject()->willReturn($taxon); @@ -129,7 +129,7 @@ final class TaxonDeletionListenerSpec extends ObjectBehavior SessionInterface $session, TaxonAwareRuleUpdaterInterface $hasTaxonRuleUpdater, TaxonAwareRuleUpdaterInterface $taxonAwareRuleUpdater, - GenericEvent $event, + SymfonyGenericEvent $event, TaxonInterface $taxon, ): void { $event->getSubject()->willReturn($taxon); @@ -144,7 +144,7 @@ final class TaxonDeletionListenerSpec extends ObjectBehavior } function it_changes_taxon_position_to_minus_one_if_base_position_is_zero( - GenericEvent $event, + SymfonyGenericEvent $event, TaxonInterface $taxon, ): void { $event->getSubject()->willReturn($taxon); @@ -156,7 +156,7 @@ final class TaxonDeletionListenerSpec extends ObjectBehavior function it_does_nothing_when_product_is_not_assigned_to_rule( TaxonInPromotionRuleCheckerInterface $taxonInPromotionRuleChecker, - ResourceControllerEvent $event, + GenericEvent $event, TaxonInterface $taxon, ): void { $event->getSubject()->willReturn($taxon); @@ -172,7 +172,7 @@ final class TaxonDeletionListenerSpec extends ObjectBehavior function it_prevents_to_remove_product_if_it_is_assigned_to_rule( TaxonInPromotionRuleCheckerInterface $taxonInPromotionRuleChecker, - ResourceControllerEvent $event, + GenericEvent $event, TaxonInterface $taxon, ): void { $event->getSubject()->willReturn($taxon); diff --git a/src/Sylius/Bundle/CoreBundle/spec/Factory/OrderFactorySpec.php b/src/Sylius/Bundle/CoreBundle/spec/Factory/OrderFactorySpec.php index 84131c1dd0..cda6737bb2 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/Factory/OrderFactorySpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/Factory/OrderFactorySpec.php @@ -19,7 +19,7 @@ use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Component\Core\Model\CustomerInterface; use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Currency\Model\CurrencyInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class OrderFactorySpec extends ObjectBehavior { diff --git a/src/Sylius/Bundle/CoreBundle/spec/Fixture/Factory/TaxonExampleFactorySpec.php b/src/Sylius/Bundle/CoreBundle/spec/Fixture/Factory/TaxonExampleFactorySpec.php index e644e38dae..3833a08e4f 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/Fixture/Factory/TaxonExampleFactorySpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/Fixture/Factory/TaxonExampleFactorySpec.php @@ -18,10 +18,10 @@ use Prophecy\Argument; use Sylius\Bundle\CoreBundle\Fixture\Factory\ExampleFactoryInterface; use Sylius\Component\Core\Model\TaxonInterface; use Sylius\Component\Locale\Model\Locale; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; use Sylius\Component\Taxonomy\Generator\TaxonSlugGeneratorInterface; use Sylius\Component\Taxonomy\Repository\TaxonRepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class TaxonExampleFactorySpec extends ObjectBehavior { diff --git a/src/Sylius/Bundle/CoreBundle/spec/Fixture/GeographicalFixtureSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Fixture/GeographicalFixtureSpec.php index 93c74dbdf6..34f0c8f770 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/Fixture/GeographicalFixtureSpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/Fixture/GeographicalFixtureSpec.php @@ -20,7 +20,7 @@ use Sylius\Component\Addressing\Factory\ZoneFactoryInterface; use Sylius\Component\Addressing\Model\CountryInterface; use Sylius\Component\Addressing\Model\ProvinceInterface; use Sylius\Component\Addressing\Model\ZoneInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class GeographicalFixtureSpec extends ObjectBehavior { diff --git a/src/Sylius/Bundle/CoreBundle/spec/Fixture/LocaleFixtureSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Fixture/LocaleFixtureSpec.php index 855e461be3..74c05b651b 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/Fixture/LocaleFixtureSpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/Fixture/LocaleFixtureSpec.php @@ -17,7 +17,7 @@ use Doctrine\Persistence\ObjectManager; use PhpSpec\ObjectBehavior; use Sylius\Bundle\FixturesBundle\Fixture\FixtureInterface; use Sylius\Component\Locale\Model\LocaleInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class LocaleFixtureSpec extends ObjectBehavior { diff --git a/src/Sylius/Bundle/CoreBundle/spec/Form/DataTransformer/ProductTaxonToTaxonTransformerSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Form/DataTransformer/ProductTaxonToTaxonTransformerSpec.php index 2f29720577..1c7d6b0318 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/Form/DataTransformer/ProductTaxonToTaxonTransformerSpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/Form/DataTransformer/ProductTaxonToTaxonTransformerSpec.php @@ -17,8 +17,8 @@ use PhpSpec\ObjectBehavior; use Sylius\Component\Core\Model\ProductInterface; use Sylius\Component\Core\Model\ProductTaxonInterface; use Sylius\Component\Core\Model\TaxonInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\Form\DataTransformerInterface; use Symfony\Component\Form\Exception\TransformationFailedException; diff --git a/src/Sylius/Bundle/CoreBundle/spec/Form/EventSubscriber/AddBaseCurrencySubscriberSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Form/EventSubscriber/AddBaseCurrencySubscriberSpec.php index 2b6634f573..de91c66ebf 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/Form/EventSubscriber/AddBaseCurrencySubscriberSpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/Form/EventSubscriber/AddBaseCurrencySubscriberSpec.php @@ -17,7 +17,7 @@ use PhpSpec\ObjectBehavior; use Prophecy\Argument; use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Component\Currency\Model\CurrencyInterface; -use Sylius\Component\Resource\Exception\UnexpectedTypeException; +use Sylius\Resource\Exception\UnexpectedTypeException; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\Form\FormEvent; use Symfony\Component\Form\FormEvents; diff --git a/src/Sylius/Bundle/CoreBundle/spec/Form/EventSubscriber/CustomerRegistrationFormSubscriberSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Form/EventSubscriber/CustomerRegistrationFormSubscriberSpec.php index 1296510a85..8d72842bae 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/Form/EventSubscriber/CustomerRegistrationFormSubscriberSpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/Form/EventSubscriber/CustomerRegistrationFormSubscriberSpec.php @@ -16,7 +16,7 @@ namespace spec\Sylius\Bundle\CoreBundle\Form\EventSubscriber; use PhpSpec\ObjectBehavior; use Sylius\Component\Core\Model\CustomerInterface; use Sylius\Component\Core\Model\ShopUserInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\Form\FormEvent; use Symfony\Component\Form\FormEvents; diff --git a/src/Sylius/Bundle/CoreBundle/spec/OAuth/UserProviderSpec.php b/src/Sylius/Bundle/CoreBundle/spec/OAuth/UserProviderSpec.php index d6ea42da92..ada8a57230 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/OAuth/UserProviderSpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/OAuth/UserProviderSpec.php @@ -24,11 +24,11 @@ use Sylius\Component\Core\Model\CustomerInterface; use Sylius\Component\Core\Model\ShopUser; use Sylius\Component\Core\Model\ShopUserInterface; use Sylius\Component\Core\Repository\CustomerRepositoryInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; use Sylius\Component\User\Canonicalizer\CanonicalizerInterface; use Sylius\Component\User\Model\UserOAuthInterface; use Sylius\Component\User\Repository\UserRepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use SyliusLabs\Polyfill\Symfony\Security\Core\Exception\UserNotFoundException; use Symfony\Component\Security\Core\Exception\UnsupportedUserException; use Symfony\Component\Security\Core\User\UserInterface; diff --git a/src/Sylius/Bundle/CoreBundle/spec/Order/NumberGenerator/SequentialOrderNumberGeneratorSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Order/NumberGenerator/SequentialOrderNumberGeneratorSpec.php index b152e5e3e0..2bc5956169 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/Order/NumberGenerator/SequentialOrderNumberGeneratorSpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/Order/NumberGenerator/SequentialOrderNumberGeneratorSpec.php @@ -20,7 +20,7 @@ use Sylius\Bundle\OrderBundle\NumberGenerator\OrderNumberGeneratorInterface; use Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository; use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Core\Model\OrderSequenceInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class SequentialOrderNumberGeneratorSpec extends ObjectBehavior { diff --git a/src/Sylius/Bundle/CoreBundle/spec/PriceHistory/CommandDispatcher/BatchedApplyLowestPriceOnChannelPricingsCommandDispatcherSpec.php b/src/Sylius/Bundle/CoreBundle/spec/PriceHistory/CommandDispatcher/BatchedApplyLowestPriceOnChannelPricingsCommandDispatcherSpec.php index 3fc550251c..4d9b1285a5 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/PriceHistory/CommandDispatcher/BatchedApplyLowestPriceOnChannelPricingsCommandDispatcherSpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/PriceHistory/CommandDispatcher/BatchedApplyLowestPriceOnChannelPricingsCommandDispatcherSpec.php @@ -18,7 +18,7 @@ use Sylius\Bundle\CoreBundle\PriceHistory\Command\ApplyLowestPriceOnChannelPrici use Sylius\Bundle\CoreBundle\PriceHistory\CommandDispatcher\ApplyLowestPriceOnChannelPricingsCommandDispatcherInterface; use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Component\Core\Model\ChannelPricingInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Messenger\Envelope; use Symfony\Component\Messenger\MessageBusInterface; diff --git a/src/Sylius/Bundle/CoreBundle/spec/PriceHistory/CommandHandler/ApplyLowestPriceOnChannelPricingsHandlerSpec.php b/src/Sylius/Bundle/CoreBundle/spec/PriceHistory/CommandHandler/ApplyLowestPriceOnChannelPricingsHandlerSpec.php index 0e732e5d27..edb272a083 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/PriceHistory/CommandHandler/ApplyLowestPriceOnChannelPricingsHandlerSpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/PriceHistory/CommandHandler/ApplyLowestPriceOnChannelPricingsHandlerSpec.php @@ -19,7 +19,7 @@ use Sylius\Bundle\CoreBundle\PriceHistory\Command\ApplyLowestPriceOnChannelPrici use Sylius\Bundle\CoreBundle\PriceHistory\CommandHandler\ApplyLowestPriceOnChannelPricingsHandler; use Sylius\Bundle\CoreBundle\PriceHistory\Processor\ProductLowestPriceBeforeDiscountProcessorInterface; use Sylius\Component\Core\Model\ChannelPricingInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class ApplyLowestPriceOnChannelPricingsHandlerSpec extends ObjectBehavior { diff --git a/src/Sylius/Bundle/CoreBundle/spec/Resolver/CustomerResolverSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Resolver/CustomerResolverSpec.php index 4fd919f414..9c09463236 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/Resolver/CustomerResolverSpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/Resolver/CustomerResolverSpec.php @@ -18,7 +18,7 @@ use Sylius\Bundle\CoreBundle\Provider\CustomerProviderInterface; use Sylius\Bundle\CoreBundle\Resolver\CustomerResolverInterface; use Sylius\Component\Core\Exception\CustomerNotFoundException; use Sylius\Component\Core\Model\CustomerInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class CustomerResolverSpec extends ObjectBehavior { diff --git a/src/Sylius/Bundle/CoreBundle/spec/Resource/StateMachine/Controller/CompositeStateMachineSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Resource/StateMachine/Controller/CompositeStateMachineSpec.php index 0f9d576e7f..3edb4cd0f8 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/Resource/StateMachine/Controller/CompositeStateMachineSpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/Resource/StateMachine/Controller/CompositeStateMachineSpec.php @@ -16,7 +16,7 @@ namespace spec\Sylius\Bundle\CoreBundle\Resource\StateMachine\Controller; use PhpSpec\ObjectBehavior; use Sylius\Abstraction\StateMachine\StateMachineInterface; use Sylius\Bundle\ResourceBundle\Controller\RequestConfiguration; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ResourceInterface; final class CompositeStateMachineSpec extends ObjectBehavior { diff --git a/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/CountryCodeExistsValidatorSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/CountryCodeExistsValidatorSpec.php index eb3236823a..64d0d70736 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/CountryCodeExistsValidatorSpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/CountryCodeExistsValidatorSpec.php @@ -17,7 +17,7 @@ use PhpSpec\ObjectBehavior; use Prophecy\Argument; use Sylius\Bundle\CoreBundle\Validator\Constraints\CountryCodeExists; use Sylius\Component\Addressing\Model\CountryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\Context\ExecutionContextInterface; use Symfony\Component\Validator\Exception\UnexpectedTypeException; diff --git a/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/HasEnabledEntityValidatorSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/HasEnabledEntityValidatorSpec.php index bb7cd68be9..a029e88aee 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/HasEnabledEntityValidatorSpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/HasEnabledEntityValidatorSpec.php @@ -20,7 +20,7 @@ use Doctrine\Persistence\ObjectRepository; use PhpSpec\ObjectBehavior; use Prophecy\Argument; use Sylius\Bundle\CoreBundle\Validator\Constraints\HasEnabledEntity; -use Sylius\Component\Resource\Model\ToggleableInterface; +use Sylius\Resource\Model\ToggleableInterface; use Symfony\Component\PropertyAccess\PropertyAccessorInterface; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; diff --git a/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/LocalesAwareValidAttributeValueValidatorSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/LocalesAwareValidAttributeValueValidatorSpec.php index 5650a4ac1b..32f1112695 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/LocalesAwareValidAttributeValueValidatorSpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/LocalesAwareValidAttributeValueValidatorSpec.php @@ -21,7 +21,7 @@ use Sylius\Component\Attribute\AttributeType\TextAttributeType; use Sylius\Component\Attribute\Model\AttributeInterface; use Sylius\Component\Attribute\Model\AttributeValueInterface; use Sylius\Component\Registry\ServiceRegistryInterface; -use Sylius\Component\Resource\Translation\Provider\TranslationLocaleProviderInterface; +use Sylius\Resource\Translation\Provider\TranslationLocaleProviderInterface; use Symfony\Component\Validator\ConstraintValidator; use Symfony\Component\Validator\Context\ExecutionContextInterface; diff --git a/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/ProvinceCodeExistsValidatorSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/ProvinceCodeExistsValidatorSpec.php index adea9612f3..7601a4d253 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/ProvinceCodeExistsValidatorSpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/ProvinceCodeExistsValidatorSpec.php @@ -17,7 +17,7 @@ use PhpSpec\ObjectBehavior; use Prophecy\Argument; use Sylius\Bundle\CoreBundle\Validator\Constraints\ProvinceCodeExists; use Sylius\Component\Addressing\Model\ProvinceInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\Context\ExecutionContextInterface; use Symfony\Component\Validator\Exception\UnexpectedTypeException; diff --git a/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/ResendOrderConfirmationEmailWithValidOrderStateValidatorSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/ResendOrderConfirmationEmailWithValidOrderStateValidatorSpec.php index 8d6b976e82..e23499f91d 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/ResendOrderConfirmationEmailWithValidOrderStateValidatorSpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/ResendOrderConfirmationEmailWithValidOrderStateValidatorSpec.php @@ -18,7 +18,7 @@ use Prophecy\Argument; use Sylius\Bundle\CoreBundle\Command\ResendOrderConfirmationEmail; use Sylius\Bundle\CoreBundle\Validator\Constraints\ResendOrderConfirmationEmailWithValidOrderState; use Sylius\Component\Order\Model\OrderInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\Context\ExecutionContextInterface; use Symfony\Component\Validator\Exception\UnexpectedTypeException; diff --git a/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/ResendShipmentConfirmationEmailWithValidShipmentStateValidatorSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/ResendShipmentConfirmationEmailWithValidShipmentStateValidatorSpec.php index 9001865fc6..2b544f1ee4 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/ResendShipmentConfirmationEmailWithValidShipmentStateValidatorSpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/ResendShipmentConfirmationEmailWithValidShipmentStateValidatorSpec.php @@ -18,7 +18,7 @@ use Prophecy\Argument; use Sylius\Bundle\CoreBundle\Command\ResendShipmentConfirmationEmail; use Sylius\Bundle\CoreBundle\Validator\Constraints\ResendShipmentConfirmationEmailWithValidShipmentState; use Sylius\Component\Core\Model\ShipmentInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\Context\ExecutionContextInterface; use Symfony\Component\Validator\Exception\UnexpectedTypeException; diff --git a/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/TranslationForExistingLocalesValidatorSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/TranslationForExistingLocalesValidatorSpec.php index e4660037d5..92e6d501f1 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/TranslationForExistingLocalesValidatorSpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/TranslationForExistingLocalesValidatorSpec.php @@ -18,9 +18,9 @@ use PhpSpec\ObjectBehavior; use Prophecy\Argument; use Sylius\Bundle\CoreBundle\Validator\Constraints\TranslationForExistingLocales; use Sylius\Component\Locale\Model\LocaleInterface; -use Sylius\Component\Resource\Model\TranslatableInterface; -use Sylius\Component\Resource\Model\TranslationInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Model\TranslatableInterface; +use Sylius\Resource\Model\TranslationInterface; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidatorInterface; use Symfony\Component\Validator\Context\ExecutionContextInterface; diff --git a/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/ZoneCodeExistsValidatorSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/ZoneCodeExistsValidatorSpec.php index 832028297f..362eb01fe4 100644 --- a/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/ZoneCodeExistsValidatorSpec.php +++ b/src/Sylius/Bundle/CoreBundle/spec/Validator/Constraints/ZoneCodeExistsValidatorSpec.php @@ -17,7 +17,7 @@ use PhpSpec\ObjectBehavior; use Prophecy\Argument; use Sylius\Bundle\CoreBundle\Validator\Constraints\ZoneCodeExists; use Sylius\Component\Addressing\Model\ZoneInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\Context\ExecutionContextInterface; use Symfony\Component\Validator\Exception\UnexpectedTypeException; diff --git a/src/Sylius/Bundle/CoreBundle/test/config/packages/state_machine.yaml b/src/Sylius/Bundle/CoreBundle/test/config/packages/state_machine.yaml index 4b0f3afa52..13ebafac0e 100644 --- a/src/Sylius/Bundle/CoreBundle/test/config/packages/state_machine.yaml +++ b/src/Sylius/Bundle/CoreBundle/test/config/packages/state_machine.yaml @@ -3,7 +3,7 @@ winzou_state_machine: class: Sylius\Bundle\CoreBundle\Application\Model\BlogPost property_path: state graph: app_blog_post - state_machine_class: Sylius\Component\Resource\StateMachine\StateMachine + state_machine_class: Sylius\Resource\StateMachine\StateMachine states: new: ~ published: ~ @@ -19,7 +19,7 @@ winzou_state_machine: class: Sylius\Bundle\CoreBundle\Application\Model\Comment property_path: state graph: app_comment - state_machine_class: Sylius\Component\Resource\StateMachine\StateMachine + state_machine_class: Sylius\Resource\StateMachine\StateMachine states: new: ~ published: ~ diff --git a/src/Sylius/Bundle/CurrencyBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/CurrencyBundle/DependencyInjection/Configuration.php index 7b7f1bc82a..fd16a8e91f 100644 --- a/src/Sylius/Bundle/CurrencyBundle/DependencyInjection/Configuration.php +++ b/src/Sylius/Bundle/CurrencyBundle/DependencyInjection/Configuration.php @@ -23,7 +23,7 @@ use Sylius\Component\Currency\Model\Currency; use Sylius\Component\Currency\Model\CurrencyInterface; use Sylius\Component\Currency\Model\ExchangeRate; use Sylius\Component\Currency\Model\ExchangeRateInterface; -use Sylius\Component\Resource\Factory\Factory; +use Sylius\Resource\Factory\Factory; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; diff --git a/src/Sylius/Bundle/CurrencyBundle/Form/Type/CurrencyChoiceType.php b/src/Sylius/Bundle/CurrencyBundle/Form/Type/CurrencyChoiceType.php index 36eeaedbd7..9a7de99f22 100644 --- a/src/Sylius/Bundle/CurrencyBundle/Form/Type/CurrencyChoiceType.php +++ b/src/Sylius/Bundle/CurrencyBundle/Form/Type/CurrencyChoiceType.php @@ -13,7 +13,8 @@ declare(strict_types=1); namespace Sylius\Bundle\CurrencyBundle\Form\Type; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Component\Currency\Model\CurrencyInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Bridge\Doctrine\Form\DataTransformer\CollectionToArrayTransformer; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; @@ -23,6 +24,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class CurrencyChoiceType extends AbstractType { + /** @param RepositoryInterface $currencyRepository */ public function __construct(private RepositoryInterface $currencyRepository) { } diff --git a/src/Sylius/Bundle/CurrencyBundle/composer.json b/src/Sylius/Bundle/CurrencyBundle/composer.json index c1c9de5549..5a1669f567 100644 --- a/src/Sylius/Bundle/CurrencyBundle/composer.json +++ b/src/Sylius/Bundle/CurrencyBundle/composer.json @@ -27,7 +27,7 @@ "require": { "php": "^8.2", "sylius/currency": "^2.0", - "sylius/resource-bundle": "^1.10", + "sylius/resource-bundle": "^1.11", "symfony/framework-bundle": "^6.4.1", "symfony/intl": "^6.4.0", "symfony/templating": "^6.4.0" diff --git a/src/Sylius/Bundle/CustomerBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/CustomerBundle/DependencyInjection/Configuration.php index 382b78bcbd..daa16ec214 100644 --- a/src/Sylius/Bundle/CustomerBundle/DependencyInjection/Configuration.php +++ b/src/Sylius/Bundle/CustomerBundle/DependencyInjection/Configuration.php @@ -22,7 +22,7 @@ use Sylius\Component\Customer\Model\Customer; use Sylius\Component\Customer\Model\CustomerGroup; use Sylius\Component\Customer\Model\CustomerGroupInterface; use Sylius\Component\Customer\Model\CustomerInterface; -use Sylius\Component\Resource\Factory\Factory; +use Sylius\Resource\Factory\Factory; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; diff --git a/src/Sylius/Bundle/CustomerBundle/Form/Type/CustomerChoiceType.php b/src/Sylius/Bundle/CustomerBundle/Form/Type/CustomerChoiceType.php index 6d22c7bc43..30c730165d 100644 --- a/src/Sylius/Bundle/CustomerBundle/Form/Type/CustomerChoiceType.php +++ b/src/Sylius/Bundle/CustomerBundle/Form/Type/CustomerChoiceType.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Bundle\CustomerBundle\Form\Type; use Sylius\Component\Customer\Model\CustomerInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Bridge\Doctrine\Form\DataTransformer\CollectionToArrayTransformer; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; @@ -24,6 +24,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class CustomerChoiceType extends AbstractType { + /** @param RepositoryInterface $customerRepository */ public function __construct(private RepositoryInterface $customerRepository) { } diff --git a/src/Sylius/Bundle/CustomerBundle/Form/Type/CustomerGroupChoiceType.php b/src/Sylius/Bundle/CustomerBundle/Form/Type/CustomerGroupChoiceType.php index 820315dc65..a99214bc21 100644 --- a/src/Sylius/Bundle/CustomerBundle/Form/Type/CustomerGroupChoiceType.php +++ b/src/Sylius/Bundle/CustomerBundle/Form/Type/CustomerGroupChoiceType.php @@ -13,7 +13,8 @@ declare(strict_types=1); namespace Sylius\Bundle\CustomerBundle\Form\Type; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Component\Customer\Model\CustomerGroupInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Bridge\Doctrine\Form\DataTransformer\CollectionToArrayTransformer; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; @@ -23,6 +24,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class CustomerGroupChoiceType extends AbstractType { + /** @param RepositoryInterface $customerGroupRepository */ public function __construct(private RepositoryInterface $customerGroupRepository) { } diff --git a/src/Sylius/Bundle/CustomerBundle/Form/Type/CustomerGroupCodeChoiceType.php b/src/Sylius/Bundle/CustomerBundle/Form/Type/CustomerGroupCodeChoiceType.php index af8971495d..4e2b3acd2b 100644 --- a/src/Sylius/Bundle/CustomerBundle/Form/Type/CustomerGroupCodeChoiceType.php +++ b/src/Sylius/Bundle/CustomerBundle/Form/Type/CustomerGroupCodeChoiceType.php @@ -14,13 +14,15 @@ declare(strict_types=1); namespace Sylius\Bundle\CustomerBundle\Form\Type; use Sylius\Bundle\ResourceBundle\Form\DataTransformer\ResourceToIdentifierTransformer; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Component\Customer\Model\CustomerGroupInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\ReversedTransformer; final class CustomerGroupCodeChoiceType extends AbstractType { + /** @param RepositoryInterface $customerGroupRepository */ public function __construct(private RepositoryInterface $customerGroupRepository) { } diff --git a/src/Sylius/Bundle/CustomerBundle/composer.json b/src/Sylius/Bundle/CustomerBundle/composer.json index e29b10cb84..fb1b4e8b9f 100644 --- a/src/Sylius/Bundle/CustomerBundle/composer.json +++ b/src/Sylius/Bundle/CustomerBundle/composer.json @@ -39,7 +39,7 @@ "doctrine/orm": "^2.13", "egulias/email-validator": "^3.1", "sylius/customer": "^2.0", - "sylius/resource-bundle": "^1.10", + "sylius/resource-bundle": "^1.11", "symfony/framework-bundle": "^6.4.1", "webmozart/assert": "^1.9" }, diff --git a/src/Sylius/Bundle/InventoryBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/InventoryBundle/DependencyInjection/Configuration.php index 297861e3b8..e7bd9fb8bc 100644 --- a/src/Sylius/Bundle/InventoryBundle/DependencyInjection/Configuration.php +++ b/src/Sylius/Bundle/InventoryBundle/DependencyInjection/Configuration.php @@ -17,7 +17,7 @@ use Sylius\Bundle\ResourceBundle\Controller\ResourceController; use Sylius\Bundle\ResourceBundle\SyliusResourceBundle; use Sylius\Component\Inventory\Model\InventoryUnit; use Sylius\Component\Inventory\Model\InventoryUnitInterface; -use Sylius\Component\Resource\Factory\Factory; +use Sylius\Resource\Factory\Factory; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; diff --git a/src/Sylius/Bundle/InventoryBundle/composer.json b/src/Sylius/Bundle/InventoryBundle/composer.json index cd79b9f094..d7d2ab25b6 100644 --- a/src/Sylius/Bundle/InventoryBundle/composer.json +++ b/src/Sylius/Bundle/InventoryBundle/composer.json @@ -28,7 +28,7 @@ "require": { "php": "^8.2", "sylius/inventory": "^2.0", - "sylius/resource-bundle": "^1.10", + "sylius/resource-bundle": "^1.11", "symfony/framework-bundle": "^6.4.1", "symfony/templating": "^6.4.0", "symfony/validator": "^6.4.0" diff --git a/src/Sylius/Bundle/LocaleBundle/Checker/LocaleUsageChecker.php b/src/Sylius/Bundle/LocaleBundle/Checker/LocaleUsageChecker.php index cc54a7d709..4a8ebd7b79 100644 --- a/src/Sylius/Bundle/LocaleBundle/Checker/LocaleUsageChecker.php +++ b/src/Sylius/Bundle/LocaleBundle/Checker/LocaleUsageChecker.php @@ -17,15 +17,13 @@ use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityRepository; use Sylius\Component\Locale\Context\LocaleNotFoundException; use Sylius\Component\Locale\Model\LocaleInterface; -use Sylius\Component\Resource\Metadata\RegistryInterface; -use Sylius\Component\Resource\Model\TranslationInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Metadata\RegistryInterface; +use Sylius\Resource\Model\TranslationInterface; final class LocaleUsageChecker implements LocaleUsageCheckerInterface { - /** - * @param RepositoryInterface $localeRepository - */ + /** @param RepositoryInterface $localeRepository */ public function __construct( private RepositoryInterface $localeRepository, private RegistryInterface $resourceRegistry, diff --git a/src/Sylius/Bundle/LocaleBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/LocaleBundle/DependencyInjection/Configuration.php index 5402fe93c4..3d717e98d0 100644 --- a/src/Sylius/Bundle/LocaleBundle/DependencyInjection/Configuration.php +++ b/src/Sylius/Bundle/LocaleBundle/DependencyInjection/Configuration.php @@ -18,7 +18,7 @@ use Sylius\Bundle\ResourceBundle\Controller\ResourceController; use Sylius\Bundle\ResourceBundle\SyliusResourceBundle; use Sylius\Component\Locale\Model\Locale; use Sylius\Component\Locale\Model\LocaleInterface; -use Sylius\Component\Resource\Factory\Factory; +use Sylius\Resource\Factory\Factory; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; diff --git a/src/Sylius/Bundle/LocaleBundle/Form/Type/LocaleChoiceType.php b/src/Sylius/Bundle/LocaleBundle/Form/Type/LocaleChoiceType.php index ae88f54be2..8d5465abea 100644 --- a/src/Sylius/Bundle/LocaleBundle/Form/Type/LocaleChoiceType.php +++ b/src/Sylius/Bundle/LocaleBundle/Form/Type/LocaleChoiceType.php @@ -13,7 +13,8 @@ declare(strict_types=1); namespace Sylius\Bundle\LocaleBundle\Form\Type; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Component\Locale\Model\LocaleInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Bridge\Doctrine\Form\DataTransformer\CollectionToArrayTransformer; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; @@ -23,6 +24,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class LocaleChoiceType extends AbstractType { + /** @param RepositoryInterface $localeRepository */ public function __construct(private RepositoryInterface $localeRepository) { } diff --git a/src/Sylius/Bundle/LocaleBundle/composer.json b/src/Sylius/Bundle/LocaleBundle/composer.json index f796c6368f..fe8e5b574f 100644 --- a/src/Sylius/Bundle/LocaleBundle/composer.json +++ b/src/Sylius/Bundle/LocaleBundle/composer.json @@ -28,7 +28,7 @@ "require": { "php": "^8.2", "sylius/locale": "^2.0", - "sylius/resource-bundle": "^1.10", + "sylius/resource-bundle": "^1.11", "symfony/cache-contracts": "^2.5 || ^3.0", "symfony/framework-bundle": "^6.4.1", "symfony/templating": "^6.4.0" diff --git a/src/Sylius/Bundle/LocaleBundle/spec/Checker/LocaleUsageCheckerSpec.php b/src/Sylius/Bundle/LocaleBundle/spec/Checker/LocaleUsageCheckerSpec.php index b36c443dca..a038c13f89 100644 --- a/src/Sylius/Bundle/LocaleBundle/spec/Checker/LocaleUsageCheckerSpec.php +++ b/src/Sylius/Bundle/LocaleBundle/spec/Checker/LocaleUsageCheckerSpec.php @@ -18,9 +18,9 @@ use PhpSpec\ObjectBehavior; use Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository; use Sylius\Component\Locale\Context\LocaleNotFoundException; use Sylius\Component\Locale\Model\LocaleInterface; -use Sylius\Component\Resource\Metadata\MetadataInterface; -use Sylius\Component\Resource\Metadata\RegistryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Metadata\MetadataInterface; +use Sylius\Resource\Metadata\RegistryInterface; final class LocaleUsageCheckerSpec extends ObjectBehavior { diff --git a/src/Sylius/Bundle/MoneyBundle/composer.json b/src/Sylius/Bundle/MoneyBundle/composer.json index f60b355f28..eb722de153 100644 --- a/src/Sylius/Bundle/MoneyBundle/composer.json +++ b/src/Sylius/Bundle/MoneyBundle/composer.json @@ -26,7 +26,7 @@ ], "require": { "php": "^8.2", - "sylius/resource-bundle": "^1.10", + "sylius/resource-bundle": "^1.11", "symfony/framework-bundle": "^6.4.1", "symfony/intl": "^6.4.0", "symfony/templating": "^6.4.0", diff --git a/src/Sylius/Bundle/OrderBundle/Controller/OrderController.php b/src/Sylius/Bundle/OrderBundle/Controller/OrderController.php index 363f2a8faf..9fa118ce57 100644 --- a/src/Sylius/Bundle/OrderBundle/Controller/OrderController.php +++ b/src/Sylius/Bundle/OrderBundle/Controller/OrderController.php @@ -19,7 +19,7 @@ use Sylius\Component\Order\Context\CartContextInterface; use Sylius\Component\Order\Model\OrderInterface; use Sylius\Component\Order\Repository\OrderRepositoryInterface; use Sylius\Component\Order\SyliusCartEvents; -use Sylius\Component\Resource\ResourceActions; +use Sylius\Resource\ResourceActions; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\EventDispatcher\GenericEvent; use Symfony\Component\HttpFoundation\Request; diff --git a/src/Sylius/Bundle/OrderBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/OrderBundle/DependencyInjection/Configuration.php index 1e4f75c173..df4c4e3ac6 100644 --- a/src/Sylius/Bundle/OrderBundle/DependencyInjection/Configuration.php +++ b/src/Sylius/Bundle/OrderBundle/DependencyInjection/Configuration.php @@ -28,7 +28,7 @@ use Sylius\Component\Order\Model\OrderItemUnit; use Sylius\Component\Order\Model\OrderItemUnitInterface; use Sylius\Component\Order\Model\OrderSequence; use Sylius\Component\Order\Model\OrderSequenceInterface; -use Sylius\Component\Resource\Factory\Factory; +use Sylius\Resource\Factory\Factory; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; diff --git a/src/Sylius/Bundle/OrderBundle/NumberGenerator/SequentialOrderNumberGenerator.php b/src/Sylius/Bundle/OrderBundle/NumberGenerator/SequentialOrderNumberGenerator.php index 5d2e5ff309..cc6b526db5 100644 --- a/src/Sylius/Bundle/OrderBundle/NumberGenerator/SequentialOrderNumberGenerator.php +++ b/src/Sylius/Bundle/OrderBundle/NumberGenerator/SequentialOrderNumberGenerator.php @@ -15,11 +15,15 @@ namespace Sylius\Bundle\OrderBundle\NumberGenerator; use Sylius\Component\Order\Model\OrderInterface; use Sylius\Component\Order\Model\OrderSequenceInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class SequentialOrderNumberGenerator implements OrderNumberGeneratorInterface { + /** + * @param RepositoryInterface $sequenceRepository + * @param FactoryInterface $sequenceFactory + */ public function __construct( private RepositoryInterface $sequenceRepository, private FactoryInterface $sequenceFactory, diff --git a/src/Sylius/Bundle/OrderBundle/composer.json b/src/Sylius/Bundle/OrderBundle/composer.json index 11793a4677..788fb465fc 100644 --- a/src/Sylius/Bundle/OrderBundle/composer.json +++ b/src/Sylius/Bundle/OrderBundle/composer.json @@ -32,7 +32,7 @@ "sylius-labs/polyfill-symfony-framework-bundle": "^1.0 || ^1.1", "sylius/money-bundle": "^2.0", "sylius/order": "^2.0", - "sylius/resource-bundle": "^1.10", + "sylius/resource-bundle": "^1.11", "symfony/framework-bundle": "^6.4.1", "symfony/service-contracts": "^2.5 || ^3.0", "symfony/templating": "^6.4.0" diff --git a/src/Sylius/Bundle/OrderBundle/spec/NumberGenerator/SequentialOrderNumberGeneratorSpec.php b/src/Sylius/Bundle/OrderBundle/spec/NumberGenerator/SequentialOrderNumberGeneratorSpec.php index 5b2b04cb85..2f2287861d 100644 --- a/src/Sylius/Bundle/OrderBundle/spec/NumberGenerator/SequentialOrderNumberGeneratorSpec.php +++ b/src/Sylius/Bundle/OrderBundle/spec/NumberGenerator/SequentialOrderNumberGeneratorSpec.php @@ -18,7 +18,7 @@ use Sylius\Bundle\OrderBundle\NumberGenerator\OrderNumberGeneratorInterface; use Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository; use Sylius\Component\Order\Model\OrderInterface; use Sylius\Component\Order\Model\OrderSequenceInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class SequentialOrderNumberGeneratorSpec extends ObjectBehavior { diff --git a/src/Sylius/Bundle/PaymentBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/PaymentBundle/DependencyInjection/Configuration.php index 6c26b7a571..f8c4d88ded 100644 --- a/src/Sylius/Bundle/PaymentBundle/DependencyInjection/Configuration.php +++ b/src/Sylius/Bundle/PaymentBundle/DependencyInjection/Configuration.php @@ -24,8 +24,8 @@ use Sylius\Component\Payment\Model\PaymentMethod; use Sylius\Component\Payment\Model\PaymentMethodInterface; use Sylius\Component\Payment\Model\PaymentMethodTranslation; use Sylius\Component\Payment\Model\PaymentMethodTranslationInterface; -use Sylius\Component\Resource\Factory\Factory; -use Sylius\Component\Resource\Factory\TranslatableFactory; +use Sylius\Resource\Factory\Factory; +use Sylius\Resource\Factory\TranslatableFactory; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; diff --git a/src/Sylius/Bundle/PaymentBundle/Form/Type/PaymentMethodChoiceType.php b/src/Sylius/Bundle/PaymentBundle/Form/Type/PaymentMethodChoiceType.php index 1dbf89beb4..3ebbf73301 100644 --- a/src/Sylius/Bundle/PaymentBundle/Form/Type/PaymentMethodChoiceType.php +++ b/src/Sylius/Bundle/PaymentBundle/Form/Type/PaymentMethodChoiceType.php @@ -14,8 +14,9 @@ declare(strict_types=1); namespace Sylius\Bundle\PaymentBundle\Form\Type; use Sylius\Component\Payment\Model\PaymentInterface; +use Sylius\Component\Payment\Model\PaymentMethodInterface; use Sylius\Component\Payment\Resolver\PaymentMethodsResolverInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Bridge\Doctrine\Form\DataTransformer\CollectionToArrayTransformer; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; @@ -25,6 +26,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class PaymentMethodChoiceType extends AbstractType { + /** @param RepositoryInterface $paymentMethodRepository */ public function __construct( private PaymentMethodsResolverInterface $paymentMethodsResolver, private RepositoryInterface $paymentMethodRepository, diff --git a/src/Sylius/Bundle/PaymentBundle/composer.json b/src/Sylius/Bundle/PaymentBundle/composer.json index dce6337dad..2169e620e2 100644 --- a/src/Sylius/Bundle/PaymentBundle/composer.json +++ b/src/Sylius/Bundle/PaymentBundle/composer.json @@ -28,7 +28,7 @@ "require": { "php": "^8.2", "sylius/payment": "^2.0", - "sylius/resource-bundle": "^1.10", + "sylius/resource-bundle": "^1.11", "symfony/framework-bundle": "^6.4.1" }, "conflict": { diff --git a/src/Sylius/Bundle/PayumBundle/Controller/PayumController.php b/src/Sylius/Bundle/PayumBundle/Controller/PayumController.php index 415012e803..30c4c96bbc 100644 --- a/src/Sylius/Bundle/PayumBundle/Controller/PayumController.php +++ b/src/Sylius/Bundle/PayumBundle/Controller/PayumController.php @@ -27,7 +27,7 @@ use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Core\Model\PaymentInterface; use Sylius\Component\Core\Model\PaymentMethodInterface; use Sylius\Component\Order\Repository\OrderRepositoryInterface; -use Sylius\Component\Resource\Metadata\MetadataInterface; +use Sylius\Resource\Metadata\MetadataInterface; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; diff --git a/src/Sylius/Bundle/PayumBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/PayumBundle/DependencyInjection/Configuration.php index 4522b2f1f4..d64c8eff84 100644 --- a/src/Sylius/Bundle/PayumBundle/DependencyInjection/Configuration.php +++ b/src/Sylius/Bundle/PayumBundle/DependencyInjection/Configuration.php @@ -20,7 +20,7 @@ use Sylius\Bundle\PayumBundle\Model\PaymentSecurityToken; use Sylius\Bundle\PayumBundle\Model\PaymentSecurityTokenInterface; use Sylius\Bundle\ResourceBundle\Controller\ResourceController; use Sylius\Bundle\ResourceBundle\SyliusResourceBundle; -use Sylius\Component\Resource\Factory\Factory; +use Sylius\Resource\Factory\Factory; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; diff --git a/src/Sylius/Bundle/PayumBundle/Model/GatewayConfigInterface.php b/src/Sylius/Bundle/PayumBundle/Model/GatewayConfigInterface.php index 2ae8db632f..ca7815cd98 100644 --- a/src/Sylius/Bundle/PayumBundle/Model/GatewayConfigInterface.php +++ b/src/Sylius/Bundle/PayumBundle/Model/GatewayConfigInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Bundle\PayumBundle\Model; use Payum\Core\Model\GatewayConfigInterface as BaseGatewayConfigInterface; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ResourceInterface; interface GatewayConfigInterface extends BaseGatewayConfigInterface, ResourceInterface { diff --git a/src/Sylius/Bundle/PayumBundle/Model/PaymentSecurityTokenInterface.php b/src/Sylius/Bundle/PayumBundle/Model/PaymentSecurityTokenInterface.php index 68011a4749..6a9656a8f1 100644 --- a/src/Sylius/Bundle/PayumBundle/Model/PaymentSecurityTokenInterface.php +++ b/src/Sylius/Bundle/PayumBundle/Model/PaymentSecurityTokenInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Bundle\PayumBundle\Model; use Payum\Core\Security\TokenInterface; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ResourceInterface; interface PaymentSecurityTokenInterface extends ResourceInterface, TokenInterface { diff --git a/src/Sylius/Bundle/PayumBundle/Resources/config/services/controller.xml b/src/Sylius/Bundle/PayumBundle/Resources/config/services/controller.xml index 6ef4fbee90..b2cb1aa1b2 100644 --- a/src/Sylius/Bundle/PayumBundle/Resources/config/services/controller.xml +++ b/src/Sylius/Bundle/PayumBundle/Resources/config/services/controller.xml @@ -10,7 +10,7 @@ - + sylius.order diff --git a/src/Sylius/Bundle/PayumBundle/composer.json b/src/Sylius/Bundle/PayumBundle/composer.json index 9f3b61ef4a..ef845bfafa 100644 --- a/src/Sylius/Bundle/PayumBundle/composer.json +++ b/src/Sylius/Bundle/PayumBundle/composer.json @@ -35,7 +35,7 @@ "sylius/currency": "^2.0", "sylius/order-bundle": "^2.0", "sylius/payment-bundle": "^2.0", - "sylius/resource-bundle": "^1.10", + "sylius/resource-bundle": "^1.11", "php-http/httplug": "^2.4" }, "require-dev": { diff --git a/src/Sylius/Bundle/ProductBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/ProductBundle/DependencyInjection/Configuration.php index 9d1d986342..a374c78cb8 100644 --- a/src/Sylius/Bundle/ProductBundle/DependencyInjection/Configuration.php +++ b/src/Sylius/Bundle/ProductBundle/DependencyInjection/Configuration.php @@ -59,8 +59,8 @@ use Sylius\Component\Product\Model\ProductVariant; use Sylius\Component\Product\Model\ProductVariantInterface; use Sylius\Component\Product\Model\ProductVariantTranslation; use Sylius\Component\Product\Model\ProductVariantTranslationInterface; -use Sylius\Component\Resource\Factory\Factory; -use Sylius\Component\Resource\Factory\TranslatableFactory; +use Sylius\Resource\Factory\Factory; +use Sylius\Resource\Factory\TranslatableFactory; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; diff --git a/src/Sylius/Bundle/ProductBundle/Form/DataTransformer/ProductsToProductAssociationsTransformer.php b/src/Sylius/Bundle/ProductBundle/Form/DataTransformer/ProductsToProductAssociationsTransformer.php index 58a7ebcbf5..96b9c18976 100644 --- a/src/Sylius/Bundle/ProductBundle/Form/DataTransformer/ProductsToProductAssociationsTransformer.php +++ b/src/Sylius/Bundle/ProductBundle/Form/DataTransformer/ProductsToProductAssociationsTransformer.php @@ -19,8 +19,8 @@ use Sylius\Component\Product\Model\ProductAssociationInterface; use Sylius\Component\Product\Model\ProductAssociationTypeInterface; use Sylius\Component\Product\Model\ProductInterface; use Sylius\Component\Product\Repository\ProductRepositoryInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\Form\DataTransformerInterface; use Webmozart\Assert\Assert; diff --git a/src/Sylius/Bundle/ProductBundle/Form/EventSubscriber/BuildAttributesFormSubscriber.php b/src/Sylius/Bundle/ProductBundle/Form/EventSubscriber/BuildAttributesFormSubscriber.php index 5861f1d53d..a31c7d74dd 100644 --- a/src/Sylius/Bundle/ProductBundle/Form/EventSubscriber/BuildAttributesFormSubscriber.php +++ b/src/Sylius/Bundle/ProductBundle/Form/EventSubscriber/BuildAttributesFormSubscriber.php @@ -17,8 +17,8 @@ use Sylius\Component\Attribute\Model\AttributeValueInterface; use Sylius\Component\Product\Model\ProductAttributeInterface; use Sylius\Component\Product\Model\ProductAttributeValueInterface; use Sylius\Component\Product\Model\ProductInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Translation\Provider\TranslationLocaleProviderInterface; +use Sylius\Resource\Factory\FactoryInterface; +use Sylius\Resource\Translation\Provider\TranslationLocaleProviderInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\Form\FormEvent; use Symfony\Component\Form\FormEvents; @@ -26,6 +26,7 @@ use Webmozart\Assert\Assert; final class BuildAttributesFormSubscriber implements EventSubscriberInterface { + /** @param FactoryInterface $attributeValueFactory */ public function __construct( private FactoryInterface $attributeValueFactory, private TranslationLocaleProviderInterface $localeProvider, diff --git a/src/Sylius/Bundle/ProductBundle/Form/EventSubscriber/GenerateProductVariantsSubscriber.php b/src/Sylius/Bundle/ProductBundle/Form/EventSubscriber/GenerateProductVariantsSubscriber.php index c5004e162b..b2e66b2bf1 100644 --- a/src/Sylius/Bundle/ProductBundle/Form/EventSubscriber/GenerateProductVariantsSubscriber.php +++ b/src/Sylius/Bundle/ProductBundle/Form/EventSubscriber/GenerateProductVariantsSubscriber.php @@ -15,7 +15,7 @@ namespace Sylius\Bundle\ProductBundle\Form\EventSubscriber; use Sylius\Component\Product\Generator\ProductVariantGeneratorInterface; use Sylius\Component\Product\Model\ProductInterface; -use Sylius\Component\Resource\Exception\VariantWithNoOptionsValuesException; +use Sylius\Resource\Exception\VariantWithNoOptionsValuesException; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\Form\FormEvent; use Symfony\Component\Form\FormEvents; diff --git a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductAssociationTypeChoiceType.php b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductAssociationTypeChoiceType.php index d605e485d4..f0e12434a8 100644 --- a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductAssociationTypeChoiceType.php +++ b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductAssociationTypeChoiceType.php @@ -13,7 +13,8 @@ declare(strict_types=1); namespace Sylius\Bundle\ProductBundle\Form\Type; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Component\Product\Model\ProductAssociationTypeInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Bridge\Doctrine\Form\DataTransformer\CollectionToArrayTransformer; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; @@ -23,6 +24,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class ProductAssociationTypeChoiceType extends AbstractType { + /** @param RepositoryInterface $productAssociationTypeRepository */ public function __construct(private RepositoryInterface $productAssociationTypeRepository) { } diff --git a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductAssociationsType.php b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductAssociationsType.php index fa2e6cd459..27930d5651 100644 --- a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductAssociationsType.php +++ b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductAssociationsType.php @@ -18,7 +18,7 @@ use Sylius\Bundle\ResourceBundle\Form\Type\FixedCollectionType; use Sylius\Component\Product\Model\ProductAssociationInterface; use Sylius\Component\Product\Model\ProductAssociationTypeInterface; use Sylius\Component\Product\Model\ProductInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\DataTransformerInterface; use Symfony\Component\Form\Extension\Core\Type\TextType; diff --git a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductChoiceType.php b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductChoiceType.php index d2f9451089..4e6f58b391 100644 --- a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductChoiceType.php +++ b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductChoiceType.php @@ -13,7 +13,8 @@ declare(strict_types=1); namespace Sylius\Bundle\ProductBundle\Form\Type; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Component\Product\Model\ProductInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Bridge\Doctrine\Form\DataTransformer\CollectionToArrayTransformer; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; @@ -23,6 +24,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class ProductChoiceType extends AbstractType { + /** @param RepositoryInterface $productRepository */ public function __construct(private RepositoryInterface $productRepository) { } diff --git a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductCodeChoiceType.php b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductCodeChoiceType.php index 6ab9f27175..a239bc8520 100644 --- a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductCodeChoiceType.php +++ b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductCodeChoiceType.php @@ -14,13 +14,15 @@ declare(strict_types=1); namespace Sylius\Bundle\ProductBundle\Form\Type; use Sylius\Bundle\ResourceBundle\Form\DataTransformer\ResourceToIdentifierTransformer; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Component\Product\Model\ProductInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\ReversedTransformer; final class ProductCodeChoiceType extends AbstractType { + /** @param RepositoryInterface $productRepository */ public function __construct(private RepositoryInterface $productRepository) { } diff --git a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductType.php b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductType.php index 34f95a0281..5022d71a16 100644 --- a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductType.php +++ b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductType.php @@ -18,9 +18,10 @@ use Sylius\Bundle\ProductBundle\Form\EventSubscriber\ProductOptionFieldSubscribe use Sylius\Bundle\ProductBundle\Form\EventSubscriber\SimpleProductSubscriber; use Sylius\Bundle\ResourceBundle\Form\Type\AbstractResourceType; use Sylius\Bundle\ResourceBundle\Form\Type\ResourceTranslationsType; +use Sylius\Component\Attribute\Model\AttributeValueInterface; use Sylius\Component\Product\Resolver\ProductVariantResolverInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Translation\Provider\TranslationLocaleProviderInterface; +use Sylius\Resource\Factory\FactoryInterface; +use Sylius\Resource\Translation\Provider\TranslationLocaleProviderInterface; use Symfony\Component\Form\Extension\Core\Type\CheckboxType; use Symfony\Component\Form\Extension\Core\Type\CollectionType; use Symfony\Component\Form\Extension\Core\Type\TextType; @@ -32,6 +33,7 @@ final class ProductType extends AbstractResourceType { /** * @param array|string[] $validationGroups + * @param FactoryInterface $attributeValueFactory */ public function __construct( string $dataClass, diff --git a/src/Sylius/Bundle/ProductBundle/composer.json b/src/Sylius/Bundle/ProductBundle/composer.json index ff0bd4144d..9f8315da59 100644 --- a/src/Sylius/Bundle/ProductBundle/composer.json +++ b/src/Sylius/Bundle/ProductBundle/composer.json @@ -31,7 +31,7 @@ "sylius/attribute-bundle": "^2.0", "sylius/locale-bundle": "^2.0", "sylius/product": "^2.0", - "sylius/resource-bundle": "^1.10", + "sylius/resource-bundle": "^1.11", "symfony/framework-bundle": "^6.4.1" }, "require-dev": { diff --git a/src/Sylius/Bundle/ProductBundle/spec/Form/DataTransformer/ProductsToProductAssociationsTransformerSpec.php b/src/Sylius/Bundle/ProductBundle/spec/Form/DataTransformer/ProductsToProductAssociationsTransformerSpec.php index a6fadbe26b..42c3b6672e 100644 --- a/src/Sylius/Bundle/ProductBundle/spec/Form/DataTransformer/ProductsToProductAssociationsTransformerSpec.php +++ b/src/Sylius/Bundle/ProductBundle/spec/Form/DataTransformer/ProductsToProductAssociationsTransformerSpec.php @@ -19,8 +19,8 @@ use Sylius\Component\Product\Model\ProductAssociationInterface; use Sylius\Component\Product\Model\ProductAssociationTypeInterface; use Sylius\Component\Product\Model\ProductInterface; use Sylius\Component\Product\Repository\ProductRepositoryInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\Form\DataTransformerInterface; final class ProductsToProductAssociationsTransformerSpec extends ObjectBehavior diff --git a/src/Sylius/Bundle/ProductBundle/spec/Form/EventSubscriber/BuildAttributesFormSubscriberSpec.php b/src/Sylius/Bundle/ProductBundle/spec/Form/EventSubscriber/BuildAttributesFormSubscriberSpec.php index 98dd064e49..0d8f539cd6 100644 --- a/src/Sylius/Bundle/ProductBundle/spec/Form/EventSubscriber/BuildAttributesFormSubscriberSpec.php +++ b/src/Sylius/Bundle/ProductBundle/spec/Form/EventSubscriber/BuildAttributesFormSubscriberSpec.php @@ -18,8 +18,8 @@ use PhpSpec\ObjectBehavior; use Sylius\Component\Product\Model\ProductAttributeInterface; use Sylius\Component\Product\Model\ProductAttributeValueInterface; use Sylius\Component\Product\Model\ProductInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Translation\Provider\TranslationLocaleProviderInterface; +use Sylius\Resource\Factory\FactoryInterface; +use Sylius\Resource\Translation\Provider\TranslationLocaleProviderInterface; use Symfony\Component\Form\FormEvent; use Symfony\Component\Form\FormEvents; diff --git a/src/Sylius/Bundle/ProductBundle/spec/Form/EventSubscriber/GenerateProductVariantsSubscriberSpec.php b/src/Sylius/Bundle/ProductBundle/spec/Form/EventSubscriber/GenerateProductVariantsSubscriberSpec.php index cdc054c52e..35c4be768b 100644 --- a/src/Sylius/Bundle/ProductBundle/spec/Form/EventSubscriber/GenerateProductVariantsSubscriberSpec.php +++ b/src/Sylius/Bundle/ProductBundle/spec/Form/EventSubscriber/GenerateProductVariantsSubscriberSpec.php @@ -17,7 +17,7 @@ use PhpSpec\ObjectBehavior; use Sylius\Bundle\ProductBundle\Form\EventSubscriber\GenerateProductVariantsSubscriber; use Sylius\Component\Product\Generator\ProductVariantGeneratorInterface; use Sylius\Component\Product\Model\ProductInterface; -use Sylius\Component\Resource\Exception\VariantWithNoOptionsValuesException; +use Sylius\Resource\Exception\VariantWithNoOptionsValuesException; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\Form\FormEvent; use Symfony\Component\Form\FormEvents; diff --git a/src/Sylius/Bundle/PromotionBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/PromotionBundle/DependencyInjection/Configuration.php index a21a675bca..17372c83a5 100644 --- a/src/Sylius/Bundle/PromotionBundle/DependencyInjection/Configuration.php +++ b/src/Sylius/Bundle/PromotionBundle/DependencyInjection/Configuration.php @@ -42,7 +42,7 @@ use Sylius\Component\Promotion\Model\PromotionRule; use Sylius\Component\Promotion\Model\PromotionRuleInterface; use Sylius\Component\Promotion\Model\PromotionTranslation; use Sylius\Component\Promotion\Model\PromotionTranslationInterface; -use Sylius\Component\Resource\Factory\Factory; +use Sylius\Resource\Factory\Factory; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; diff --git a/src/Sylius/Bundle/PromotionBundle/Form/Type/PromotionCouponToCodeType.php b/src/Sylius/Bundle/PromotionBundle/Form/Type/PromotionCouponToCodeType.php index 024e9515ed..977f75085f 100644 --- a/src/Sylius/Bundle/PromotionBundle/Form/Type/PromotionCouponToCodeType.php +++ b/src/Sylius/Bundle/PromotionBundle/Form/Type/PromotionCouponToCodeType.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Bundle\PromotionBundle\Form\Type; use Sylius\Component\Promotion\Model\PromotionCouponInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\DataTransformerInterface; use Symfony\Component\Form\Exception\UnexpectedTypeException; @@ -24,6 +24,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class PromotionCouponToCodeType extends AbstractType implements DataTransformerInterface { + /** @param RepositoryInterface $promotionCouponRepository */ public function __construct(private RepositoryInterface $promotionCouponRepository) { } diff --git a/src/Sylius/Bundle/PromotionBundle/composer.json b/src/Sylius/Bundle/PromotionBundle/composer.json index 4f6f5a8ce1..a4977959eb 100644 --- a/src/Sylius/Bundle/PromotionBundle/composer.json +++ b/src/Sylius/Bundle/PromotionBundle/composer.json @@ -33,7 +33,7 @@ "sylius/money-bundle": "^2.0", "sylius/promotion": "^2.0", "sylius/registry": "^1.6", - "sylius/resource-bundle": "^1.10", + "sylius/resource-bundle": "^1.11", "symfony/clock": "^6.4.0", "symfony/framework-bundle": "^6.4.1" }, diff --git a/src/Sylius/Bundle/PromotionBundle/test/src/AppBundle/Entity/PromotionSubject.php b/src/Sylius/Bundle/PromotionBundle/test/src/AppBundle/Entity/PromotionSubject.php index d69ccf4a45..1827785480 100644 --- a/src/Sylius/Bundle/PromotionBundle/test/src/AppBundle/Entity/PromotionSubject.php +++ b/src/Sylius/Bundle/PromotionBundle/test/src/AppBundle/Entity/PromotionSubject.php @@ -16,7 +16,7 @@ namespace AppBundle\Entity; use Doctrine\Common\Collections\Collection; use Sylius\Component\Promotion\Model\PromotionInterface; use Sylius\Component\Promotion\Model\PromotionSubjectInterface; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ResourceInterface; class PromotionSubject implements ResourceInterface, PromotionSubjectInterface { diff --git a/src/Sylius/Bundle/ReviewBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/ReviewBundle/DependencyInjection/Configuration.php index a955cc5651..dc46cca54b 100644 --- a/src/Sylius/Bundle/ReviewBundle/DependencyInjection/Configuration.php +++ b/src/Sylius/Bundle/ReviewBundle/DependencyInjection/Configuration.php @@ -16,9 +16,9 @@ namespace Sylius\Bundle\ReviewBundle\DependencyInjection; use Sylius\Bundle\ResourceBundle\Controller\ResourceController; use Sylius\Bundle\ResourceBundle\SyliusResourceBundle; use Sylius\Bundle\ReviewBundle\Form\Type\ReviewType; -use Sylius\Component\Resource\Factory\Factory; use Sylius\Component\Review\Model\ReviewerInterface; use Sylius\Component\Review\Model\ReviewInterface; +use Sylius\Resource\Factory\Factory; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; diff --git a/src/Sylius/Bundle/ReviewBundle/composer.json b/src/Sylius/Bundle/ReviewBundle/composer.json index 27299dff6d..3f35db51b0 100644 --- a/src/Sylius/Bundle/ReviewBundle/composer.json +++ b/src/Sylius/Bundle/ReviewBundle/composer.json @@ -41,7 +41,7 @@ "php": "^8.2", "stof/doctrine-extensions-bundle": "^1.4", "sylius/mailer-bundle": "^2.0", - "sylius/resource-bundle": "^1.10", + "sylius/resource-bundle": "^1.11", "sylius/review": "^2.0", "sylius/user-bundle": "^2.0", "symfony/framework-bundle": "^6.4.1" diff --git a/src/Sylius/Bundle/ShippingBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/ShippingBundle/DependencyInjection/Configuration.php index 0fd4a3d6e0..1ed50c641a 100644 --- a/src/Sylius/Bundle/ShippingBundle/DependencyInjection/Configuration.php +++ b/src/Sylius/Bundle/ShippingBundle/DependencyInjection/Configuration.php @@ -20,8 +20,6 @@ use Sylius\Bundle\ShippingBundle\Form\Type\ShippingCategoryType; use Sylius\Bundle\ShippingBundle\Form\Type\ShippingMethodRuleType; use Sylius\Bundle\ShippingBundle\Form\Type\ShippingMethodTranslationType; use Sylius\Bundle\ShippingBundle\Form\Type\ShippingMethodType; -use Sylius\Component\Resource\Factory\Factory; -use Sylius\Component\Resource\Factory\TranslatableFactory; use Sylius\Component\Shipping\Model\Shipment; use Sylius\Component\Shipping\Model\ShipmentInterface; use Sylius\Component\Shipping\Model\ShipmentUnit; @@ -34,6 +32,8 @@ use Sylius\Component\Shipping\Model\ShippingMethodRule; use Sylius\Component\Shipping\Model\ShippingMethodRuleInterface; use Sylius\Component\Shipping\Model\ShippingMethodTranslation; use Sylius\Component\Shipping\Model\ShippingMethodTranslationInterface; +use Sylius\Resource\Factory\Factory; +use Sylius\Resource\Factory\TranslatableFactory; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; diff --git a/src/Sylius/Bundle/ShippingBundle/Form/Type/ShippingCategoryChoiceType.php b/src/Sylius/Bundle/ShippingBundle/Form/Type/ShippingCategoryChoiceType.php index 3840659727..d656633acf 100644 --- a/src/Sylius/Bundle/ShippingBundle/Form/Type/ShippingCategoryChoiceType.php +++ b/src/Sylius/Bundle/ShippingBundle/Form/Type/ShippingCategoryChoiceType.php @@ -13,7 +13,8 @@ declare(strict_types=1); namespace Sylius\Bundle\ShippingBundle\Form\Type; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Component\Shipping\Model\ShippingCategoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Bridge\Doctrine\Form\DataTransformer\CollectionToArrayTransformer; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; @@ -23,6 +24,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class ShippingCategoryChoiceType extends AbstractType { + /** @param RepositoryInterface $shippingCategoryRepository */ public function __construct(private RepositoryInterface $shippingCategoryRepository) { } diff --git a/src/Sylius/Bundle/ShippingBundle/Form/Type/ShippingMethodChoiceType.php b/src/Sylius/Bundle/ShippingBundle/Form/Type/ShippingMethodChoiceType.php index 9b44fbcc85..459d4716ae 100644 --- a/src/Sylius/Bundle/ShippingBundle/Form/Type/ShippingMethodChoiceType.php +++ b/src/Sylius/Bundle/ShippingBundle/Form/Type/ShippingMethodChoiceType.php @@ -14,11 +14,11 @@ declare(strict_types=1); namespace Sylius\Bundle\ShippingBundle\Form\Type; use Sylius\Component\Registry\ServiceRegistryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; use Sylius\Component\Shipping\Calculator\CalculatorInterface; use Sylius\Component\Shipping\Model\ShippingMethodInterface; use Sylius\Component\Shipping\Model\ShippingSubjectInterface; use Sylius\Component\Shipping\Resolver\ShippingMethodsResolverInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Bridge\Doctrine\Form\DataTransformer\CollectionToArrayTransformer; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Exception\UnexpectedTypeException; @@ -31,6 +31,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class ShippingMethodChoiceType extends AbstractType { + /** + * @param RepositoryInterface $repository + */ public function __construct( private ShippingMethodsResolverInterface $shippingMethodsResolver, private ServiceRegistryInterface $calculators, diff --git a/src/Sylius/Bundle/ShippingBundle/composer.json b/src/Sylius/Bundle/ShippingBundle/composer.json index fe9433b7bf..22e080eac7 100644 --- a/src/Sylius/Bundle/ShippingBundle/composer.json +++ b/src/Sylius/Bundle/ShippingBundle/composer.json @@ -31,7 +31,7 @@ "php": "^8.2", "stof/doctrine-extensions-bundle": "^1.4", "sylius/money-bundle": "^2.0", - "sylius/resource-bundle": "^1.10", + "sylius/resource-bundle": "^1.11", "sylius/shipping": "^2.0", "symfony/clock": "^6.4.0", "symfony/framework-bundle": "^6.4.1" diff --git a/src/Sylius/Bundle/ShopBundle/EventListener/OrderIntegrityChecker.php b/src/Sylius/Bundle/ShopBundle/EventListener/OrderIntegrityChecker.php index a0253c565e..cb397cc47d 100644 --- a/src/Sylius/Bundle/ShopBundle/EventListener/OrderIntegrityChecker.php +++ b/src/Sylius/Bundle/ShopBundle/EventListener/OrderIntegrityChecker.php @@ -15,8 +15,8 @@ namespace Sylius\Bundle\ShopBundle\EventListener; use Doctrine\Persistence\ObjectManager; use Sylius\Bundle\CoreBundle\Order\Checker\OrderPromotionsIntegrityCheckerInterface; -use Sylius\Bundle\ResourceBundle\Event\ResourceControllerEvent; use Sylius\Component\Core\Model\OrderInterface; +use Sylius\Resource\Symfony\EventDispatcher\GenericEvent; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\Routing\RouterInterface; use Webmozart\Assert\Assert; @@ -30,7 +30,7 @@ final class OrderIntegrityChecker implements OrderIntegrityCheckerInterface ) { } - public function check(ResourceControllerEvent $event): void + public function check(GenericEvent $event): void { $order = $event->getSubject(); @@ -42,7 +42,7 @@ final class OrderIntegrityChecker implements OrderIntegrityCheckerInterface if ($promotion = $this->orderPromotionsIntegrityChecker->check($order)) { $event->stop( 'sylius.order.promotion_integrity', - ResourceControllerEvent::TYPE_ERROR, + GenericEvent::TYPE_ERROR, ['%promotionName%' => $promotion->getName()], ); @@ -55,7 +55,7 @@ final class OrderIntegrityChecker implements OrderIntegrityCheckerInterface } if ($order->getTotal() !== $oldTotal) { - $event->stop('sylius.order.total_integrity', ResourceControllerEvent::TYPE_ERROR); + $event->stop('sylius.order.total_integrity', GenericEvent::TYPE_ERROR); $event->setResponse(new RedirectResponse($this->router->generate('sylius_shop_checkout_complete'))); $this->manager->persist($order); diff --git a/src/Sylius/Bundle/ShopBundle/EventListener/OrderIntegrityCheckerInterface.php b/src/Sylius/Bundle/ShopBundle/EventListener/OrderIntegrityCheckerInterface.php index 7c346b69ee..60901218f1 100644 --- a/src/Sylius/Bundle/ShopBundle/EventListener/OrderIntegrityCheckerInterface.php +++ b/src/Sylius/Bundle/ShopBundle/EventListener/OrderIntegrityCheckerInterface.php @@ -13,9 +13,9 @@ declare(strict_types=1); namespace Sylius\Bundle\ShopBundle\EventListener; -use Sylius\Bundle\ResourceBundle\Event\ResourceControllerEvent; +use Sylius\Resource\Symfony\EventDispatcher\GenericEvent; interface OrderIntegrityCheckerInterface { - public function check(ResourceControllerEvent $event): void; + public function check(GenericEvent $event): void; } diff --git a/src/Sylius/Bundle/ShopBundle/EventListener/OrderLocaleAssigner.php b/src/Sylius/Bundle/ShopBundle/EventListener/OrderLocaleAssigner.php index 714740dbe3..6730cb15b5 100644 --- a/src/Sylius/Bundle/ShopBundle/EventListener/OrderLocaleAssigner.php +++ b/src/Sylius/Bundle/ShopBundle/EventListener/OrderLocaleAssigner.php @@ -13,9 +13,9 @@ declare(strict_types=1); namespace Sylius\Bundle\ShopBundle\EventListener; -use Sylius\Bundle\ResourceBundle\Event\ResourceControllerEvent; use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Locale\Context\LocaleContextInterface; +use Sylius\Resource\Symfony\EventDispatcher\GenericEvent; use Webmozart\Assert\Assert; final class OrderLocaleAssigner @@ -24,7 +24,7 @@ final class OrderLocaleAssigner { } - public function assignLocale(ResourceControllerEvent $event): void + public function assignLocale(GenericEvent $event): void { $order = $event->getSubject(); diff --git a/src/Sylius/Bundle/ShopBundle/EventListener/ShopCartBlamerListener.php b/src/Sylius/Bundle/ShopBundle/EventListener/ShopCartBlamerListener.php index 8b9bc7ddb4..577a44892f 100644 --- a/src/Sylius/Bundle/ShopBundle/EventListener/ShopCartBlamerListener.php +++ b/src/Sylius/Bundle/ShopBundle/EventListener/ShopCartBlamerListener.php @@ -20,7 +20,7 @@ use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Core\Model\ShopUserInterface; use Sylius\Component\Order\Context\CartContextInterface; use Sylius\Component\Order\Context\CartNotFoundException; -use Sylius\Component\Resource\Exception\UnexpectedTypeException; +use Sylius\Resource\Exception\UnexpectedTypeException; use Symfony\Component\Security\Http\Event\InteractiveLoginEvent; final class ShopCartBlamerListener diff --git a/src/Sylius/Bundle/ShopBundle/spec/EventListener/OrderIntegrityCheckerSpec.php b/src/Sylius/Bundle/ShopBundle/spec/EventListener/OrderIntegrityCheckerSpec.php index f97d6657c5..f45a72e27c 100644 --- a/src/Sylius/Bundle/ShopBundle/spec/EventListener/OrderIntegrityCheckerSpec.php +++ b/src/Sylius/Bundle/ShopBundle/spec/EventListener/OrderIntegrityCheckerSpec.php @@ -18,10 +18,10 @@ use Doctrine\Persistence\ObjectManager; use PhpSpec\ObjectBehavior; use Prophecy\Argument; use Sylius\Bundle\CoreBundle\Order\Checker\OrderPromotionsIntegrityCheckerInterface; -use Sylius\Bundle\ResourceBundle\Event\ResourceControllerEvent; use Sylius\Bundle\ShopBundle\EventListener\OrderIntegrityCheckerInterface; use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Core\Model\PromotionInterface; +use Sylius\Resource\Symfony\EventDispatcher\GenericEvent; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\Routing\RouterInterface; @@ -44,7 +44,7 @@ final class OrderIntegrityCheckerSpec extends ObjectBehavior OrderPromotionsIntegrityCheckerInterface $orderPromotionsIntegrityChecker, OrderInterface $order, PromotionInterface $promotion, - ResourceControllerEvent $event, + GenericEvent $event, ): void { $event->getSubject()->willReturn($order); @@ -65,7 +65,7 @@ final class OrderIntegrityCheckerSpec extends ObjectBehavior OrderInterface $order, PromotionInterface $oldPromotion, PromotionInterface $newPromotion, - ResourceControllerEvent $event, + GenericEvent $event, ObjectManager $orderManager, ): void { $event->getSubject()->willReturn($order); @@ -84,7 +84,7 @@ final class OrderIntegrityCheckerSpec extends ObjectBehavior $event->stop( 'sylius.order.promotion_integrity', - ResourceControllerEvent::TYPE_ERROR, + GenericEvent::TYPE_ERROR, ['%promotionName%' => 'Christmas'], )->shouldBeCalled(); $event->setResponse(new RedirectResponse('checkout.com'))->shouldBeCalled(); @@ -100,7 +100,7 @@ final class OrderIntegrityCheckerSpec extends ObjectBehavior RouterInterface $router, OrderInterface $order, PromotionInterface $promotion, - ResourceControllerEvent $event, + GenericEvent $event, ObjectManager $orderManager, ): void { $event->getSubject()->willReturn($order); @@ -112,7 +112,7 @@ final class OrderIntegrityCheckerSpec extends ObjectBehavior $orderPromotionsIntegrityChecker->check($order)->willReturn(null); - $event->stop('sylius.order.total_integrity', ResourceControllerEvent::TYPE_ERROR)->shouldBeCalled(); + $event->stop('sylius.order.total_integrity', GenericEvent::TYPE_ERROR)->shouldBeCalled(); $event->setResponse(new RedirectResponse('checkout.com'))->shouldBeCalled(); $orderManager->persist($order)->shouldBeCalled(); @@ -126,7 +126,7 @@ final class OrderIntegrityCheckerSpec extends ObjectBehavior RouterInterface $router, OrderInterface $order, PromotionInterface $promotion, - ResourceControllerEvent $event, + GenericEvent $event, ObjectManager $orderManager, ): void { $event->getSubject()->willReturn($order); @@ -146,7 +146,7 @@ final class OrderIntegrityCheckerSpec extends ObjectBehavior $event->stop( 'sylius.order.promotion_integrity', - ResourceControllerEvent::TYPE_ERROR, + GenericEvent::TYPE_ERROR, ['%promotionName%' => 'Christmas'], )->shouldBeCalled(); $event->setResponse(new RedirectResponse('checkout.com'))->shouldBeCalled(); @@ -157,7 +157,7 @@ final class OrderIntegrityCheckerSpec extends ObjectBehavior $this->check($event); } - function it_throws_invalid_argument_exception_if_event_subject_is_not_order(ResourceControllerEvent $event): void + function it_throws_invalid_argument_exception_if_event_subject_is_not_order(GenericEvent $event): void { $event->getSubject()->willReturn(new \stdClass()); diff --git a/src/Sylius/Bundle/ShopBundle/spec/EventListener/OrderLocaleAssignerSpec.php b/src/Sylius/Bundle/ShopBundle/spec/EventListener/OrderLocaleAssignerSpec.php index f9831873ec..fa3718319a 100644 --- a/src/Sylius/Bundle/ShopBundle/spec/EventListener/OrderLocaleAssignerSpec.php +++ b/src/Sylius/Bundle/ShopBundle/spec/EventListener/OrderLocaleAssignerSpec.php @@ -14,9 +14,9 @@ declare(strict_types=1); namespace spec\Sylius\Bundle\ShopBundle\EventListener; use PhpSpec\ObjectBehavior; -use Sylius\Bundle\ResourceBundle\Event\ResourceControllerEvent; use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Locale\Context\LocaleContextInterface; +use Sylius\Resource\Symfony\EventDispatcher\GenericEvent; final class OrderLocaleAssignerSpec extends ObjectBehavior { @@ -28,7 +28,7 @@ final class OrderLocaleAssignerSpec extends ObjectBehavior function it_assigns_locale_to_an_order( LocaleContextInterface $localeContext, OrderInterface $order, - ResourceControllerEvent $event, + GenericEvent $event, ): void { $event->getSubject()->willReturn($order); $localeContext->getLocaleCode()->willReturn('pl_PL'); @@ -38,7 +38,7 @@ final class OrderLocaleAssignerSpec extends ObjectBehavior $this->assignLocale($event); } - function it_throws_invalid_argument_exception_if_subject_it_not_order(ResourceControllerEvent $event): void + function it_throws_invalid_argument_exception_if_subject_it_not_order(GenericEvent $event): void { $event->getSubject()->willReturn(new \stdClass()); diff --git a/src/Sylius/Bundle/ShopBundle/spec/EventListener/ShopCartBlamerListenerSpec.php b/src/Sylius/Bundle/ShopBundle/spec/EventListener/ShopCartBlamerListenerSpec.php index 2e8330758a..c24e7f3483 100644 --- a/src/Sylius/Bundle/ShopBundle/spec/EventListener/ShopCartBlamerListenerSpec.php +++ b/src/Sylius/Bundle/ShopBundle/spec/EventListener/ShopCartBlamerListenerSpec.php @@ -25,7 +25,7 @@ use Sylius\Component\Core\Model\ShopUserInterface; use Sylius\Component\Order\Context\CartContextInterface; use Sylius\Component\Order\Context\CartNotFoundException; use Sylius\Component\Order\Model\OrderInterface as BaseOrderInterface; -use Sylius\Component\Resource\Exception\UnexpectedTypeException; +use Sylius\Resource\Exception\UnexpectedTypeException; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; use Symfony\Component\Security\Http\Event\InteractiveLoginEvent; diff --git a/src/Sylius/Bundle/TaxationBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/TaxationBundle/DependencyInjection/Configuration.php index 714d9dfb4d..776bc4defa 100644 --- a/src/Sylius/Bundle/TaxationBundle/DependencyInjection/Configuration.php +++ b/src/Sylius/Bundle/TaxationBundle/DependencyInjection/Configuration.php @@ -17,11 +17,11 @@ use Sylius\Bundle\ResourceBundle\Controller\ResourceController; use Sylius\Bundle\ResourceBundle\SyliusResourceBundle; use Sylius\Bundle\TaxationBundle\Form\Type\TaxCategoryType; use Sylius\Bundle\TaxationBundle\Form\Type\TaxRateType; -use Sylius\Component\Resource\Factory\Factory; use Sylius\Component\Taxation\Model\TaxCategory; use Sylius\Component\Taxation\Model\TaxCategoryInterface; use Sylius\Component\Taxation\Model\TaxRate; use Sylius\Component\Taxation\Model\TaxRateInterface; +use Sylius\Resource\Factory\Factory; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; diff --git a/src/Sylius/Bundle/TaxationBundle/Form/Type/TaxCategoryChoiceType.php b/src/Sylius/Bundle/TaxationBundle/Form/Type/TaxCategoryChoiceType.php index 0ef9b9d64f..8b2d77e90e 100644 --- a/src/Sylius/Bundle/TaxationBundle/Form/Type/TaxCategoryChoiceType.php +++ b/src/Sylius/Bundle/TaxationBundle/Form/Type/TaxCategoryChoiceType.php @@ -13,7 +13,8 @@ declare(strict_types=1); namespace Sylius\Bundle\TaxationBundle\Form\Type; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Component\Taxation\Model\TaxCategoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Bridge\Doctrine\Form\DataTransformer\CollectionToArrayTransformer; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; @@ -23,6 +24,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class TaxCategoryChoiceType extends AbstractType { + /** @param RepositoryInterface $taxCategoryRepository */ public function __construct(private RepositoryInterface $taxCategoryRepository) { } diff --git a/src/Sylius/Bundle/TaxationBundle/composer.json b/src/Sylius/Bundle/TaxationBundle/composer.json index 5e5c4ebde8..fa1e3fbd7a 100644 --- a/src/Sylius/Bundle/TaxationBundle/composer.json +++ b/src/Sylius/Bundle/TaxationBundle/composer.json @@ -30,7 +30,7 @@ "php": "^8.2", "stof/doctrine-extensions-bundle": "^1.4", "sylius/registry": "^1.6", - "sylius/resource-bundle": "^1.10", + "sylius/resource-bundle": "^1.11", "sylius/taxation": "^2.0", "symfony/clock": "^6.4.0", "symfony/framework-bundle": "^6.4.1" diff --git a/src/Sylius/Bundle/TaxonomyBundle/Controller/TaxonSlugController.php b/src/Sylius/Bundle/TaxonomyBundle/Controller/TaxonSlugController.php index f2226995fc..be5d63164e 100644 --- a/src/Sylius/Bundle/TaxonomyBundle/Controller/TaxonSlugController.php +++ b/src/Sylius/Bundle/TaxonomyBundle/Controller/TaxonSlugController.php @@ -13,10 +13,10 @@ declare(strict_types=1); namespace Sylius\Bundle\TaxonomyBundle\Controller; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; use Sylius\Component\Taxonomy\Generator\TaxonSlugGeneratorInterface; use Sylius\Component\Taxonomy\Model\TaxonInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\HttpFoundation\Exception\BadRequestException; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; @@ -24,6 +24,10 @@ use Symfony\Component\HttpFoundation\Response; final class TaxonSlugController { + /** + * @param RepositoryInterface $taxonRepository + * @param FactoryInterface $taxonFactory + */ public function __construct( private TaxonSlugGeneratorInterface $taxonSlugGenerator, private RepositoryInterface $taxonRepository, diff --git a/src/Sylius/Bundle/TaxonomyBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/TaxonomyBundle/DependencyInjection/Configuration.php index 3dd3056584..c869b755a0 100644 --- a/src/Sylius/Bundle/TaxonomyBundle/DependencyInjection/Configuration.php +++ b/src/Sylius/Bundle/TaxonomyBundle/DependencyInjection/Configuration.php @@ -17,12 +17,12 @@ use Sylius\Bundle\ResourceBundle\Controller\ResourceController; use Sylius\Bundle\ResourceBundle\SyliusResourceBundle; use Sylius\Bundle\TaxonomyBundle\Form\Type\TaxonTranslationType; use Sylius\Bundle\TaxonomyBundle\Form\Type\TaxonType; -use Sylius\Component\Resource\Factory\Factory; -use Sylius\Component\Resource\Factory\TranslatableFactory; use Sylius\Component\Taxonomy\Model\Taxon; use Sylius\Component\Taxonomy\Model\TaxonInterface; use Sylius\Component\Taxonomy\Model\TaxonTranslation; use Sylius\Component\Taxonomy\Model\TaxonTranslationInterface; +use Sylius\Resource\Factory\Factory; +use Sylius\Resource\Factory\TranslatableFactory; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; diff --git a/src/Sylius/Bundle/TaxonomyBundle/composer.json b/src/Sylius/Bundle/TaxonomyBundle/composer.json index 04faf5d616..20e8e46533 100644 --- a/src/Sylius/Bundle/TaxonomyBundle/composer.json +++ b/src/Sylius/Bundle/TaxonomyBundle/composer.json @@ -30,7 +30,7 @@ "require": { "php": "^8.2", "stof/doctrine-extensions-bundle": "^1.4", - "sylius/resource-bundle": "^1.10", + "sylius/resource-bundle": "^1.11", "sylius/taxonomy": "^2.0", "symfony/framework-bundle": "^6.4.1" }, diff --git a/src/Sylius/Bundle/UserBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/UserBundle/DependencyInjection/Configuration.php index f42b9a2bdb..8cbaef3341 100644 --- a/src/Sylius/Bundle/UserBundle/DependencyInjection/Configuration.php +++ b/src/Sylius/Bundle/UserBundle/DependencyInjection/Configuration.php @@ -15,9 +15,9 @@ namespace Sylius\Bundle\UserBundle\DependencyInjection; use Sylius\Bundle\ResourceBundle\SyliusResourceBundle; use Sylius\Bundle\UserBundle\Controller\UserController; -use Sylius\Component\Resource\Factory\Factory; use Sylius\Component\User\Model\User; use Sylius\Component\User\Model\UserInterface; +use Sylius\Resource\Factory\Factory; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; diff --git a/src/Sylius/Bundle/UserBundle/EventListener/UserDeleteListener.php b/src/Sylius/Bundle/UserBundle/EventListener/UserDeleteListener.php index be712d1a48..df69e0015a 100644 --- a/src/Sylius/Bundle/UserBundle/EventListener/UserDeleteListener.php +++ b/src/Sylius/Bundle/UserBundle/EventListener/UserDeleteListener.php @@ -13,9 +13,9 @@ declare(strict_types=1); namespace Sylius\Bundle\UserBundle\EventListener; -use Sylius\Bundle\ResourceBundle\Event\ResourceControllerEvent; -use Sylius\Component\Resource\Model\ResourceInterface; use Sylius\Component\User\Model\UserInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Symfony\EventDispatcher\GenericEvent; use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface; @@ -32,7 +32,7 @@ final readonly class UserDeleteListener /** * @throws \InvalidArgumentException */ - public function deleteUser(ResourceControllerEvent $event): void + public function deleteUser(GenericEvent $event): void { $user = $event->getSubject(); diff --git a/src/Sylius/Bundle/UserBundle/Factory/UserWithEncoderFactory.php b/src/Sylius/Bundle/UserBundle/Factory/UserWithEncoderFactory.php index 310e93e3a4..04597a2f2c 100644 --- a/src/Sylius/Bundle/UserBundle/Factory/UserWithEncoderFactory.php +++ b/src/Sylius/Bundle/UserBundle/Factory/UserWithEncoderFactory.php @@ -13,8 +13,8 @@ declare(strict_types=1); namespace Sylius\Bundle\UserBundle\Factory; -use Sylius\Component\Resource\Factory\FactoryInterface; use Sylius\Component\User\Model\UserInterface; +use Sylius\Resource\Factory\FactoryInterface; use Webmozart\Assert\Assert; /** @@ -22,6 +22,7 @@ use Webmozart\Assert\Assert; */ final class UserWithEncoderFactory implements FactoryInterface { + /** @param FactoryInterface $decoratedUserFactory */ public function __construct(private FactoryInterface $decoratedUserFactory, private string $encoderName) { } diff --git a/src/Sylius/Bundle/UserBundle/Tests/DependencyInjection/SyliusUserExtensionTest.php b/src/Sylius/Bundle/UserBundle/Tests/DependencyInjection/SyliusUserExtensionTest.php index 8317f7ff94..2a31dba925 100644 --- a/src/Sylius/Bundle/UserBundle/Tests/DependencyInjection/SyliusUserExtensionTest.php +++ b/src/Sylius/Bundle/UserBundle/Tests/DependencyInjection/SyliusUserExtensionTest.php @@ -19,9 +19,9 @@ use Sylius\Bundle\UserBundle\DependencyInjection\SyliusUserExtension; use Sylius\Bundle\UserBundle\EventListener\UpdateUserEncoderListener; use Sylius\Bundle\UserBundle\EventListener\UserLastLoginSubscriber; use Sylius\Bundle\UserBundle\Factory\UserWithEncoderFactory; -use Sylius\Component\Resource\Factory\Factory; use Sylius\Component\User\Model\User; use Sylius\Component\User\Model\UserInterface; +use Sylius\Resource\Factory\Factory; final class SyliusUserExtensionTest extends AbstractExtensionTestCase { diff --git a/src/Sylius/Bundle/UserBundle/composer.json b/src/Sylius/Bundle/UserBundle/composer.json index 7aef1527da..8d5e2cf5dd 100644 --- a/src/Sylius/Bundle/UserBundle/composer.json +++ b/src/Sylius/Bundle/UserBundle/composer.json @@ -43,7 +43,7 @@ "sylius-labs/polyfill-symfony-event-dispatcher": "^1.0.1", "sylius-labs/polyfill-symfony-framework-bundle": "^1.0 || ^1.1", "sylius/mailer-bundle": "^2.0", - "sylius/resource-bundle": "^1.10", + "sylius/resource-bundle": "^1.11", "sylius/user": "^2.0", "symfony/framework-bundle": "^6.4.1", "symfony/password-hasher": "^6.4.0", diff --git a/src/Sylius/Bundle/UserBundle/spec/EventListener/UserDeleteListenerSpec.php b/src/Sylius/Bundle/UserBundle/spec/EventListener/UserDeleteListenerSpec.php index 715720539f..a19fcd0366 100644 --- a/src/Sylius/Bundle/UserBundle/spec/EventListener/UserDeleteListenerSpec.php +++ b/src/Sylius/Bundle/UserBundle/spec/EventListener/UserDeleteListenerSpec.php @@ -15,8 +15,8 @@ namespace spec\Sylius\Bundle\UserBundle\EventListener; use PhpSpec\ObjectBehavior; use Prophecy\Argument; -use Sylius\Bundle\ResourceBundle\Event\ResourceControllerEvent; use Sylius\Component\User\Model\UserInterface; +use Sylius\Resource\Symfony\EventDispatcher\GenericEvent; use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface; @@ -36,7 +36,7 @@ final class UserDeleteListenerSpec extends ObjectBehavior function it_deletes_user_if_it_is_different_than_currently_logged_one( TokenStorageInterface $tokenStorage, FlashBagInterface $flashBag, - ResourceControllerEvent $event, + GenericEvent $event, UserInterface $userToBeDeleted, UserInterface $currentlyLoggedUser, TokenInterface $tokenInterface, @@ -59,7 +59,7 @@ final class UserDeleteListenerSpec extends ObjectBehavior function it_deletes_user_if_no_user_is_logged_in( TokenStorageInterface $tokenStorage, FlashBagInterface $flashBag, - ResourceControllerEvent $event, + GenericEvent $event, UserInterface $userToBeDeleted, TokenInterface $tokenInterface, ): void { @@ -81,7 +81,7 @@ final class UserDeleteListenerSpec extends ObjectBehavior function it_deletes_user_if_there_is_no_token( TokenStorageInterface $tokenStorage, FlashBagInterface $flashBag, - ResourceControllerEvent $event, + GenericEvent $event, UserInterface $userToBeDeleted, ): void { $event->getSubject()->willReturn($userToBeDeleted); @@ -99,7 +99,7 @@ final class UserDeleteListenerSpec extends ObjectBehavior } function it_does_not_allow_to_delete_currently_logged_user( - ResourceControllerEvent $event, + GenericEvent $event, UserInterface $userToBeDeleted, UserInterface $currentlyLoggedInUser, $tokenStorage, @@ -124,7 +124,7 @@ final class UserDeleteListenerSpec extends ObjectBehavior } function it_deletes_shop_user_even_if_admin_user_has_same_id( - ResourceControllerEvent $event, + GenericEvent $event, UserInterface $userToBeDeleted, UserInterface $currentlyLoggedInUser, $tokenStorage, diff --git a/src/Sylius/Bundle/UserBundle/spec/Factory/UserWithEncoderFactorySpec.php b/src/Sylius/Bundle/UserBundle/spec/Factory/UserWithEncoderFactorySpec.php index 685906b15d..637c7063ba 100644 --- a/src/Sylius/Bundle/UserBundle/spec/Factory/UserWithEncoderFactorySpec.php +++ b/src/Sylius/Bundle/UserBundle/spec/Factory/UserWithEncoderFactorySpec.php @@ -14,8 +14,8 @@ declare(strict_types=1); namespace spec\Sylius\Bundle\UserBundle\Factory; use PhpSpec\ObjectBehavior; -use Sylius\Component\Resource\Factory\FactoryInterface; use Sylius\Component\User\Model\UserInterface; +use Sylius\Resource\Factory\FactoryInterface; final class UserWithEncoderFactorySpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Addressing/Checker/CountryProvincesDeletionChecker.php b/src/Sylius/Component/Addressing/Checker/CountryProvincesDeletionChecker.php index 47f8988ba6..907005840f 100644 --- a/src/Sylius/Component/Addressing/Checker/CountryProvincesDeletionChecker.php +++ b/src/Sylius/Component/Addressing/Checker/CountryProvincesDeletionChecker.php @@ -16,10 +16,15 @@ namespace Sylius\Component\Addressing\Checker; use Doctrine\Common\Collections\ArrayCollection; use Sylius\Component\Addressing\Model\CountryInterface; use Sylius\Component\Addressing\Model\ProvinceInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Component\Addressing\Model\ZoneMemberInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class CountryProvincesDeletionChecker implements CountryProvincesDeletionCheckerInterface { + /** + * @param RepositoryInterface $zoneMemberRepository + * @param RepositoryInterface $provinceRepository + */ public function __construct( private RepositoryInterface $zoneMemberRepository, private RepositoryInterface $provinceRepository, diff --git a/src/Sylius/Component/Addressing/Checker/ZoneDeletionChecker.php b/src/Sylius/Component/Addressing/Checker/ZoneDeletionChecker.php index c15cf66a21..0692adc332 100644 --- a/src/Sylius/Component/Addressing/Checker/ZoneDeletionChecker.php +++ b/src/Sylius/Component/Addressing/Checker/ZoneDeletionChecker.php @@ -14,10 +14,12 @@ declare(strict_types=1); namespace Sylius\Component\Addressing\Checker; use Sylius\Component\Addressing\Model\ZoneInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Component\Addressing\Model\ZoneMemberInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class ZoneDeletionChecker implements ZoneDeletionCheckerInterface { + /** @param RepositoryInterface $zoneMemberRepository */ public function __construct(private RepositoryInterface $zoneMemberRepository) { } diff --git a/src/Sylius/Component/Addressing/Factory/ZoneFactory.php b/src/Sylius/Component/Addressing/Factory/ZoneFactory.php index 64a39205e5..2c065ce3f4 100644 --- a/src/Sylius/Component/Addressing/Factory/ZoneFactory.php +++ b/src/Sylius/Component/Addressing/Factory/ZoneFactory.php @@ -15,7 +15,7 @@ namespace Sylius\Component\Addressing\Factory; use Sylius\Component\Addressing\Model\ZoneInterface; use Sylius\Component\Addressing\Model\ZoneMemberInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; /** * @template T of ZoneInterface @@ -24,8 +24,14 @@ use Sylius\Component\Resource\Factory\FactoryInterface; */ final class ZoneFactory implements ZoneFactoryInterface { - public function __construct(private FactoryInterface $factory, private FactoryInterface $zoneMemberFactory) - { + /** + * @param FactoryInterface $factory + * @param FactoryInterface $zoneMemberFactory + */ + public function __construct( + private FactoryInterface $factory, + private FactoryInterface $zoneMemberFactory, + ) { } public function createNew(): ZoneInterface diff --git a/src/Sylius/Component/Addressing/Factory/ZoneFactoryInterface.php b/src/Sylius/Component/Addressing/Factory/ZoneFactoryInterface.php index cde65be78b..d1c2a50bb4 100644 --- a/src/Sylius/Component/Addressing/Factory/ZoneFactoryInterface.php +++ b/src/Sylius/Component/Addressing/Factory/ZoneFactoryInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Addressing\Factory; use Sylius\Component\Addressing\Model\ZoneInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; /** * @template T of ZoneInterface diff --git a/src/Sylius/Component/Addressing/Matcher/ZoneMatcher.php b/src/Sylius/Component/Addressing/Matcher/ZoneMatcher.php index 2975a78b77..b4f189619d 100644 --- a/src/Sylius/Component/Addressing/Matcher/ZoneMatcher.php +++ b/src/Sylius/Component/Addressing/Matcher/ZoneMatcher.php @@ -18,7 +18,7 @@ use Sylius\Component\Addressing\Model\Scope; use Sylius\Component\Addressing\Model\ZoneInterface; use Sylius\Component\Addressing\Model\ZoneMemberInterface; use Sylius\Component\Addressing\Repository\ZoneRepositoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Webmozart\Assert\Assert; final class ZoneMatcher implements ZoneMatcherInterface diff --git a/src/Sylius/Component/Addressing/Model/Address.php b/src/Sylius/Component/Addressing/Model/Address.php index 40275eb035..f199c73631 100644 --- a/src/Sylius/Component/Addressing/Model/Address.php +++ b/src/Sylius/Component/Addressing/Model/Address.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Addressing\Model; -use Sylius\Component\Resource\Model\TimestampableTrait; +use Sylius\Resource\Model\TimestampableTrait; class Address implements AddressInterface { diff --git a/src/Sylius/Component/Addressing/Model/AddressInterface.php b/src/Sylius/Component/Addressing/Model/AddressInterface.php index 2d3d254731..19fca47832 100644 --- a/src/Sylius/Component/Addressing/Model/AddressInterface.php +++ b/src/Sylius/Component/Addressing/Model/AddressInterface.php @@ -13,8 +13,8 @@ declare(strict_types=1); namespace Sylius\Component\Addressing\Model; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\TimestampableInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\TimestampableInterface; interface AddressInterface extends TimestampableInterface, ResourceInterface { diff --git a/src/Sylius/Component/Addressing/Model/AddressLogEntry.php b/src/Sylius/Component/Addressing/Model/AddressLogEntry.php index 558562cefd..dde70ccf83 100644 --- a/src/Sylius/Component/Addressing/Model/AddressLogEntry.php +++ b/src/Sylius/Component/Addressing/Model/AddressLogEntry.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Addressing\Model; -use Sylius\Component\Resource\Model\ResourceLogEntry; +use Sylius\Resource\Model\ResourceLogEntry; class AddressLogEntry extends ResourceLogEntry { diff --git a/src/Sylius/Component/Addressing/Model/Country.php b/src/Sylius/Component/Addressing/Model/Country.php index cf3838cf8b..a7fd7a0286 100644 --- a/src/Sylius/Component/Addressing/Model/Country.php +++ b/src/Sylius/Component/Addressing/Model/Country.php @@ -15,7 +15,7 @@ namespace Sylius\Component\Addressing\Model; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; -use Sylius\Component\Resource\Model\ToggleableTrait; +use Sylius\Resource\Model\ToggleableTrait; use Symfony\Component\Intl\Countries; class Country implements CountryInterface, \Stringable diff --git a/src/Sylius/Component/Addressing/Model/CountryInterface.php b/src/Sylius/Component/Addressing/Model/CountryInterface.php index 206cc4735f..b86f428ef6 100644 --- a/src/Sylius/Component/Addressing/Model/CountryInterface.php +++ b/src/Sylius/Component/Addressing/Model/CountryInterface.php @@ -14,9 +14,9 @@ declare(strict_types=1); namespace Sylius\Component\Addressing\Model; use Doctrine\Common\Collections\Collection; -use Sylius\Component\Resource\Model\CodeAwareInterface; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\ToggleableInterface; +use Sylius\Resource\Model\CodeAwareInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ToggleableInterface; interface CountryInterface extends ToggleableInterface, ResourceInterface, CodeAwareInterface { diff --git a/src/Sylius/Component/Addressing/Model/ProvinceInterface.php b/src/Sylius/Component/Addressing/Model/ProvinceInterface.php index d2e59310bf..800a2fe6be 100644 --- a/src/Sylius/Component/Addressing/Model/ProvinceInterface.php +++ b/src/Sylius/Component/Addressing/Model/ProvinceInterface.php @@ -13,8 +13,8 @@ declare(strict_types=1); namespace Sylius\Component\Addressing\Model; -use Sylius\Component\Resource\Model\CodeAwareInterface; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\CodeAwareInterface; +use Sylius\Resource\Model\ResourceInterface; interface ProvinceInterface extends ResourceInterface, CodeAwareInterface { diff --git a/src/Sylius/Component/Addressing/Model/ZoneInterface.php b/src/Sylius/Component/Addressing/Model/ZoneInterface.php index f832acccca..92ba537013 100644 --- a/src/Sylius/Component/Addressing/Model/ZoneInterface.php +++ b/src/Sylius/Component/Addressing/Model/ZoneInterface.php @@ -14,8 +14,8 @@ declare(strict_types=1); namespace Sylius\Component\Addressing\Model; use Doctrine\Common\Collections\Collection; -use Sylius\Component\Resource\Model\CodeAwareInterface; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\CodeAwareInterface; +use Sylius\Resource\Model\ResourceInterface; interface ZoneInterface extends ResourceInterface, CodeAwareInterface { diff --git a/src/Sylius/Component/Addressing/Model/ZoneMemberInterface.php b/src/Sylius/Component/Addressing/Model/ZoneMemberInterface.php index b750351fea..6292395fca 100644 --- a/src/Sylius/Component/Addressing/Model/ZoneMemberInterface.php +++ b/src/Sylius/Component/Addressing/Model/ZoneMemberInterface.php @@ -13,8 +13,8 @@ declare(strict_types=1); namespace Sylius\Component\Addressing\Model; -use Sylius\Component\Resource\Model\CodeAwareInterface; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\CodeAwareInterface; +use Sylius\Resource\Model\ResourceInterface; interface ZoneMemberInterface extends ResourceInterface, CodeAwareInterface { diff --git a/src/Sylius/Component/Addressing/Provider/ProvinceNamingProvider.php b/src/Sylius/Component/Addressing/Provider/ProvinceNamingProvider.php index 50b2ec57b4..a70152778f 100644 --- a/src/Sylius/Component/Addressing/Provider/ProvinceNamingProvider.php +++ b/src/Sylius/Component/Addressing/Provider/ProvinceNamingProvider.php @@ -15,11 +15,12 @@ namespace Sylius\Component\Addressing\Provider; use Sylius\Component\Addressing\Model\AddressInterface; use Sylius\Component\Addressing\Model\ProvinceInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Webmozart\Assert\Assert; class ProvinceNamingProvider implements ProvinceNamingProviderInterface { + /** @param RepositoryInterface $provinceRepository */ public function __construct(private RepositoryInterface $provinceRepository) { } diff --git a/src/Sylius/Component/Addressing/Repository/AddressRepositoryInterface.php b/src/Sylius/Component/Addressing/Repository/AddressRepositoryInterface.php index 92d8911c67..73e3bd7b8a 100644 --- a/src/Sylius/Component/Addressing/Repository/AddressRepositoryInterface.php +++ b/src/Sylius/Component/Addressing/Repository/AddressRepositoryInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Addressing\Repository; use Sylius\Component\Addressing\Model\AddressInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of AddressInterface diff --git a/src/Sylius/Component/Addressing/Repository/CountryRepositoryInterface.php b/src/Sylius/Component/Addressing/Repository/CountryRepositoryInterface.php index f782ec9632..92f99a10c1 100644 --- a/src/Sylius/Component/Addressing/Repository/CountryRepositoryInterface.php +++ b/src/Sylius/Component/Addressing/Repository/CountryRepositoryInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Addressing\Repository; use Sylius\Component\Addressing\Model\CountryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of CountryInterface diff --git a/src/Sylius/Component/Addressing/Repository/ProvinceRepositoryInterface.php b/src/Sylius/Component/Addressing/Repository/ProvinceRepositoryInterface.php index 9c9ed640fd..24c8679944 100644 --- a/src/Sylius/Component/Addressing/Repository/ProvinceRepositoryInterface.php +++ b/src/Sylius/Component/Addressing/Repository/ProvinceRepositoryInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Addressing\Repository; use Sylius\Component\Addressing\Model\ProvinceInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of ProvinceInterface diff --git a/src/Sylius/Component/Addressing/Repository/ZoneMemberRepositoryInterface.php b/src/Sylius/Component/Addressing/Repository/ZoneMemberRepositoryInterface.php index 6fb5afc17e..3b0682b4c4 100644 --- a/src/Sylius/Component/Addressing/Repository/ZoneMemberRepositoryInterface.php +++ b/src/Sylius/Component/Addressing/Repository/ZoneMemberRepositoryInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Addressing\Repository; use Sylius\Component\Addressing\Model\ZoneMemberInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of ZoneMemberInterface diff --git a/src/Sylius/Component/Addressing/Repository/ZoneRepositoryInterface.php b/src/Sylius/Component/Addressing/Repository/ZoneRepositoryInterface.php index 3d09a70cf6..03eb356f93 100644 --- a/src/Sylius/Component/Addressing/Repository/ZoneRepositoryInterface.php +++ b/src/Sylius/Component/Addressing/Repository/ZoneRepositoryInterface.php @@ -16,7 +16,7 @@ namespace Sylius\Component\Addressing\Repository; use Doctrine\ORM\QueryBuilder; use Sylius\Component\Addressing\Model\AddressInterface; use Sylius\Component\Addressing\Model\ZoneInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of ZoneInterface diff --git a/src/Sylius/Component/Addressing/composer.json b/src/Sylius/Component/Addressing/composer.json index 21b8286a01..562343787c 100644 --- a/src/Sylius/Component/Addressing/composer.json +++ b/src/Sylius/Component/Addressing/composer.json @@ -28,7 +28,7 @@ "require": { "php": "^8.2", "sylius/registry": "^1.6", - "sylius/resource": "^1.10", + "sylius/resource": "^1.11", "symfony/intl": "^6.4.0" }, "require-dev": { diff --git a/src/Sylius/Component/Addressing/spec/Checker/CountryProvincesDeletionCheckerSpec.php b/src/Sylius/Component/Addressing/spec/Checker/CountryProvincesDeletionCheckerSpec.php index 4e61f141cf..05ba70d102 100644 --- a/src/Sylius/Component/Addressing/spec/Checker/CountryProvincesDeletionCheckerSpec.php +++ b/src/Sylius/Component/Addressing/spec/Checker/CountryProvincesDeletionCheckerSpec.php @@ -19,7 +19,7 @@ use Sylius\Component\Addressing\Checker\CountryProvincesDeletionCheckerInterface use Sylius\Component\Addressing\Model\CountryInterface; use Sylius\Component\Addressing\Model\ProvinceInterface; use Sylius\Component\Addressing\Model\ZoneMemberInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class CountryProvincesDeletionCheckerSpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Addressing/spec/Checker/ZoneDeletionCheckerSpec.php b/src/Sylius/Component/Addressing/spec/Checker/ZoneDeletionCheckerSpec.php index acbd06a8e9..1d762b0ac7 100644 --- a/src/Sylius/Component/Addressing/spec/Checker/ZoneDeletionCheckerSpec.php +++ b/src/Sylius/Component/Addressing/spec/Checker/ZoneDeletionCheckerSpec.php @@ -17,7 +17,7 @@ use PhpSpec\ObjectBehavior; use Sylius\Component\Addressing\Checker\ZoneDeletionCheckerInterface; use Sylius\Component\Addressing\Model\ZoneInterface; use Sylius\Component\Addressing\Model\ZoneMemberInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class ZoneDeletionCheckerSpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Addressing/spec/Factory/ZoneFactorySpec.php b/src/Sylius/Component/Addressing/spec/Factory/ZoneFactorySpec.php index 8138b0456e..ecc8def63a 100644 --- a/src/Sylius/Component/Addressing/spec/Factory/ZoneFactorySpec.php +++ b/src/Sylius/Component/Addressing/spec/Factory/ZoneFactorySpec.php @@ -18,7 +18,7 @@ use Sylius\Component\Addressing\Factory\ZoneFactory; use Sylius\Component\Addressing\Factory\ZoneFactoryInterface; use Sylius\Component\Addressing\Model\ZoneInterface; use Sylius\Component\Addressing\Model\ZoneMemberInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class ZoneFactorySpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Addressing/spec/Model/CountrySpec.php b/src/Sylius/Component/Addressing/spec/Model/CountrySpec.php index 5689b78e5d..61fe7e5d2d 100644 --- a/src/Sylius/Component/Addressing/spec/Model/CountrySpec.php +++ b/src/Sylius/Component/Addressing/spec/Model/CountrySpec.php @@ -18,8 +18,8 @@ use PhpSpec\ObjectBehavior; use Sylius\Component\Addressing\Model\Country; use Sylius\Component\Addressing\Model\CountryInterface; use Sylius\Component\Addressing\Model\ProvinceInterface; -use Sylius\Component\Resource\Model\CodeAwareInterface; -use Sylius\Component\Resource\Model\ToggleableInterface; +use Sylius\Resource\Model\CodeAwareInterface; +use Sylius\Resource\Model\ToggleableInterface; final class CountrySpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Addressing/spec/Model/ProvinceSpec.php b/src/Sylius/Component/Addressing/spec/Model/ProvinceSpec.php index 6d09658d7e..b49a46ad9d 100644 --- a/src/Sylius/Component/Addressing/spec/Model/ProvinceSpec.php +++ b/src/Sylius/Component/Addressing/spec/Model/ProvinceSpec.php @@ -17,7 +17,7 @@ use PhpSpec\ObjectBehavior; use Sylius\Component\Addressing\Model\CountryInterface; use Sylius\Component\Addressing\Model\Province; use Sylius\Component\Addressing\Model\ProvinceInterface; -use Sylius\Component\Resource\Model\CodeAwareInterface; +use Sylius\Resource\Model\CodeAwareInterface; final class ProvinceSpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Addressing/spec/Provider/ProvinceNamingProviderSpec.php b/src/Sylius/Component/Addressing/spec/Provider/ProvinceNamingProviderSpec.php index 6d27611885..a7b08c09eb 100644 --- a/src/Sylius/Component/Addressing/spec/Provider/ProvinceNamingProviderSpec.php +++ b/src/Sylius/Component/Addressing/spec/Provider/ProvinceNamingProviderSpec.php @@ -18,7 +18,7 @@ use Sylius\Component\Addressing\Model\AddressInterface; use Sylius\Component\Addressing\Model\ProvinceInterface; use Sylius\Component\Addressing\Provider\ProvinceNamingProvider; use Sylius\Component\Addressing\Provider\ProvinceNamingProviderInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class ProvinceNamingProviderSpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Attribute/Factory/AttributeFactory.php b/src/Sylius/Component/Attribute/Factory/AttributeFactory.php index 20dc99250f..30fabc8b35 100644 --- a/src/Sylius/Component/Attribute/Factory/AttributeFactory.php +++ b/src/Sylius/Component/Attribute/Factory/AttributeFactory.php @@ -16,7 +16,7 @@ namespace Sylius\Component\Attribute\Factory; use Sylius\Component\Attribute\AttributeType\AttributeTypeInterface; use Sylius\Component\Attribute\Model\AttributeInterface; use Sylius\Component\Registry\ServiceRegistryInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; /** * @template T of AttributeInterface @@ -25,8 +25,11 @@ use Sylius\Component\Resource\Factory\FactoryInterface; */ final class AttributeFactory implements AttributeFactoryInterface { - public function __construct(private FactoryInterface $factory, private ServiceRegistryInterface $attributeTypesRegistry) - { + /** @param FactoryInterface $factory */ + public function __construct( + private FactoryInterface $factory, + private ServiceRegistryInterface $attributeTypesRegistry, + ) { } public function createNew(): AttributeInterface diff --git a/src/Sylius/Component/Attribute/Factory/AttributeFactoryInterface.php b/src/Sylius/Component/Attribute/Factory/AttributeFactoryInterface.php index 738d19d006..d9769c12de 100644 --- a/src/Sylius/Component/Attribute/Factory/AttributeFactoryInterface.php +++ b/src/Sylius/Component/Attribute/Factory/AttributeFactoryInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Attribute\Factory; use Sylius\Component\Attribute\Model\AttributeInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; /** * @template T of AttributeInterface diff --git a/src/Sylius/Component/Attribute/Model/Attribute.php b/src/Sylius/Component/Attribute/Model/Attribute.php index 636166be15..724c5a9d2b 100644 --- a/src/Sylius/Component/Attribute/Model/Attribute.php +++ b/src/Sylius/Component/Attribute/Model/Attribute.php @@ -14,9 +14,9 @@ declare(strict_types=1); namespace Sylius\Component\Attribute\Model; use Sylius\Component\Attribute\AttributeType\TextAttributeType; -use Sylius\Component\Resource\Model\TimestampableTrait; -use Sylius\Component\Resource\Model\TranslatableTrait; -use Sylius\Component\Resource\Model\TranslationInterface; +use Sylius\Resource\Model\TimestampableTrait; +use Sylius\Resource\Model\TranslatableTrait; +use Sylius\Resource\Model\TranslationInterface; class Attribute implements AttributeInterface, \Stringable { diff --git a/src/Sylius/Component/Attribute/Model/AttributeInterface.php b/src/Sylius/Component/Attribute/Model/AttributeInterface.php index 161ab470fb..2f730c3502 100644 --- a/src/Sylius/Component/Attribute/Model/AttributeInterface.php +++ b/src/Sylius/Component/Attribute/Model/AttributeInterface.php @@ -13,11 +13,11 @@ declare(strict_types=1); namespace Sylius\Component\Attribute\Model; -use Sylius\Component\Resource\Model\CodeAwareInterface; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\TimestampableInterface; -use Sylius\Component\Resource\Model\TranslatableInterface; -use Sylius\Component\Resource\Model\TranslationInterface; +use Sylius\Resource\Model\CodeAwareInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\TimestampableInterface; +use Sylius\Resource\Model\TranslatableInterface; +use Sylius\Resource\Model\TranslationInterface; interface AttributeInterface extends ResourceInterface, diff --git a/src/Sylius/Component/Attribute/Model/AttributeTranslation.php b/src/Sylius/Component/Attribute/Model/AttributeTranslation.php index 8312437726..081c04c538 100644 --- a/src/Sylius/Component/Attribute/Model/AttributeTranslation.php +++ b/src/Sylius/Component/Attribute/Model/AttributeTranslation.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Attribute\Model; -use Sylius\Component\Resource\Model\AbstractTranslation; +use Sylius\Resource\Model\AbstractTranslation; class AttributeTranslation extends AbstractTranslation implements AttributeTranslationInterface { diff --git a/src/Sylius/Component/Attribute/Model/AttributeTranslationInterface.php b/src/Sylius/Component/Attribute/Model/AttributeTranslationInterface.php index 6dcfb4fbfe..6e52e09c49 100644 --- a/src/Sylius/Component/Attribute/Model/AttributeTranslationInterface.php +++ b/src/Sylius/Component/Attribute/Model/AttributeTranslationInterface.php @@ -13,8 +13,8 @@ declare(strict_types=1); namespace Sylius\Component\Attribute\Model; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\TranslationInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\TranslationInterface; interface AttributeTranslationInterface extends ResourceInterface, TranslationInterface { diff --git a/src/Sylius/Component/Attribute/Model/AttributeValueInterface.php b/src/Sylius/Component/Attribute/Model/AttributeValueInterface.php index f4a3c25112..0bf1a76fc8 100644 --- a/src/Sylius/Component/Attribute/Model/AttributeValueInterface.php +++ b/src/Sylius/Component/Attribute/Model/AttributeValueInterface.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Attribute\Model; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ResourceInterface; interface AttributeValueInterface extends ResourceInterface { diff --git a/src/Sylius/Component/Attribute/Repository/AttributeRepositoryInterface.php b/src/Sylius/Component/Attribute/Repository/AttributeRepositoryInterface.php index c3fd8c6aa7..f3dd4c422d 100644 --- a/src/Sylius/Component/Attribute/Repository/AttributeRepositoryInterface.php +++ b/src/Sylius/Component/Attribute/Repository/AttributeRepositoryInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Attribute\Repository; use Sylius\Component\Attribute\Model\AttributeInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of AttributeInterface diff --git a/src/Sylius/Component/Attribute/Repository/AttributeTranslationRepositoryInterface.php b/src/Sylius/Component/Attribute/Repository/AttributeTranslationRepositoryInterface.php index 3d2b76b728..3356c1f450 100644 --- a/src/Sylius/Component/Attribute/Repository/AttributeTranslationRepositoryInterface.php +++ b/src/Sylius/Component/Attribute/Repository/AttributeTranslationRepositoryInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Attribute\Repository; use Sylius\Component\Attribute\Model\AttributeTranslationInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of AttributeTranslationInterface diff --git a/src/Sylius/Component/Attribute/Repository/AttributeValueRepositoryInterface.php b/src/Sylius/Component/Attribute/Repository/AttributeValueRepositoryInterface.php index 574d5c410e..cbded660b5 100644 --- a/src/Sylius/Component/Attribute/Repository/AttributeValueRepositoryInterface.php +++ b/src/Sylius/Component/Attribute/Repository/AttributeValueRepositoryInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Attribute\Repository; use Sylius\Component\Attribute\Model\AttributeValueInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of AttributeValueInterface diff --git a/src/Sylius/Component/Attribute/composer.json b/src/Sylius/Component/Attribute/composer.json index 3eb6eef584..897927aa0b 100644 --- a/src/Sylius/Component/Attribute/composer.json +++ b/src/Sylius/Component/Attribute/composer.json @@ -28,7 +28,7 @@ "php": "^8.2", "doctrine/collections": "^1.6", "sylius/registry": "^1.6", - "sylius/resource": "^1.10", + "sylius/resource": "^1.11", "symfony/validator": "^6.4.0" }, "require-dev": { diff --git a/src/Sylius/Component/Attribute/spec/Factory/AttributeFactorySpec.php b/src/Sylius/Component/Attribute/spec/Factory/AttributeFactorySpec.php index 03fc540082..000886c79b 100644 --- a/src/Sylius/Component/Attribute/spec/Factory/AttributeFactorySpec.php +++ b/src/Sylius/Component/Attribute/spec/Factory/AttributeFactorySpec.php @@ -19,7 +19,7 @@ use Sylius\Component\Attribute\Factory\AttributeFactory; use Sylius\Component\Attribute\Factory\AttributeFactoryInterface; use Sylius\Component\Attribute\Model\Attribute; use Sylius\Component\Registry\ServiceRegistryInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class AttributeFactorySpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Channel/Factory/ChannelFactory.php b/src/Sylius/Component/Channel/Factory/ChannelFactory.php index aad363de1e..52f75660fb 100644 --- a/src/Sylius/Component/Channel/Factory/ChannelFactory.php +++ b/src/Sylius/Component/Channel/Factory/ChannelFactory.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Channel\Factory; use Sylius\Component\Channel\Model\ChannelInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; /** * @template T of ChannelInterface @@ -23,6 +23,7 @@ use Sylius\Component\Resource\Factory\FactoryInterface; */ final class ChannelFactory implements ChannelFactoryInterface { + /** @param FactoryInterface $defaultFactory */ public function __construct(private FactoryInterface $defaultFactory) { } diff --git a/src/Sylius/Component/Channel/Factory/ChannelFactoryInterface.php b/src/Sylius/Component/Channel/Factory/ChannelFactoryInterface.php index a84ebd8728..c7bdd6bcbd 100644 --- a/src/Sylius/Component/Channel/Factory/ChannelFactoryInterface.php +++ b/src/Sylius/Component/Channel/Factory/ChannelFactoryInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Channel\Factory; use Sylius\Component\Channel\Model\ChannelInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; /** * @template T of ChannelInterface diff --git a/src/Sylius/Component/Channel/Model/Channel.php b/src/Sylius/Component/Channel/Model/Channel.php index 04289db80c..c3627d9106 100644 --- a/src/Sylius/Component/Channel/Model/Channel.php +++ b/src/Sylius/Component/Channel/Model/Channel.php @@ -13,8 +13,8 @@ declare(strict_types=1); namespace Sylius\Component\Channel\Model; -use Sylius\Component\Resource\Model\TimestampableTrait; -use Sylius\Component\Resource\Model\ToggleableTrait; +use Sylius\Resource\Model\TimestampableTrait; +use Sylius\Resource\Model\ToggleableTrait; class Channel implements ChannelInterface, \Stringable { diff --git a/src/Sylius/Component/Channel/Model/ChannelInterface.php b/src/Sylius/Component/Channel/Model/ChannelInterface.php index 6fc9f86d35..dfbc407f8f 100644 --- a/src/Sylius/Component/Channel/Model/ChannelInterface.php +++ b/src/Sylius/Component/Channel/Model/ChannelInterface.php @@ -13,10 +13,10 @@ declare(strict_types=1); namespace Sylius\Component\Channel\Model; -use Sylius\Component\Resource\Model\CodeAwareInterface; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\TimestampableInterface; -use Sylius\Component\Resource\Model\ToggleableInterface; +use Sylius\Resource\Model\CodeAwareInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\TimestampableInterface; +use Sylius\Resource\Model\ToggleableInterface; interface ChannelInterface extends CodeAwareInterface, diff --git a/src/Sylius/Component/Channel/Repository/ChannelRepositoryInterface.php b/src/Sylius/Component/Channel/Repository/ChannelRepositoryInterface.php index 9ed873a237..8927f3cfee 100644 --- a/src/Sylius/Component/Channel/Repository/ChannelRepositoryInterface.php +++ b/src/Sylius/Component/Channel/Repository/ChannelRepositoryInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Channel\Repository; use Sylius\Component\Channel\Model\ChannelInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of ChannelInterface diff --git a/src/Sylius/Component/Channel/composer.json b/src/Sylius/Component/Channel/composer.json index a8a64aaf8e..86761b3e5b 100644 --- a/src/Sylius/Component/Channel/composer.json +++ b/src/Sylius/Component/Channel/composer.json @@ -28,7 +28,7 @@ ], "require": { "php": "^8.2", - "sylius/resource": "^1.10", + "sylius/resource": "^1.11", "symfony/form": "^6.4.1", "symfony/http-foundation": "^6.4.0", "laminas/laminas-stdlib": "^3.3.1" diff --git a/src/Sylius/Component/Channel/spec/Factory/ChannelFactorySpec.php b/src/Sylius/Component/Channel/spec/Factory/ChannelFactorySpec.php index ee5356da8d..084cf4f480 100644 --- a/src/Sylius/Component/Channel/spec/Factory/ChannelFactorySpec.php +++ b/src/Sylius/Component/Channel/spec/Factory/ChannelFactorySpec.php @@ -16,7 +16,7 @@ namespace spec\Sylius\Component\Channel\Factory; use PhpSpec\ObjectBehavior; use Sylius\Component\Channel\Factory\ChannelFactoryInterface; use Sylius\Component\Channel\Model\ChannelInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class ChannelFactorySpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Core/Currency/CurrencyStorage.php b/src/Sylius/Component/Core/Currency/CurrencyStorage.php index 90c9737bdd..c9730eff3e 100644 --- a/src/Sylius/Component/Core/Currency/CurrencyStorage.php +++ b/src/Sylius/Component/Core/Currency/CurrencyStorage.php @@ -15,7 +15,7 @@ namespace Sylius\Component\Core\Currency; use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Component\Currency\Model\CurrencyInterface; -use Sylius\Component\Resource\Storage\StorageInterface; +use Sylius\Resource\Storage\StorageInterface; final class CurrencyStorage implements CurrencyStorageInterface { diff --git a/src/Sylius/Component/Core/Customer/Statistics/CustomerStatisticsProvider.php b/src/Sylius/Component/Core/Customer/Statistics/CustomerStatisticsProvider.php index 975b0a3cde..03ef12e907 100644 --- a/src/Sylius/Component/Core/Customer/Statistics/CustomerStatisticsProvider.php +++ b/src/Sylius/Component/Core/Customer/Statistics/CustomerStatisticsProvider.php @@ -17,12 +17,17 @@ use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Component\Core\Model\CustomerInterface; use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Core\Repository\OrderRepositoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class CustomerStatisticsProvider implements CustomerStatisticsProviderInterface { - public function __construct(private OrderRepositoryInterface $orderRepository, private RepositoryInterface $channelRepository) - { + /** + * @param RepositoryInterface $channelRepository + */ + public function __construct( + private OrderRepositoryInterface $orderRepository, + private RepositoryInterface $channelRepository, + ) { } public function getCustomerStatistics(CustomerInterface $customer): CustomerStatistics diff --git a/src/Sylius/Component/Core/Factory/AddressFactory.php b/src/Sylius/Component/Core/Factory/AddressFactory.php index a73f585350..d87170a9e3 100644 --- a/src/Sylius/Component/Core/Factory/AddressFactory.php +++ b/src/Sylius/Component/Core/Factory/AddressFactory.php @@ -15,7 +15,7 @@ namespace Sylius\Component\Core\Factory; use Sylius\Component\Core\Model\AddressInterface; use Sylius\Component\Core\Model\CustomerInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; /** * @template T of AddressInterface @@ -24,6 +24,7 @@ use Sylius\Component\Resource\Factory\FactoryInterface; */ class AddressFactory implements AddressFactoryInterface { + /** @param FactoryInterface $decoratedFactory */ public function __construct(private FactoryInterface $decoratedFactory) { } diff --git a/src/Sylius/Component/Core/Factory/AddressFactoryInterface.php b/src/Sylius/Component/Core/Factory/AddressFactoryInterface.php index 27be0a8150..17cf644ec0 100644 --- a/src/Sylius/Component/Core/Factory/AddressFactoryInterface.php +++ b/src/Sylius/Component/Core/Factory/AddressFactoryInterface.php @@ -15,7 +15,7 @@ namespace Sylius\Component\Core\Factory; use Sylius\Component\Core\Model\AddressInterface; use Sylius\Component\Core\Model\CustomerInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; /** * @template T of AddressInterface diff --git a/src/Sylius/Component/Core/Factory/CartItemFactory.php b/src/Sylius/Component/Core/Factory/CartItemFactory.php index e7e3f14aa7..30216e7ef6 100644 --- a/src/Sylius/Component/Core/Factory/CartItemFactory.php +++ b/src/Sylius/Component/Core/Factory/CartItemFactory.php @@ -19,7 +19,7 @@ use Sylius\Component\Core\Model\ProductInterface; use Sylius\Component\Core\Model\ProductVariantInterface; use Sylius\Component\Order\Modifier\OrderItemQuantityModifierInterface; use Sylius\Component\Product\Resolver\ProductVariantResolverInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Webmozart\Assert\Assert; /** @@ -29,6 +29,7 @@ use Webmozart\Assert\Assert; */ final readonly class CartItemFactory implements CartItemFactoryInterface { + /** @param FactoryInterface $decoratedFactory */ public function __construct( private FactoryInterface $decoratedFactory, private ProductVariantResolverInterface $variantResolver, diff --git a/src/Sylius/Component/Core/Factory/CartItemFactoryInterface.php b/src/Sylius/Component/Core/Factory/CartItemFactoryInterface.php index 614361204c..d46d36dd59 100644 --- a/src/Sylius/Component/Core/Factory/CartItemFactoryInterface.php +++ b/src/Sylius/Component/Core/Factory/CartItemFactoryInterface.php @@ -16,7 +16,7 @@ namespace Sylius\Component\Core\Factory; use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Core\Model\OrderItemInterface; use Sylius\Component\Core\Model\ProductInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; /** * @template T of OrderItemInterface diff --git a/src/Sylius/Component/Core/Factory/ChannelFactory.php b/src/Sylius/Component/Core/Factory/ChannelFactory.php index f77df4bfff..32235cb838 100644 --- a/src/Sylius/Component/Core/Factory/ChannelFactory.php +++ b/src/Sylius/Component/Core/Factory/ChannelFactory.php @@ -16,7 +16,7 @@ namespace Sylius\Component\Core\Factory; use Sylius\Component\Channel\Factory\ChannelFactoryInterface; use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Component\Core\Model\ChannelPriceHistoryConfigInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Webmozart\Assert\Assert; /** diff --git a/src/Sylius/Component/Core/Factory/ChannelPricingLogEntryFactory.php b/src/Sylius/Component/Core/Factory/ChannelPricingLogEntryFactory.php index ba6d78b98f..4698acfed1 100644 --- a/src/Sylius/Component/Core/Factory/ChannelPricingLogEntryFactory.php +++ b/src/Sylius/Component/Core/Factory/ChannelPricingLogEntryFactory.php @@ -15,7 +15,7 @@ namespace Sylius\Component\Core\Factory; use Sylius\Component\Core\Model\ChannelPricingInterface; use Sylius\Component\Core\Model\ChannelPricingLogEntryInterface; -use Sylius\Component\Resource\Exception\UnsupportedMethodException; +use Sylius\Resource\Exception\UnsupportedMethodException; /** * @template T of ChannelPricingLogEntryInterface diff --git a/src/Sylius/Component/Core/Factory/ChannelPricingLogEntryFactoryInterface.php b/src/Sylius/Component/Core/Factory/ChannelPricingLogEntryFactoryInterface.php index 1132e412b0..a983623d4a 100644 --- a/src/Sylius/Component/Core/Factory/ChannelPricingLogEntryFactoryInterface.php +++ b/src/Sylius/Component/Core/Factory/ChannelPricingLogEntryFactoryInterface.php @@ -15,7 +15,7 @@ namespace Sylius\Component\Core\Factory; use Sylius\Component\Core\Model\ChannelPricingInterface; use Sylius\Component\Core\Model\ChannelPricingLogEntryInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; /** * @template T of ChannelPricingLogEntryInterface diff --git a/src/Sylius/Component/Core/Factory/CustomerAfterCheckoutFactory.php b/src/Sylius/Component/Core/Factory/CustomerAfterCheckoutFactory.php index 9c832ea952..5f284bcacf 100644 --- a/src/Sylius/Component/Core/Factory/CustomerAfterCheckoutFactory.php +++ b/src/Sylius/Component/Core/Factory/CustomerAfterCheckoutFactory.php @@ -15,7 +15,7 @@ namespace Sylius\Component\Core\Factory; use Sylius\Component\Core\Model\CustomerInterface; use Sylius\Component\Core\Model\OrderInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; /** * @template T of CustomerInterface @@ -24,6 +24,7 @@ use Sylius\Component\Resource\Factory\FactoryInterface; */ final class CustomerAfterCheckoutFactory implements CustomerAfterCheckoutFactoryInterface { + /** @param FactoryInterface $baseCustomerFactory */ public function __construct(private FactoryInterface $baseCustomerFactory) { } diff --git a/src/Sylius/Component/Core/Factory/CustomerAfterCheckoutFactoryInterface.php b/src/Sylius/Component/Core/Factory/CustomerAfterCheckoutFactoryInterface.php index 6a628c0689..184ebfd318 100644 --- a/src/Sylius/Component/Core/Factory/CustomerAfterCheckoutFactoryInterface.php +++ b/src/Sylius/Component/Core/Factory/CustomerAfterCheckoutFactoryInterface.php @@ -15,7 +15,7 @@ namespace Sylius\Component\Core\Factory; use Sylius\Component\Core\Model\CustomerInterface; use Sylius\Component\Core\Model\OrderInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; /** * @template T of CustomerInterface diff --git a/src/Sylius/Component/Core/Factory/PaymentMethodFactory.php b/src/Sylius/Component/Core/Factory/PaymentMethodFactory.php index 5ce00d7e32..65e724513c 100644 --- a/src/Sylius/Component/Core/Factory/PaymentMethodFactory.php +++ b/src/Sylius/Component/Core/Factory/PaymentMethodFactory.php @@ -15,7 +15,7 @@ namespace Sylius\Component\Core\Factory; use Payum\Core\Model\GatewayConfigInterface; use Sylius\Component\Core\Model\PaymentMethodInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; /** * @template T of PaymentMethodInterface diff --git a/src/Sylius/Component/Core/Factory/PaymentMethodFactoryInterface.php b/src/Sylius/Component/Core/Factory/PaymentMethodFactoryInterface.php index 1ca550fde1..751d02270d 100644 --- a/src/Sylius/Component/Core/Factory/PaymentMethodFactoryInterface.php +++ b/src/Sylius/Component/Core/Factory/PaymentMethodFactoryInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Core\Factory; use Sylius\Component\Core\Model\PaymentMethodInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; /** * @template T of PaymentMethodInterface diff --git a/src/Sylius/Component/Core/Factory/PromotionActionFactory.php b/src/Sylius/Component/Core/Factory/PromotionActionFactory.php index 098450e766..cfbab690bf 100644 --- a/src/Sylius/Component/Core/Factory/PromotionActionFactory.php +++ b/src/Sylius/Component/Core/Factory/PromotionActionFactory.php @@ -19,15 +19,17 @@ use Sylius\Component\Core\Promotion\Action\ShippingPercentageDiscountPromotionAc use Sylius\Component\Core\Promotion\Action\UnitFixedDiscountPromotionActionCommand; use Sylius\Component\Core\Promotion\Action\UnitPercentageDiscountPromotionActionCommand; use Sylius\Component\Promotion\Model\PromotionActionInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; /** + * @template T of PromotionActionInterface + * * @implements PromotionActionFactoryInterface */ final class PromotionActionFactory implements PromotionActionFactoryInterface { /** - * @param FactoryInterface $decoratedFactory + * @param FactoryInterface $decoratedFactory */ public function __construct(private FactoryInterface $decoratedFactory) { diff --git a/src/Sylius/Component/Core/Factory/PromotionActionFactoryInterface.php b/src/Sylius/Component/Core/Factory/PromotionActionFactoryInterface.php index 71604391ed..25ed78e544 100644 --- a/src/Sylius/Component/Core/Factory/PromotionActionFactoryInterface.php +++ b/src/Sylius/Component/Core/Factory/PromotionActionFactoryInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Core\Factory; use Sylius\Component\Promotion\Model\PromotionActionInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; /** * @template T of PromotionActionInterface diff --git a/src/Sylius/Component/Core/Factory/PromotionRuleFactory.php b/src/Sylius/Component/Core/Factory/PromotionRuleFactory.php index ae9b8d8d3f..783e718689 100644 --- a/src/Sylius/Component/Core/Factory/PromotionRuleFactory.php +++ b/src/Sylius/Component/Core/Factory/PromotionRuleFactory.php @@ -20,13 +20,16 @@ use Sylius\Component\Core\Promotion\Checker\Rule\TotalOfItemsFromTaxonRuleChecke use Sylius\Component\Promotion\Checker\Rule\CartQuantityRuleChecker; use Sylius\Component\Promotion\Checker\Rule\ItemTotalRuleChecker; use Sylius\Component\Promotion\Model\PromotionRuleInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; /** + * @template T of PromotionRuleInterface + * * @implements PromotionRuleFactoryInterface */ final class PromotionRuleFactory implements PromotionRuleFactoryInterface { + /** @param FactoryInterface $decoratedFactory */ public function __construct(private FactoryInterface $decoratedFactory) { } diff --git a/src/Sylius/Component/Core/Factory/PromotionRuleFactoryInterface.php b/src/Sylius/Component/Core/Factory/PromotionRuleFactoryInterface.php index 5bbfedd581..dd290d31af 100644 --- a/src/Sylius/Component/Core/Factory/PromotionRuleFactoryInterface.php +++ b/src/Sylius/Component/Core/Factory/PromotionRuleFactoryInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Core\Factory; use Sylius\Component\Promotion\Model\PromotionRuleInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; /** * @template T of PromotionRuleInterface diff --git a/src/Sylius/Component/Core/Locale/LocaleStorage.php b/src/Sylius/Component/Core/Locale/LocaleStorage.php index 7e1ffd4223..ed91f5ebda 100644 --- a/src/Sylius/Component/Core/Locale/LocaleStorage.php +++ b/src/Sylius/Component/Core/Locale/LocaleStorage.php @@ -15,7 +15,7 @@ namespace Sylius\Component\Core\Locale; use Sylius\Component\Channel\Model\ChannelInterface; use Sylius\Component\Locale\Context\LocaleNotFoundException; -use Sylius\Component\Resource\Storage\StorageInterface; +use Sylius\Resource\Storage\StorageInterface; final class LocaleStorage implements LocaleStorageInterface { diff --git a/src/Sylius/Component/Core/Model/ChannelPriceHistoryConfigInterface.php b/src/Sylius/Component/Core/Model/ChannelPriceHistoryConfigInterface.php index 12893d9c07..3516537ea7 100644 --- a/src/Sylius/Component/Core/Model/ChannelPriceHistoryConfigInterface.php +++ b/src/Sylius/Component/Core/Model/ChannelPriceHistoryConfigInterface.php @@ -14,8 +14,8 @@ declare(strict_types=1); namespace Sylius\Component\Core\Model; use Doctrine\Common\Collections\Collection; -use Sylius\Component\Resource\Model\ResourceInterface; use Sylius\Component\Taxonomy\Model\TaxonInterface; +use Sylius\Resource\Model\ResourceInterface; interface ChannelPriceHistoryConfigInterface extends ResourceInterface { diff --git a/src/Sylius/Component/Core/Model/ChannelPricingInterface.php b/src/Sylius/Component/Core/Model/ChannelPricingInterface.php index 46aa12b120..fbf6bdc1e0 100644 --- a/src/Sylius/Component/Core/Model/ChannelPricingInterface.php +++ b/src/Sylius/Component/Core/Model/ChannelPricingInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Core\Model; use Doctrine\Common\Collections\Collection; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ResourceInterface; interface ChannelPricingInterface extends ResourceInterface { diff --git a/src/Sylius/Component/Core/Model/ChannelPricingLogEntryInterface.php b/src/Sylius/Component/Core/Model/ChannelPricingLogEntryInterface.php index 06f10d73bf..bf2c4fc98b 100644 --- a/src/Sylius/Component/Core/Model/ChannelPricingLogEntryInterface.php +++ b/src/Sylius/Component/Core/Model/ChannelPricingLogEntryInterface.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Core\Model; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ResourceInterface; interface ChannelPricingLogEntryInterface extends ResourceInterface { diff --git a/src/Sylius/Component/Core/Model/ImageInterface.php b/src/Sylius/Component/Core/Model/ImageInterface.php index e8490b15e7..f689306028 100644 --- a/src/Sylius/Component/Core/Model/ImageInterface.php +++ b/src/Sylius/Component/Core/Model/ImageInterface.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Core\Model; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ResourceInterface; interface ImageInterface extends ResourceInterface { diff --git a/src/Sylius/Component/Core/Model/OrderItemInterface.php b/src/Sylius/Component/Core/Model/OrderItemInterface.php index 2b4501dc09..517297e4d9 100644 --- a/src/Sylius/Component/Core/Model/OrderItemInterface.php +++ b/src/Sylius/Component/Core/Model/OrderItemInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Core\Model; use Sylius\Component\Order\Model\OrderItemInterface as BaseOrderItemInterface; -use Sylius\Component\Resource\Model\VersionedInterface; +use Sylius\Resource\Model\VersionedInterface; interface OrderItemInterface extends BaseOrderItemInterface, VersionedInterface { diff --git a/src/Sylius/Component/Core/Model/OrderItemUnit.php b/src/Sylius/Component/Core/Model/OrderItemUnit.php index cf8b6c861e..63243e6fee 100644 --- a/src/Sylius/Component/Core/Model/OrderItemUnit.php +++ b/src/Sylius/Component/Core/Model/OrderItemUnit.php @@ -15,9 +15,9 @@ namespace Sylius\Component\Core\Model; use Sylius\Component\Inventory\Model\StockableInterface; use Sylius\Component\Order\Model\OrderItemUnit as BaseOrderItemUnit; -use Sylius\Component\Resource\Model\TimestampableTrait; use Sylius\Component\Shipping\Model\ShipmentInterface as BaseShipmentInterface; use Sylius\Component\Shipping\Model\ShippableInterface; +use Sylius\Resource\Model\TimestampableTrait; use Webmozart\Assert\Assert; class OrderItemUnit extends BaseOrderItemUnit implements OrderItemUnitInterface diff --git a/src/Sylius/Component/Core/Model/OrderSequenceInterface.php b/src/Sylius/Component/Core/Model/OrderSequenceInterface.php index bc9176c129..1328531cfe 100644 --- a/src/Sylius/Component/Core/Model/OrderSequenceInterface.php +++ b/src/Sylius/Component/Core/Model/OrderSequenceInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Core\Model; use Sylius\Component\Order\Model\OrderSequenceInterface as BaseOrderSequenceInterface; -use Sylius\Component\Resource\Model\VersionedInterface; +use Sylius\Resource\Model\VersionedInterface; interface OrderSequenceInterface extends BaseOrderSequenceInterface, VersionedInterface { diff --git a/src/Sylius/Component/Core/Model/Product.php b/src/Sylius/Component/Core/Model/Product.php index 0b50026521..2cfa5df082 100644 --- a/src/Sylius/Component/Core/Model/Product.php +++ b/src/Sylius/Component/Core/Model/Product.php @@ -18,8 +18,8 @@ use Doctrine\Common\Collections\Collection; use Sylius\Component\Channel\Model\ChannelInterface as BaseChannelInterface; use Sylius\Component\Product\Model\Product as BaseProduct; use Sylius\Component\Product\Model\ProductTranslationInterface as BaseProductTranslationInterface; -use Sylius\Component\Resource\Model\TranslationInterface; use Sylius\Component\Review\Model\ReviewInterface; +use Sylius\Resource\Model\TranslationInterface; use Webmozart\Assert\Assert; class Product extends BaseProduct implements ProductInterface, ReviewableProductInterface diff --git a/src/Sylius/Component/Core/Model/ProductInterface.php b/src/Sylius/Component/Core/Model/ProductInterface.php index 13b1a571a3..80d81c10de 100644 --- a/src/Sylius/Component/Core/Model/ProductInterface.php +++ b/src/Sylius/Component/Core/Model/ProductInterface.php @@ -16,9 +16,9 @@ namespace Sylius\Component\Core\Model; use Doctrine\Common\Collections\Collection; use Sylius\Component\Channel\Model\ChannelsAwareInterface; use Sylius\Component\Product\Model\ProductInterface as BaseProductInterface; -use Sylius\Component\Resource\Model\TranslationInterface; use Sylius\Component\Review\Model\ReviewableInterface; use Sylius\Component\Review\Model\ReviewInterface; +use Sylius\Resource\Model\TranslationInterface; interface ProductInterface extends BaseProductInterface, diff --git a/src/Sylius/Component/Core/Model/ProductTaxonInterface.php b/src/Sylius/Component/Core/Model/ProductTaxonInterface.php index 0c0b7a7592..7658295ecc 100644 --- a/src/Sylius/Component/Core/Model/ProductTaxonInterface.php +++ b/src/Sylius/Component/Core/Model/ProductTaxonInterface.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Core\Model; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ResourceInterface; interface ProductTaxonInterface extends ResourceInterface, PositionAwareInterface { diff --git a/src/Sylius/Component/Core/Model/ProductVariantInterface.php b/src/Sylius/Component/Core/Model/ProductVariantInterface.php index 058d8a369c..32139c591f 100644 --- a/src/Sylius/Component/Core/Model/ProductVariantInterface.php +++ b/src/Sylius/Component/Core/Model/ProductVariantInterface.php @@ -16,11 +16,11 @@ namespace Sylius\Component\Core\Model; use Doctrine\Common\Collections\Collection; use Sylius\Component\Inventory\Model\StockableInterface; use Sylius\Component\Product\Model\ProductVariantInterface as BaseVariantInterface; -use Sylius\Component\Resource\Model\VersionedInterface; use Sylius\Component\Shipping\Model\ShippableInterface; use Sylius\Component\Shipping\Model\ShippingCategoryInterface; use Sylius\Component\Taxation\Model\TaxableInterface; use Sylius\Component\Taxation\Model\TaxCategoryInterface; +use Sylius\Resource\Model\VersionedInterface; interface ProductVariantInterface extends BaseVariantInterface, diff --git a/src/Sylius/Component/Core/Model/ShopBillingDataInterface.php b/src/Sylius/Component/Core/Model/ShopBillingDataInterface.php index 3819700a5a..829213a56f 100644 --- a/src/Sylius/Component/Core/Model/ShopBillingDataInterface.php +++ b/src/Sylius/Component/Core/Model/ShopBillingDataInterface.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Core\Model; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ResourceInterface; interface ShopBillingDataInterface extends ResourceInterface { diff --git a/src/Sylius/Component/Core/Model/ShopUser.php b/src/Sylius/Component/Core/Model/ShopUser.php index fec3190f43..1c1f4dba9b 100644 --- a/src/Sylius/Component/Core/Model/ShopUser.php +++ b/src/Sylius/Component/Core/Model/ShopUser.php @@ -14,8 +14,8 @@ declare(strict_types=1); namespace Sylius\Component\Core\Model; use Sylius\Component\Customer\Model\CustomerInterface as BaseCustomerInterface; -use Sylius\Component\Resource\Exception\UnexpectedTypeException; use Sylius\Component\User\Model\User as BaseUser; +use Sylius\Resource\Exception\UnexpectedTypeException; class ShopUser extends BaseUser implements ShopUserInterface { diff --git a/src/Sylius/Component/Core/Model/Taxon.php b/src/Sylius/Component/Core/Model/Taxon.php index 98d458d46c..c858471649 100644 --- a/src/Sylius/Component/Core/Model/Taxon.php +++ b/src/Sylius/Component/Core/Model/Taxon.php @@ -16,9 +16,9 @@ namespace Sylius\Component\Core\Model; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\Common\Comparable; -use Sylius\Component\Resource\Model\TimestampableTrait; use Sylius\Component\Taxonomy\Model\Taxon as BaseTaxon; use Sylius\Component\Taxonomy\Model\TaxonTranslation; +use Sylius\Resource\Model\TimestampableTrait; class Taxon extends BaseTaxon implements TaxonInterface, Comparable { diff --git a/src/Sylius/Component/Core/Model/TaxonInterface.php b/src/Sylius/Component/Core/Model/TaxonInterface.php index 5cced96027..7873951978 100644 --- a/src/Sylius/Component/Core/Model/TaxonInterface.php +++ b/src/Sylius/Component/Core/Model/TaxonInterface.php @@ -13,8 +13,8 @@ declare(strict_types=1); namespace Sylius\Component\Core\Model; -use Sylius\Component\Resource\Model\TimestampableInterface; use Sylius\Component\Taxonomy\Model\TaxonInterface as BaseTaxonInterface; +use Sylius\Resource\Model\TimestampableInterface; interface TaxonInterface extends BaseTaxonInterface, ImagesAwareInterface, TimestampableInterface { diff --git a/src/Sylius/Component/Core/OrderProcessing/OrderShipmentProcessor.php b/src/Sylius/Component/Core/OrderProcessing/OrderShipmentProcessor.php index b3ebd57410..b1dcf68dcc 100644 --- a/src/Sylius/Component/Core/OrderProcessing/OrderShipmentProcessor.php +++ b/src/Sylius/Component/Core/OrderProcessing/OrderShipmentProcessor.php @@ -17,14 +17,15 @@ use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Core\Model\ShipmentInterface; use Sylius\Component\Order\Model\OrderInterface as BaseOrderInterface; use Sylius\Component\Order\Processor\OrderProcessorInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; use Sylius\Component\Shipping\Exception\UnresolvedDefaultShippingMethodException; use Sylius\Component\Shipping\Resolver\DefaultShippingMethodResolverInterface; use Sylius\Component\Shipping\Resolver\ShippingMethodsResolverInterface; +use Sylius\Resource\Factory\FactoryInterface; use Webmozart\Assert\Assert; final class OrderShipmentProcessor implements OrderProcessorInterface { + /** @param FactoryInterface $shipmentFactory */ public function __construct( private DefaultShippingMethodResolverInterface $defaultShippingMethodResolver, private FactoryInterface $shipmentFactory, diff --git a/src/Sylius/Component/Core/OrderProcessing/ShippingChargesProcessor.php b/src/Sylius/Component/Core/OrderProcessing/ShippingChargesProcessor.php index fe37849297..b8ae3a086b 100644 --- a/src/Sylius/Component/Core/OrderProcessing/ShippingChargesProcessor.php +++ b/src/Sylius/Component/Core/OrderProcessing/ShippingChargesProcessor.php @@ -17,15 +17,18 @@ use Sylius\Component\Core\Model\AdjustmentInterface; use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Order\Model\OrderInterface as BaseOrderInterface; use Sylius\Component\Order\Processor\OrderProcessorInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; use Sylius\Component\Shipping\Calculator\DelegatingCalculatorInterface; use Sylius\Component\Shipping\Calculator\UndefinedShippingMethodException; +use Sylius\Resource\Factory\FactoryInterface; use Webmozart\Assert\Assert; final class ShippingChargesProcessor implements OrderProcessorInterface { - public function __construct(private FactoryInterface $adjustmentFactory, private DelegatingCalculatorInterface $shippingChargesCalculator) - { + /** @param FactoryInterface $adjustmentFactory */ + public function __construct( + private FactoryInterface $adjustmentFactory, + private DelegatingCalculatorInterface $shippingChargesCalculator, + ) { } public function process(BaseOrderInterface $order): void diff --git a/src/Sylius/Component/Core/Promotion/Action/ShippingPercentageDiscountPromotionActionCommand.php b/src/Sylius/Component/Core/Promotion/Action/ShippingPercentageDiscountPromotionActionCommand.php index 0315966582..2351e08409 100644 --- a/src/Sylius/Component/Core/Promotion/Action/ShippingPercentageDiscountPromotionActionCommand.php +++ b/src/Sylius/Component/Core/Promotion/Action/ShippingPercentageDiscountPromotionActionCommand.php @@ -20,14 +20,15 @@ use Sylius\Component\Order\Model\AdjustmentInterface as OrderAdjustmentInterface use Sylius\Component\Promotion\Action\PromotionActionCommandInterface; use Sylius\Component\Promotion\Model\PromotionInterface; use Sylius\Component\Promotion\Model\PromotionSubjectInterface; -use Sylius\Component\Resource\Exception\UnexpectedTypeException; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Exception\UnexpectedTypeException; +use Sylius\Resource\Factory\FactoryInterface; use Webmozart\Assert\Assert; final class ShippingPercentageDiscountPromotionActionCommand implements PromotionActionCommandInterface { public const TYPE = 'shipping_percentage_discount'; + /** @param FactoryInterface $adjustmentFactory */ public function __construct(private FactoryInterface $adjustmentFactory) { } diff --git a/src/Sylius/Component/Core/Promotion/Action/UnitDiscountPromotionActionCommand.php b/src/Sylius/Component/Core/Promotion/Action/UnitDiscountPromotionActionCommand.php index 53f6468c41..6d4c14634c 100644 --- a/src/Sylius/Component/Core/Promotion/Action/UnitDiscountPromotionActionCommand.php +++ b/src/Sylius/Component/Core/Promotion/Action/UnitDiscountPromotionActionCommand.php @@ -22,11 +22,12 @@ use Sylius\Component\Order\Model\AdjustmentInterface as OrderAdjustmentInterface use Sylius\Component\Promotion\Action\PromotionActionCommandInterface; use Sylius\Component\Promotion\Model\PromotionInterface; use Sylius\Component\Promotion\Model\PromotionSubjectInterface; -use Sylius\Component\Resource\Exception\UnexpectedTypeException; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Exception\UnexpectedTypeException; +use Sylius\Resource\Factory\FactoryInterface; abstract class UnitDiscountPromotionActionCommand implements PromotionActionCommandInterface { + /** @param FactoryInterface $adjustmentFactory */ public function __construct(protected FactoryInterface $adjustmentFactory) { } diff --git a/src/Sylius/Component/Core/Promotion/Action/UnitFixedDiscountPromotionActionCommand.php b/src/Sylius/Component/Core/Promotion/Action/UnitFixedDiscountPromotionActionCommand.php index ffc4043ade..8d12d1a700 100644 --- a/src/Sylius/Component/Core/Promotion/Action/UnitFixedDiscountPromotionActionCommand.php +++ b/src/Sylius/Component/Core/Promotion/Action/UnitFixedDiscountPromotionActionCommand.php @@ -13,19 +13,21 @@ declare(strict_types=1); namespace Sylius\Component\Core\Promotion\Action; +use Sylius\Component\Core\Model\AdjustmentInterface; use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Core\Model\OrderItemInterface; use Sylius\Component\Core\Model\OrderItemUnitInterface; use Sylius\Component\Core\Promotion\Filter\FilterInterface; use Sylius\Component\Promotion\Model\PromotionInterface; use Sylius\Component\Promotion\Model\PromotionSubjectInterface; -use Sylius\Component\Resource\Exception\UnexpectedTypeException; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Exception\UnexpectedTypeException; +use Sylius\Resource\Factory\FactoryInterface; final class UnitFixedDiscountPromotionActionCommand extends UnitDiscountPromotionActionCommand { public const TYPE = 'unit_fixed_discount'; + /** @param FactoryInterface $adjustmentFactory */ public function __construct( FactoryInterface $adjustmentFactory, private FilterInterface $priceRangeFilter, diff --git a/src/Sylius/Component/Core/Promotion/Action/UnitPercentageDiscountPromotionActionCommand.php b/src/Sylius/Component/Core/Promotion/Action/UnitPercentageDiscountPromotionActionCommand.php index 52c9179dbc..3021cf3c42 100644 --- a/src/Sylius/Component/Core/Promotion/Action/UnitPercentageDiscountPromotionActionCommand.php +++ b/src/Sylius/Component/Core/Promotion/Action/UnitPercentageDiscountPromotionActionCommand.php @@ -13,19 +13,21 @@ declare(strict_types=1); namespace Sylius\Component\Core\Promotion\Action; +use Sylius\Component\Core\Model\AdjustmentInterface; use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Core\Model\OrderItemInterface; use Sylius\Component\Core\Model\OrderItemUnitInterface; use Sylius\Component\Core\Promotion\Filter\FilterInterface; use Sylius\Component\Promotion\Model\PromotionInterface; use Sylius\Component\Promotion\Model\PromotionSubjectInterface; -use Sylius\Component\Resource\Exception\UnexpectedTypeException; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Exception\UnexpectedTypeException; +use Sylius\Resource\Factory\FactoryInterface; final class UnitPercentageDiscountPromotionActionCommand extends UnitDiscountPromotionActionCommand { public const TYPE = 'unit_percentage_discount'; + /** @param FactoryInterface $adjustmentFactory */ public function __construct( FactoryInterface $adjustmentFactory, private FilterInterface $priceRangeFilter, diff --git a/src/Sylius/Component/Core/Promotion/Checker/ProductInPromotionRuleChecker.php b/src/Sylius/Component/Core/Promotion/Checker/ProductInPromotionRuleChecker.php index ab32d5f1b1..4d70dfad9b 100644 --- a/src/Sylius/Component/Core/Promotion/Checker/ProductInPromotionRuleChecker.php +++ b/src/Sylius/Component/Core/Promotion/Checker/ProductInPromotionRuleChecker.php @@ -16,13 +16,11 @@ namespace Sylius\Component\Core\Promotion\Checker; use Sylius\Component\Core\Model\ProductInterface; use Sylius\Component\Core\Promotion\Checker\Rule\ContainsProductRuleChecker; use Sylius\Component\Promotion\Model\PromotionRuleInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class ProductInPromotionRuleChecker implements ProductInPromotionRuleCheckerInterface { - /** - * @param RepositoryInterface $promotionRuleRepository - */ + /** @param RepositoryInterface $promotionRuleRepository */ public function __construct(private RepositoryInterface $promotionRuleRepository) { } diff --git a/src/Sylius/Component/Core/Promotion/Checker/Rule/ShippingCountryRuleChecker.php b/src/Sylius/Component/Core/Promotion/Checker/Rule/ShippingCountryRuleChecker.php index 65e7c3abad..a089de5d3b 100644 --- a/src/Sylius/Component/Core/Promotion/Checker/Rule/ShippingCountryRuleChecker.php +++ b/src/Sylius/Component/Core/Promotion/Checker/Rule/ShippingCountryRuleChecker.php @@ -18,12 +18,13 @@ use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Promotion\Checker\Rule\RuleCheckerInterface; use Sylius\Component\Promotion\Exception\UnsupportedTypeException; use Sylius\Component\Promotion\Model\PromotionSubjectInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class ShippingCountryRuleChecker implements RuleCheckerInterface { public const TYPE = 'shipping_country'; + /** @param RepositoryInterface $countryRepository */ public function __construct(private RepositoryInterface $countryRepository) { } diff --git a/src/Sylius/Component/Core/Promotion/Checker/TaxonInPromotionRuleChecker.php b/src/Sylius/Component/Core/Promotion/Checker/TaxonInPromotionRuleChecker.php index 39dd37b0cb..74856fe42e 100644 --- a/src/Sylius/Component/Core/Promotion/Checker/TaxonInPromotionRuleChecker.php +++ b/src/Sylius/Component/Core/Promotion/Checker/TaxonInPromotionRuleChecker.php @@ -16,13 +16,11 @@ namespace Sylius\Component\Core\Promotion\Checker; use Sylius\Component\Core\Model\TaxonInterface; use Sylius\Component\Core\Promotion\Checker\Rule\TotalOfItemsFromTaxonRuleChecker; use Sylius\Component\Promotion\Model\PromotionRuleInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class TaxonInPromotionRuleChecker implements TaxonInPromotionRuleCheckerInterface { - /** - * @param RepositoryInterface $promotionRuleRepository - */ + /** @param RepositoryInterface $promotionRuleRepository */ public function __construct(private RepositoryInterface $promotionRuleRepository) { } diff --git a/src/Sylius/Component/Core/Promotion/Updater/Rule/HasTaxonRuleUpdater.php b/src/Sylius/Component/Core/Promotion/Updater/Rule/HasTaxonRuleUpdater.php index 60fafec781..f2eb201cce 100644 --- a/src/Sylius/Component/Core/Promotion/Updater/Rule/HasTaxonRuleUpdater.php +++ b/src/Sylius/Component/Core/Promotion/Updater/Rule/HasTaxonRuleUpdater.php @@ -17,12 +17,15 @@ use Doctrine\ORM\EntityManagerInterface; use Sylius\Component\Core\Model\TaxonInterface; use Sylius\Component\Core\Promotion\Checker\Rule\HasTaxonRuleChecker; use Sylius\Component\Promotion\Model\PromotionRuleInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class HasTaxonRuleUpdater implements TaxonAwareRuleUpdaterInterface { - public function __construct(private RepositoryInterface $promotionRuleRepository, private EntityManagerInterface $manager) - { + /** @param RepositoryInterface $promotionRuleRepository */ + public function __construct( + private RepositoryInterface $promotionRuleRepository, + private EntityManagerInterface $manager, + ) { } public function updateAfterDeletingTaxon(TaxonInterface $taxon): array diff --git a/src/Sylius/Component/Core/Provider/ActivePromotionsByChannelProvider.php b/src/Sylius/Component/Core/Provider/ActivePromotionsByChannelProvider.php index 57788a1353..4a85ae3a02 100644 --- a/src/Sylius/Component/Core/Provider/ActivePromotionsByChannelProvider.php +++ b/src/Sylius/Component/Core/Provider/ActivePromotionsByChannelProvider.php @@ -17,7 +17,7 @@ use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Core\Repository\PromotionRepositoryInterface; use Sylius\Component\Promotion\Model\PromotionSubjectInterface; use Sylius\Component\Promotion\Provider\PreQualifiedPromotionsProviderInterface; -use Sylius\Component\Resource\Exception\UnexpectedTypeException; +use Sylius\Resource\Exception\UnexpectedTypeException; final class ActivePromotionsByChannelProvider implements PreQualifiedPromotionsProviderInterface { diff --git a/src/Sylius/Component/Core/Provider/TranslationLocaleProvider.php b/src/Sylius/Component/Core/Provider/TranslationLocaleProvider.php index 8a16785012..9bc74c510b 100644 --- a/src/Sylius/Component/Core/Provider/TranslationLocaleProvider.php +++ b/src/Sylius/Component/Core/Provider/TranslationLocaleProvider.php @@ -15,16 +15,16 @@ namespace Sylius\Component\Core\Provider; use Sylius\Component\Locale\Model\LocaleInterface; use Sylius\Component\Locale\Provider\LocaleCollectionProviderInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; -use Sylius\Component\Resource\Translation\Provider\TranslationLocaleProviderInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Translation\Provider\TranslationLocaleProviderInterface; final class TranslationLocaleProvider implements TranslationLocaleProviderInterface { - /** - * @param RepositoryInterface|LocaleCollectionProviderInterface $localeRepository - */ - public function __construct(private LocaleCollectionProviderInterface|RepositoryInterface $localeRepository, private string $defaultLocaleCode) - { + /** @param RepositoryInterface|LocaleCollectionProviderInterface $localeRepository */ + public function __construct( + private LocaleCollectionProviderInterface|RepositoryInterface $localeRepository, + private string $defaultLocaleCode, + ) { if ($this->localeRepository instanceof RepositoryInterface) { trigger_deprecation( 'sylius/core', diff --git a/src/Sylius/Component/Core/Repository/AvatarImageRepositoryInterface.php b/src/Sylius/Component/Core/Repository/AvatarImageRepositoryInterface.php index 48f85030c8..453d1289f2 100644 --- a/src/Sylius/Component/Core/Repository/AvatarImageRepositoryInterface.php +++ b/src/Sylius/Component/Core/Repository/AvatarImageRepositoryInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Core\Repository; use Sylius\Component\Core\Model\ImageInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of ImageInterface diff --git a/src/Sylius/Component/Core/Repository/ChannelPricingLogEntryRepositoryInterface.php b/src/Sylius/Component/Core/Repository/ChannelPricingLogEntryRepositoryInterface.php index 3f2b533b13..1ac07013d7 100644 --- a/src/Sylius/Component/Core/Repository/ChannelPricingLogEntryRepositoryInterface.php +++ b/src/Sylius/Component/Core/Repository/ChannelPricingLogEntryRepositoryInterface.php @@ -16,7 +16,7 @@ namespace Sylius\Component\Core\Repository; use Doctrine\ORM\QueryBuilder; use Sylius\Component\Core\Model\ChannelPricingInterface; use Sylius\Component\Core\Model\ChannelPricingLogEntryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of ChannelPricingLogEntryInterface diff --git a/src/Sylius/Component/Core/Repository/CustomerRepositoryInterface.php b/src/Sylius/Component/Core/Repository/CustomerRepositoryInterface.php index 9faaddd856..dd3f2e032e 100644 --- a/src/Sylius/Component/Core/Repository/CustomerRepositoryInterface.php +++ b/src/Sylius/Component/Core/Repository/CustomerRepositoryInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Core\Repository; use Sylius\Component\Core\Model\CustomerInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of CustomerInterface diff --git a/src/Sylius/Component/Core/Repository/OrderItemUnitRepositoryInterface.php b/src/Sylius/Component/Core/Repository/OrderItemUnitRepositoryInterface.php index b62cce793a..749ff2009d 100644 --- a/src/Sylius/Component/Core/Repository/OrderItemUnitRepositoryInterface.php +++ b/src/Sylius/Component/Core/Repository/OrderItemUnitRepositoryInterface.php @@ -15,7 +15,7 @@ namespace Sylius\Component\Core\Repository; use Sylius\Component\Core\Model\CustomerInterface; use Sylius\Component\Core\Model\OrderItemUnitInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of OrderItemUnitInterface diff --git a/src/Sylius/Component/Core/Repository/PaymentRepositoryInterface.php b/src/Sylius/Component/Core/Repository/PaymentRepositoryInterface.php index 2489e93a53..a8aabf7c0f 100644 --- a/src/Sylius/Component/Core/Repository/PaymentRepositoryInterface.php +++ b/src/Sylius/Component/Core/Repository/PaymentRepositoryInterface.php @@ -16,7 +16,7 @@ namespace Sylius\Component\Core\Repository; use Doctrine\ORM\QueryBuilder; use Sylius\Component\Core\Model\CustomerInterface; use Sylius\Component\Core\Model\PaymentInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of PaymentInterface diff --git a/src/Sylius/Component/Core/Repository/ProductAssociationRepositoryInterface.php b/src/Sylius/Component/Core/Repository/ProductAssociationRepositoryInterface.php index 9e65d8fe75..0c2224996a 100644 --- a/src/Sylius/Component/Core/Repository/ProductAssociationRepositoryInterface.php +++ b/src/Sylius/Component/Core/Repository/ProductAssociationRepositoryInterface.php @@ -15,7 +15,7 @@ namespace Sylius\Component\Core\Repository; use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Component\Product\Model\ProductAssociationInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of ProductAssociationInterface diff --git a/src/Sylius/Component/Core/Repository/ProductReviewRepositoryInterface.php b/src/Sylius/Component/Core/Repository/ProductReviewRepositoryInterface.php index 5f81105099..da89ce7bb8 100644 --- a/src/Sylius/Component/Core/Repository/ProductReviewRepositoryInterface.php +++ b/src/Sylius/Component/Core/Repository/ProductReviewRepositoryInterface.php @@ -16,8 +16,8 @@ namespace Sylius\Component\Core\Repository; use Doctrine\ORM\QueryBuilder; use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Component\Core\Model\ProductInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; use Sylius\Component\Review\Model\ReviewInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of ReviewInterface diff --git a/src/Sylius/Component/Core/Repository/ProductTaxonRepositoryInterface.php b/src/Sylius/Component/Core/Repository/ProductTaxonRepositoryInterface.php index 6157990141..bf9b981da6 100644 --- a/src/Sylius/Component/Core/Repository/ProductTaxonRepositoryInterface.php +++ b/src/Sylius/Component/Core/Repository/ProductTaxonRepositoryInterface.php @@ -15,7 +15,7 @@ namespace Sylius\Component\Core\Repository; use Doctrine\ORM\QueryBuilder; use Sylius\Component\Core\Model\ProductTaxonInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of ProductTaxonInterface diff --git a/src/Sylius/Component/Core/Repository/ShipmentRepositoryInterface.php b/src/Sylius/Component/Core/Repository/ShipmentRepositoryInterface.php index 4461bf730c..9db0aae029 100644 --- a/src/Sylius/Component/Core/Repository/ShipmentRepositoryInterface.php +++ b/src/Sylius/Component/Core/Repository/ShipmentRepositoryInterface.php @@ -17,7 +17,7 @@ use Doctrine\ORM\QueryBuilder; use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Component\Core\Model\CustomerInterface; use Sylius\Component\Core\Model\ShipmentInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of ShipmentInterface diff --git a/src/Sylius/Component/Core/Repository/ShippingCategoryRepositoryInterface.php b/src/Sylius/Component/Core/Repository/ShippingCategoryRepositoryInterface.php index 2fafa67805..afd2fe60ca 100644 --- a/src/Sylius/Component/Core/Repository/ShippingCategoryRepositoryInterface.php +++ b/src/Sylius/Component/Core/Repository/ShippingCategoryRepositoryInterface.php @@ -14,8 +14,8 @@ declare(strict_types=1); namespace Sylius\Component\Core\Repository; use Doctrine\ORM\QueryBuilder; -use Sylius\Component\Resource\Repository\RepositoryInterface; use Sylius\Component\Shipping\Model\ShippingCategoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of ShippingCategoryInterface diff --git a/src/Sylius/Component/Core/Test/Services/DefaultChannelFactory.php b/src/Sylius/Component/Core/Test/Services/DefaultChannelFactory.php index 924a6f2928..782c38fc75 100644 --- a/src/Sylius/Component/Core/Test/Services/DefaultChannelFactory.php +++ b/src/Sylius/Component/Core/Test/Services/DefaultChannelFactory.php @@ -18,8 +18,8 @@ use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Component\Core\Model\ShopBillingData; use Sylius\Component\Currency\Model\CurrencyInterface; use Sylius\Component\Locale\Model\LocaleInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class DefaultChannelFactory implements DefaultChannelFactoryInterface { @@ -29,6 +29,13 @@ final class DefaultChannelFactory implements DefaultChannelFactoryInterface public const DEFAULT_CHANNEL_CURRENCY = 'USD'; + /** + * @param FactoryInterface $currencyFactory + * @param FactoryInterface $localeFactory + * @param RepositoryInterface $channelRepository + * @param RepositoryInterface $currencyRepository + * @param RepositoryInterface $localeRepository + */ public function __construct( private ChannelFactoryInterface $channelFactory, private FactoryInterface $currencyFactory, diff --git a/src/Sylius/Component/Core/Test/Services/DefaultUnitedStatesChannelFactory.php b/src/Sylius/Component/Core/Test/Services/DefaultUnitedStatesChannelFactory.php index 5c06475fd8..52516366df 100644 --- a/src/Sylius/Component/Core/Test/Services/DefaultUnitedStatesChannelFactory.php +++ b/src/Sylius/Component/Core/Test/Services/DefaultUnitedStatesChannelFactory.php @@ -20,8 +20,8 @@ use Sylius\Component\Channel\Factory\ChannelFactoryInterface; use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Component\Currency\Model\CurrencyInterface; use Sylius\Component\Locale\Model\LocaleInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class DefaultUnitedStatesChannelFactory implements DefaultChannelFactoryInterface { @@ -37,6 +37,16 @@ final class DefaultUnitedStatesChannelFactory implements DefaultChannelFactoryIn public const DEFAULT_CHANNEL_NAME = 'United States'; + /** + * @param RepositoryInterface $channelRepository + * @param RepositoryInterface $countryRepository + * @param RepositoryInterface $currencyRepository + * @param RepositoryInterface $localeRepository + * @param RepositoryInterface $zoneRepository + * @param FactoryInterface $countryFactory + * @param FactoryInterface $currencyFactory + * @param FactoryInterface $localeFactory + */ public function __construct( private RepositoryInterface $channelRepository, private RepositoryInterface $countryRepository, diff --git a/src/Sylius/Component/Core/Test/Tests/Taxation/Applicator/OrderItemUnitsTaxesApplicatorTest.php b/src/Sylius/Component/Core/Test/Tests/Taxation/Applicator/OrderItemUnitsTaxesApplicatorTest.php index 6f80623a2d..baff00cb08 100644 --- a/src/Sylius/Component/Core/Test/Tests/Taxation/Applicator/OrderItemUnitsTaxesApplicatorTest.php +++ b/src/Sylius/Component/Core/Test/Tests/Taxation/Applicator/OrderItemUnitsTaxesApplicatorTest.php @@ -26,18 +26,23 @@ use Sylius\Component\Core\Model\TaxRate; use Sylius\Component\Core\Model\TaxRateInterface; use Sylius\Component\Core\Taxation\Applicator\OrderItemUnitsTaxesApplicator; use Sylius\Component\Order\Factory\AdjustmentFactory; -use Sylius\Component\Resource\Factory\Factory; +use Sylius\Component\Order\Model\AdjustmentInterface; use Sylius\Component\Taxation\Calculator\DecimalCalculator; use Sylius\Component\Taxation\Calculator\DefaultCalculator; use Sylius\Component\Taxation\Resolver\TaxRateResolverInterface; +use Sylius\Resource\Factory\Factory; +use Sylius\Resource\Factory\FactoryInterface; final class OrderItemUnitsTaxesApplicatorTest extends TestCase { public function test_it_calculates_tax_with_rounding(): void { + /** @var FactoryInterface $adjustmentFactory */ + $adjustmentFactory = new Factory(Adjustment::class); + $applicator = new OrderItemUnitsTaxesApplicator( new DefaultCalculator(), - new AdjustmentFactory(new Factory(Adjustment::class)), + new AdjustmentFactory($adjustmentFactory), $this->createConfiguredMock(TaxRateResolverInterface::class, [ 'resolve' => $this->createTaxRate(), ]), @@ -54,9 +59,12 @@ final class OrderItemUnitsTaxesApplicatorTest extends TestCase public function test_it_calculates_tax_with_decimal_precision(): void { + /** @var FactoryInterface $adjustmentFactory */ + $adjustmentFactory = new Factory(Adjustment::class); + $applicator = new OrderItemUnitsTaxesApplicator( new DecimalCalculator(), - new AdjustmentFactory(new Factory(Adjustment::class)), + new AdjustmentFactory($adjustmentFactory), $this->createConfiguredMock(TaxRateResolverInterface::class, [ 'resolve' => $this->createTaxRate(), ]), diff --git a/src/Sylius/Component/Core/Test/Tests/Taxation/Applicator/OrderItemsTaxesApplicatorTest.php b/src/Sylius/Component/Core/Test/Tests/Taxation/Applicator/OrderItemsTaxesApplicatorTest.php index 206d1cf00e..fd83348674 100644 --- a/src/Sylius/Component/Core/Test/Tests/Taxation/Applicator/OrderItemsTaxesApplicatorTest.php +++ b/src/Sylius/Component/Core/Test/Tests/Taxation/Applicator/OrderItemsTaxesApplicatorTest.php @@ -27,17 +27,22 @@ use Sylius\Component\Core\Model\TaxRate; use Sylius\Component\Core\Model\TaxRateInterface; use Sylius\Component\Core\Taxation\Applicator\OrderItemsTaxesApplicator; use Sylius\Component\Order\Factory\AdjustmentFactory; -use Sylius\Component\Resource\Factory\Factory; +use Sylius\Component\Order\Model\AdjustmentInterface; use Sylius\Component\Taxation\Calculator\DecimalCalculator; use Sylius\Component\Taxation\Resolver\TaxRateResolverInterface; +use Sylius\Resource\Factory\Factory; +use Sylius\Resource\Factory\FactoryInterface; final class OrderItemsTaxesApplicatorTest extends TestCase { public function test_it_calculates_tax_with_decimal_precision(): void { + /** @var FactoryInterface $adjustmentFactory */ + $adjustmentFactory = new Factory(Adjustment::class); + $applicator = new OrderItemsTaxesApplicator( new DecimalCalculator(), - new AdjustmentFactory(new Factory(Adjustment::class)), + new AdjustmentFactory($adjustmentFactory), new IntegerDistributor(), $this->createConfiguredMock(TaxRateResolverInterface::class, [ 'resolve' => $this->createTaxRate(), diff --git a/src/Sylius/Component/Core/TokenAssigner/UniqueIdBasedOrderTokenAssigner.php b/src/Sylius/Component/Core/TokenAssigner/UniqueIdBasedOrderTokenAssigner.php index 213a44c97b..123f782112 100644 --- a/src/Sylius/Component/Core/TokenAssigner/UniqueIdBasedOrderTokenAssigner.php +++ b/src/Sylius/Component/Core/TokenAssigner/UniqueIdBasedOrderTokenAssigner.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Core\TokenAssigner; use Sylius\Component\Core\Model\OrderInterface; -use Sylius\Component\Resource\Generator\RandomnessGeneratorInterface; +use Sylius\Resource\Generator\RandomnessGeneratorInterface; final class UniqueIdBasedOrderTokenAssigner implements OrderTokenAssignerInterface { diff --git a/src/Sylius/Component/Core/Translation/TranslatableEntityLocaleAssigner.php b/src/Sylius/Component/Core/Translation/TranslatableEntityLocaleAssigner.php index e22d0d7e96..045f8a1cac 100644 --- a/src/Sylius/Component/Core/Translation/TranslatableEntityLocaleAssigner.php +++ b/src/Sylius/Component/Core/Translation/TranslatableEntityLocaleAssigner.php @@ -16,9 +16,9 @@ namespace Sylius\Component\Core\Translation; use Sylius\Component\Core\Checker\CLIContextCheckerInterface; use Sylius\Component\Locale\Context\LocaleContextInterface; use Sylius\Component\Locale\Context\LocaleNotFoundException; -use Sylius\Component\Resource\Model\TranslatableInterface; -use Sylius\Component\Resource\Translation\Provider\TranslationLocaleProviderInterface; -use Sylius\Component\Resource\Translation\TranslatableEntityLocaleAssignerInterface; +use Sylius\Resource\Model\TranslatableInterface; +use Sylius\Resource\Translation\Provider\TranslationLocaleProviderInterface; +use Sylius\Resource\Translation\TranslatableEntityLocaleAssignerInterface; final class TranslatableEntityLocaleAssigner implements TranslatableEntityLocaleAssignerInterface { diff --git a/src/Sylius/Component/Core/composer.json b/src/Sylius/Component/Core/composer.json index ed90c43324..ee9622d3e9 100644 --- a/src/Sylius/Component/Core/composer.json +++ b/src/Sylius/Component/Core/composer.json @@ -46,7 +46,7 @@ "sylius/product": "^2.0", "sylius/promotion": "^2.0", "sylius/registry": "^1.6", - "sylius/resource": "^1.10", + "sylius/resource": "^1.11", "sylius/review": "^2.0", "sylius/shipping": "^2.0", "sylius/state-machine-abstraction": "^2.0", diff --git a/src/Sylius/Component/Core/spec/Currency/CurrencyStorageSpec.php b/src/Sylius/Component/Core/spec/Currency/CurrencyStorageSpec.php index b371bbc846..a289d2a179 100644 --- a/src/Sylius/Component/Core/spec/Currency/CurrencyStorageSpec.php +++ b/src/Sylius/Component/Core/spec/Currency/CurrencyStorageSpec.php @@ -18,7 +18,7 @@ use PhpSpec\ObjectBehavior; use Sylius\Component\Core\Currency\CurrencyStorageInterface; use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Component\Currency\Model\Currency; -use Sylius\Component\Resource\Storage\StorageInterface; +use Sylius\Resource\Storage\StorageInterface; final class CurrencyStorageSpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Core/spec/Customer/Statistics/CustomerStatisticsProviderSpec.php b/src/Sylius/Component/Core/spec/Customer/Statistics/CustomerStatisticsProviderSpec.php index 1121aa9001..d8575add8a 100644 --- a/src/Sylius/Component/Core/spec/Customer/Statistics/CustomerStatisticsProviderSpec.php +++ b/src/Sylius/Component/Core/spec/Customer/Statistics/CustomerStatisticsProviderSpec.php @@ -21,7 +21,7 @@ use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Component\Core\Model\CustomerInterface; use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Core\Repository\OrderRepositoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class CustomerStatisticsProviderSpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Core/spec/Factory/AddressFactorySpec.php b/src/Sylius/Component/Core/spec/Factory/AddressFactorySpec.php index ec24257815..3a10f2c68b 100644 --- a/src/Sylius/Component/Core/spec/Factory/AddressFactorySpec.php +++ b/src/Sylius/Component/Core/spec/Factory/AddressFactorySpec.php @@ -17,7 +17,7 @@ use PhpSpec\ObjectBehavior; use Sylius\Component\Core\Factory\AddressFactoryInterface; use Sylius\Component\Core\Model\AddressInterface; use Sylius\Component\Core\Model\CustomerInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class AddressFactorySpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Core/spec/Factory/CartItemFactorySpec.php b/src/Sylius/Component/Core/spec/Factory/CartItemFactorySpec.php index c91bf3c440..99f4c625bb 100644 --- a/src/Sylius/Component/Core/spec/Factory/CartItemFactorySpec.php +++ b/src/Sylius/Component/Core/spec/Factory/CartItemFactorySpec.php @@ -21,7 +21,7 @@ use Sylius\Component\Core\Model\ProductInterface; use Sylius\Component\Core\Model\ProductVariantInterface; use Sylius\Component\Order\Modifier\OrderItemQuantityModifierInterface; use Sylius\Component\Product\Resolver\ProductVariantResolverInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class CartItemFactorySpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Core/spec/Factory/ChannelFactorySpec.php b/src/Sylius/Component/Core/spec/Factory/ChannelFactorySpec.php index 2995418320..9c6bd6918d 100644 --- a/src/Sylius/Component/Core/spec/Factory/ChannelFactorySpec.php +++ b/src/Sylius/Component/Core/spec/Factory/ChannelFactorySpec.php @@ -17,7 +17,7 @@ use PhpSpec\ObjectBehavior; use Sylius\Component\Channel\Factory\ChannelFactoryInterface; use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Component\Core\Model\ChannelPriceHistoryConfigInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class ChannelFactorySpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Core/spec/Factory/ChannelPricingLogEntryFactorySpec.php b/src/Sylius/Component/Core/spec/Factory/ChannelPricingLogEntryFactorySpec.php index 2d2534b301..6b5f391553 100644 --- a/src/Sylius/Component/Core/spec/Factory/ChannelPricingLogEntryFactorySpec.php +++ b/src/Sylius/Component/Core/spec/Factory/ChannelPricingLogEntryFactorySpec.php @@ -16,8 +16,8 @@ namespace spec\Sylius\Component\Core\Factory; use PhpSpec\ObjectBehavior; use Sylius\Component\Core\Model\ChannelPricingInterface; use Sylius\Component\Core\Model\ChannelPricingLogEntry; -use Sylius\Component\Resource\Exception\UnsupportedMethodException; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Exception\UnsupportedMethodException; +use Sylius\Resource\Model\ResourceInterface; final class ChannelPricingLogEntryFactorySpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Core/spec/Factory/CustomerAfterCheckoutFactorySpec.php b/src/Sylius/Component/Core/spec/Factory/CustomerAfterCheckoutFactorySpec.php index 87f1e7f6a4..0ac104539c 100644 --- a/src/Sylius/Component/Core/spec/Factory/CustomerAfterCheckoutFactorySpec.php +++ b/src/Sylius/Component/Core/spec/Factory/CustomerAfterCheckoutFactorySpec.php @@ -18,7 +18,7 @@ use Sylius\Component\Core\Factory\CustomerAfterCheckoutFactoryInterface; use Sylius\Component\Core\Model\AddressInterface; use Sylius\Component\Core\Model\CustomerInterface; use Sylius\Component\Core\Model\OrderInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class CustomerAfterCheckoutFactorySpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Core/spec/Factory/PaymentMethodFactorySpec.php b/src/Sylius/Component/Core/spec/Factory/PaymentMethodFactorySpec.php index 355f1c4007..a0c2590f7d 100644 --- a/src/Sylius/Component/Core/spec/Factory/PaymentMethodFactorySpec.php +++ b/src/Sylius/Component/Core/spec/Factory/PaymentMethodFactorySpec.php @@ -17,7 +17,7 @@ use Payum\Core\Model\GatewayConfigInterface; use PhpSpec\ObjectBehavior; use Sylius\Component\Core\Factory\PaymentMethodFactoryInterface; use Sylius\Component\Core\Model\PaymentMethodInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class PaymentMethodFactorySpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Core/spec/Factory/PromotionActionFactorySpec.php b/src/Sylius/Component/Core/spec/Factory/PromotionActionFactorySpec.php index dee68c41cc..3f2705f130 100644 --- a/src/Sylius/Component/Core/spec/Factory/PromotionActionFactorySpec.php +++ b/src/Sylius/Component/Core/spec/Factory/PromotionActionFactorySpec.php @@ -21,7 +21,7 @@ use Sylius\Component\Core\Promotion\Action\ShippingPercentageDiscountPromotionAc use Sylius\Component\Core\Promotion\Action\UnitFixedDiscountPromotionActionCommand; use Sylius\Component\Core\Promotion\Action\UnitPercentageDiscountPromotionActionCommand; use Sylius\Component\Promotion\Model\PromotionActionInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class PromotionActionFactorySpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Core/spec/Factory/PromotionRuleFactorySpec.php b/src/Sylius/Component/Core/spec/Factory/PromotionRuleFactorySpec.php index 175918a7e8..d9e7f7f6f4 100644 --- a/src/Sylius/Component/Core/spec/Factory/PromotionRuleFactorySpec.php +++ b/src/Sylius/Component/Core/spec/Factory/PromotionRuleFactorySpec.php @@ -22,7 +22,7 @@ use Sylius\Component\Core\Promotion\Checker\Rule\TotalOfItemsFromTaxonRuleChecke use Sylius\Component\Promotion\Checker\Rule\CartQuantityRuleChecker; use Sylius\Component\Promotion\Checker\Rule\ItemTotalRuleChecker; use Sylius\Component\Promotion\Model\PromotionRuleInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class PromotionRuleFactorySpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Core/spec/Locale/LocaleStorageSpec.php b/src/Sylius/Component/Core/spec/Locale/LocaleStorageSpec.php index 3106e5c772..a426a0f627 100644 --- a/src/Sylius/Component/Core/spec/Locale/LocaleStorageSpec.php +++ b/src/Sylius/Component/Core/spec/Locale/LocaleStorageSpec.php @@ -17,7 +17,7 @@ use PhpSpec\ObjectBehavior; use Sylius\Component\Channel\Model\ChannelInterface; use Sylius\Component\Core\Locale\LocaleStorageInterface; use Sylius\Component\Locale\Context\LocaleNotFoundException; -use Sylius\Component\Resource\Storage\StorageInterface; +use Sylius\Resource\Storage\StorageInterface; final class LocaleStorageSpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Core/spec/Model/OrderItemSpec.php b/src/Sylius/Component/Core/spec/Model/OrderItemSpec.php index 387f7347ac..4cddaac577 100644 --- a/src/Sylius/Component/Core/spec/Model/OrderItemSpec.php +++ b/src/Sylius/Component/Core/spec/Model/OrderItemSpec.php @@ -16,7 +16,7 @@ namespace spec\Sylius\Component\Core\Model; use PhpSpec\ObjectBehavior; use Sylius\Component\Core\Model\AdjustmentInterface; use Sylius\Component\Core\Model\OrderItemUnitInterface; -use Sylius\Component\Resource\Model\VersionedInterface; +use Sylius\Resource\Model\VersionedInterface; final class OrderItemSpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Core/spec/Model/OrderSequenceSpec.php b/src/Sylius/Component/Core/spec/Model/OrderSequenceSpec.php index 458be40919..6a24f9ed32 100644 --- a/src/Sylius/Component/Core/spec/Model/OrderSequenceSpec.php +++ b/src/Sylius/Component/Core/spec/Model/OrderSequenceSpec.php @@ -16,7 +16,7 @@ namespace spec\Sylius\Component\Core\Model; use PhpSpec\ObjectBehavior; use Sylius\Component\Core\Model\OrderSequenceInterface; use Sylius\Component\Order\Model\OrderSequence as BaseOrderSequence; -use Sylius\Component\Resource\Model\VersionedInterface; +use Sylius\Resource\Model\VersionedInterface; final class OrderSequenceSpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Core/spec/Model/ProductVariantSpec.php b/src/Sylius/Component/Core/spec/Model/ProductVariantSpec.php index f081142fb9..6deb5d6a82 100644 --- a/src/Sylius/Component/Core/spec/Model/ProductVariantSpec.php +++ b/src/Sylius/Component/Core/spec/Model/ProductVariantSpec.php @@ -26,11 +26,11 @@ use Sylius\Component\Core\Model\ProductImagesAwareInterface; use Sylius\Component\Core\Model\ProductVariant; use Sylius\Component\Core\Model\ProductVariantInterface; use Sylius\Component\Product\Model\ProductVariant as BaseProductVariant; -use Sylius\Component\Resource\Model\VersionedInterface; use Sylius\Component\Shipping\Model\ShippableInterface; use Sylius\Component\Shipping\Model\ShippingCategoryInterface; use Sylius\Component\Taxation\Model\TaxableInterface; use Sylius\Component\Taxation\Model\TaxCategoryInterface; +use Sylius\Resource\Model\VersionedInterface; final class ProductVariantSpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Core/spec/Model/ShopUserSpec.php b/src/Sylius/Component/Core/spec/Model/ShopUserSpec.php index 2d0ceacbae..5c71ed5350 100644 --- a/src/Sylius/Component/Core/spec/Model/ShopUserSpec.php +++ b/src/Sylius/Component/Core/spec/Model/ShopUserSpec.php @@ -16,7 +16,7 @@ namespace spec\Sylius\Component\Core\Model; use PhpSpec\ObjectBehavior; use Sylius\Component\Core\Model\CustomerInterface; use Sylius\Component\Core\Model\ShopUserInterface; -use Sylius\Component\Resource\Exception\UnexpectedTypeException; +use Sylius\Resource\Exception\UnexpectedTypeException; final class ShopUserSpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Core/spec/OrderProcessing/OrderShipmentProcessorSpec.php b/src/Sylius/Component/Core/spec/OrderProcessing/OrderShipmentProcessorSpec.php index 987e3ac67e..f7e79e5ed9 100644 --- a/src/Sylius/Component/Core/spec/OrderProcessing/OrderShipmentProcessorSpec.php +++ b/src/Sylius/Component/Core/spec/OrderProcessing/OrderShipmentProcessorSpec.php @@ -23,11 +23,11 @@ use Sylius\Component\Core\Model\OrderItemUnitInterface; use Sylius\Component\Core\Model\ProductVariantInterface; use Sylius\Component\Core\Model\ShipmentInterface; use Sylius\Component\Order\Processor\OrderProcessorInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; use Sylius\Component\Shipping\Exception\UnresolvedDefaultShippingMethodException; use Sylius\Component\Shipping\Model\ShippingMethodInterface; use Sylius\Component\Shipping\Resolver\DefaultShippingMethodResolverInterface; use Sylius\Component\Shipping\Resolver\ShippingMethodsResolverInterface; +use Sylius\Resource\Factory\FactoryInterface; final class OrderShipmentProcessorSpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Core/spec/OrderProcessing/ShippingChargesProcessorSpec.php b/src/Sylius/Component/Core/spec/OrderProcessing/ShippingChargesProcessorSpec.php index d939b38d2c..b3ab944559 100644 --- a/src/Sylius/Component/Core/spec/OrderProcessing/ShippingChargesProcessorSpec.php +++ b/src/Sylius/Component/Core/spec/OrderProcessing/ShippingChargesProcessorSpec.php @@ -20,9 +20,9 @@ use Sylius\Component\Core\Model\AdjustmentInterface; use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Core\Model\ShipmentInterface; use Sylius\Component\Order\Processor\OrderProcessorInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; use Sylius\Component\Shipping\Calculator\DelegatingCalculatorInterface; use Sylius\Component\Shipping\Model\ShippingMethodInterface; +use Sylius\Resource\Factory\FactoryInterface; final class ShippingChargesProcessorSpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Core/spec/Promotion/Action/ShippingPercentageDiscountPromotionActionCommandSpec.php b/src/Sylius/Component/Core/spec/Promotion/Action/ShippingPercentageDiscountPromotionActionCommandSpec.php index e2ee14bd44..df1b3c0bf4 100644 --- a/src/Sylius/Component/Core/spec/Promotion/Action/ShippingPercentageDiscountPromotionActionCommandSpec.php +++ b/src/Sylius/Component/Core/spec/Promotion/Action/ShippingPercentageDiscountPromotionActionCommandSpec.php @@ -21,7 +21,7 @@ use Sylius\Component\Core\Model\ShipmentInterface; use Sylius\Component\Promotion\Action\PromotionActionCommandInterface; use Sylius\Component\Promotion\Model\PromotionInterface; use Sylius\Component\Promotion\Model\PromotionSubjectInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class ShippingPercentageDiscountPromotionActionCommandSpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Core/spec/Promotion/Action/UnitFixedDiscountPromotionActionCommandSpec.php b/src/Sylius/Component/Core/spec/Promotion/Action/UnitFixedDiscountPromotionActionCommandSpec.php index 66d25ded00..6e3d2874b5 100644 --- a/src/Sylius/Component/Core/spec/Promotion/Action/UnitFixedDiscountPromotionActionCommandSpec.php +++ b/src/Sylius/Component/Core/spec/Promotion/Action/UnitFixedDiscountPromotionActionCommandSpec.php @@ -28,8 +28,8 @@ use Sylius\Component\Core\Model\PromotionInterface; use Sylius\Component\Core\Promotion\Action\UnitDiscountPromotionActionCommand; use Sylius\Component\Core\Promotion\Filter\FilterInterface; use Sylius\Component\Promotion\Model\PromotionSubjectInterface; -use Sylius\Component\Resource\Exception\UnexpectedTypeException; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Exception\UnexpectedTypeException; +use Sylius\Resource\Factory\FactoryInterface; final class UnitFixedDiscountPromotionActionCommandSpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Core/spec/Promotion/Action/UnitPercentageDiscountPromotionActionCommandSpec.php b/src/Sylius/Component/Core/spec/Promotion/Action/UnitPercentageDiscountPromotionActionCommandSpec.php index 7e6676f9ee..60ebcf8013 100644 --- a/src/Sylius/Component/Core/spec/Promotion/Action/UnitPercentageDiscountPromotionActionCommandSpec.php +++ b/src/Sylius/Component/Core/spec/Promotion/Action/UnitPercentageDiscountPromotionActionCommandSpec.php @@ -29,8 +29,8 @@ use Sylius\Component\Core\Model\PromotionInterface; use Sylius\Component\Core\Promotion\Action\UnitDiscountPromotionActionCommand; use Sylius\Component\Core\Promotion\Filter\FilterInterface; use Sylius\Component\Promotion\Model\PromotionSubjectInterface; -use Sylius\Component\Resource\Exception\UnexpectedTypeException; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Exception\UnexpectedTypeException; +use Sylius\Resource\Factory\FactoryInterface; final class UnitPercentageDiscountPromotionActionCommandSpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Core/spec/Promotion/Checker/ProductInPromotionRuleCheckerSpec.php b/src/Sylius/Component/Core/spec/Promotion/Checker/ProductInPromotionRuleCheckerSpec.php index 66e3e5c318..52e9b48426 100644 --- a/src/Sylius/Component/Core/spec/Promotion/Checker/ProductInPromotionRuleCheckerSpec.php +++ b/src/Sylius/Component/Core/spec/Promotion/Checker/ProductInPromotionRuleCheckerSpec.php @@ -17,7 +17,7 @@ use PhpSpec\ObjectBehavior; use Sylius\Component\Core\Model\ProductInterface; use Sylius\Component\Core\Promotion\Checker\ProductInPromotionRuleCheckerInterface; use Sylius\Component\Promotion\Model\PromotionRuleInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class ProductInPromotionRuleCheckerSpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Core/spec/Promotion/Checker/Rule/ContainsProductRuleCheckerSpec.php b/src/Sylius/Component/Core/spec/Promotion/Checker/Rule/ContainsProductRuleCheckerSpec.php index d5c8599702..f32775bb1f 100644 --- a/src/Sylius/Component/Core/spec/Promotion/Checker/Rule/ContainsProductRuleCheckerSpec.php +++ b/src/Sylius/Component/Core/spec/Promotion/Checker/Rule/ContainsProductRuleCheckerSpec.php @@ -20,7 +20,7 @@ use Sylius\Component\Core\Model\OrderItemInterface; use Sylius\Component\Core\Model\ProductInterface; use Sylius\Component\Promotion\Checker\Rule\RuleCheckerInterface; use Sylius\Component\Promotion\Model\PromotionSubjectInterface; -use Sylius\Component\Resource\Exception\UnexpectedTypeException; +use Sylius\Resource\Exception\UnexpectedTypeException; final class ContainsProductRuleCheckerSpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Core/spec/Promotion/Checker/Rule/NthOrderRuleCheckerSpec.php b/src/Sylius/Component/Core/spec/Promotion/Checker/Rule/NthOrderRuleCheckerSpec.php index a98391e0db..5f2c03e016 100644 --- a/src/Sylius/Component/Core/spec/Promotion/Checker/Rule/NthOrderRuleCheckerSpec.php +++ b/src/Sylius/Component/Core/spec/Promotion/Checker/Rule/NthOrderRuleCheckerSpec.php @@ -19,7 +19,7 @@ use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Core\Repository\OrderRepositoryInterface; use Sylius\Component\Promotion\Checker\Rule\RuleCheckerInterface; use Sylius\Component\Promotion\Model\PromotionSubjectInterface; -use Sylius\Component\Resource\Exception\UnexpectedTypeException; +use Sylius\Resource\Exception\UnexpectedTypeException; final class NthOrderRuleCheckerSpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Core/spec/Promotion/Checker/Rule/ShippingCountryRuleCheckerSpec.php b/src/Sylius/Component/Core/spec/Promotion/Checker/Rule/ShippingCountryRuleCheckerSpec.php index 8541322a28..960101e920 100644 --- a/src/Sylius/Component/Core/spec/Promotion/Checker/Rule/ShippingCountryRuleCheckerSpec.php +++ b/src/Sylius/Component/Core/spec/Promotion/Checker/Rule/ShippingCountryRuleCheckerSpec.php @@ -18,7 +18,7 @@ use Sylius\Component\Addressing\Model\CountryInterface; use Sylius\Component\Core\Model\AddressInterface; use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Promotion\Checker\Rule\RuleCheckerInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class ShippingCountryRuleCheckerSpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Core/spec/Promotion/Checker/TaxonInPromotionRuleCheckerSpec.php b/src/Sylius/Component/Core/spec/Promotion/Checker/TaxonInPromotionRuleCheckerSpec.php index 53d4907b51..d7a8d86b58 100644 --- a/src/Sylius/Component/Core/spec/Promotion/Checker/TaxonInPromotionRuleCheckerSpec.php +++ b/src/Sylius/Component/Core/spec/Promotion/Checker/TaxonInPromotionRuleCheckerSpec.php @@ -17,7 +17,7 @@ use PhpSpec\ObjectBehavior; use Sylius\Component\Core\Model\TaxonInterface; use Sylius\Component\Core\Promotion\Checker\TaxonInPromotionRuleCheckerInterface; use Sylius\Component\Promotion\Model\PromotionRuleInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class TaxonInPromotionRuleCheckerSpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Core/spec/Promotion/Updater/Rule/HasTaxonRuleUpdaterSpec.php b/src/Sylius/Component/Core/spec/Promotion/Updater/Rule/HasTaxonRuleUpdaterSpec.php index b18f21555d..d63ee1f734 100644 --- a/src/Sylius/Component/Core/spec/Promotion/Updater/Rule/HasTaxonRuleUpdaterSpec.php +++ b/src/Sylius/Component/Core/spec/Promotion/Updater/Rule/HasTaxonRuleUpdaterSpec.php @@ -19,7 +19,7 @@ use Prophecy\Argument; use Sylius\Component\Core\Model\PromotionInterface; use Sylius\Component\Core\Model\TaxonInterface; use Sylius\Component\Promotion\Model\PromotionRuleInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class HasTaxonRuleUpdaterSpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Core/spec/Provider/ActivePromotionsByChannelProviderSpec.php b/src/Sylius/Component/Core/spec/Provider/ActivePromotionsByChannelProviderSpec.php index 528a0869db..eb5fcbfaa7 100644 --- a/src/Sylius/Component/Core/spec/Provider/ActivePromotionsByChannelProviderSpec.php +++ b/src/Sylius/Component/Core/spec/Provider/ActivePromotionsByChannelProviderSpec.php @@ -21,7 +21,7 @@ use Sylius\Component\Core\Model\PromotionInterface; use Sylius\Component\Core\Repository\PromotionRepositoryInterface; use Sylius\Component\Promotion\Model\PromotionSubjectInterface; use Sylius\Component\Promotion\Provider\PreQualifiedPromotionsProviderInterface; -use Sylius\Component\Resource\Exception\UnexpectedTypeException; +use Sylius\Resource\Exception\UnexpectedTypeException; final class ActivePromotionsByChannelProviderSpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Core/spec/Test/Services/DefaultChannelFactorySpec.php b/src/Sylius/Component/Core/spec/Test/Services/DefaultChannelFactorySpec.php index 6bc384cbc6..6219c0d50c 100644 --- a/src/Sylius/Component/Core/spec/Test/Services/DefaultChannelFactorySpec.php +++ b/src/Sylius/Component/Core/spec/Test/Services/DefaultChannelFactorySpec.php @@ -20,8 +20,8 @@ use Sylius\Component\Core\Model\ShopBillingData; use Sylius\Component\Core\Test\Services\DefaultChannelFactoryInterface; use Sylius\Component\Currency\Model\CurrencyInterface; use Sylius\Component\Locale\Model\LocaleInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class DefaultChannelFactorySpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Core/spec/Test/Services/DefaultUnitedStatesChannelFactorySpec.php b/src/Sylius/Component/Core/spec/Test/Services/DefaultUnitedStatesChannelFactorySpec.php index 5e4194c7d7..5ef962eff2 100644 --- a/src/Sylius/Component/Core/spec/Test/Services/DefaultUnitedStatesChannelFactorySpec.php +++ b/src/Sylius/Component/Core/spec/Test/Services/DefaultUnitedStatesChannelFactorySpec.php @@ -22,8 +22,8 @@ use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Component\Core\Test\Services\DefaultChannelFactoryInterface; use Sylius\Component\Currency\Model\CurrencyInterface; use Sylius\Component\Locale\Model\LocaleInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class DefaultUnitedStatesChannelFactorySpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Core/spec/TokenAssigner/UniqueIdBasedOrderTokenAssignerSpec.php b/src/Sylius/Component/Core/spec/TokenAssigner/UniqueIdBasedOrderTokenAssignerSpec.php index 092b49789c..b51f21ab16 100644 --- a/src/Sylius/Component/Core/spec/TokenAssigner/UniqueIdBasedOrderTokenAssignerSpec.php +++ b/src/Sylius/Component/Core/spec/TokenAssigner/UniqueIdBasedOrderTokenAssignerSpec.php @@ -17,7 +17,7 @@ use PhpSpec\ObjectBehavior; use Prophecy\Argument; use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Core\TokenAssigner\OrderTokenAssignerInterface; -use Sylius\Component\Resource\Generator\RandomnessGeneratorInterface; +use Sylius\Resource\Generator\RandomnessGeneratorInterface; final class UniqueIdBasedOrderTokenAssignerSpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Core/spec/Translation/TranslatableEntityLocaleAssignerSpec.php b/src/Sylius/Component/Core/spec/Translation/TranslatableEntityLocaleAssignerSpec.php index 943f4fe01b..6b6c4eb75d 100644 --- a/src/Sylius/Component/Core/spec/Translation/TranslatableEntityLocaleAssignerSpec.php +++ b/src/Sylius/Component/Core/spec/Translation/TranslatableEntityLocaleAssignerSpec.php @@ -17,9 +17,9 @@ use PhpSpec\ObjectBehavior; use Sylius\Component\Core\Checker\CLIContextCheckerInterface; use Sylius\Component\Locale\Context\LocaleContextInterface; use Sylius\Component\Locale\Context\LocaleNotFoundException; -use Sylius\Component\Resource\Model\TranslatableInterface; -use Sylius\Component\Resource\Translation\Provider\TranslationLocaleProviderInterface; -use Sylius\Component\Resource\Translation\TranslatableEntityLocaleAssignerInterface; +use Sylius\Resource\Model\TranslatableInterface; +use Sylius\Resource\Translation\Provider\TranslationLocaleProviderInterface; +use Sylius\Resource\Translation\TranslatableEntityLocaleAssignerInterface; final class TranslatableEntityLocaleAssignerSpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Currency/Model/Currency.php b/src/Sylius/Component/Currency/Model/Currency.php index c2ed55e556..214ca9449d 100644 --- a/src/Sylius/Component/Currency/Model/Currency.php +++ b/src/Sylius/Component/Currency/Model/Currency.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Currency\Model; -use Sylius\Component\Resource\Model\TimestampableTrait; +use Sylius\Resource\Model\TimestampableTrait; use Symfony\Component\Intl\Currencies; class Currency implements CurrencyInterface, \Stringable diff --git a/src/Sylius/Component/Currency/Model/CurrencyInterface.php b/src/Sylius/Component/Currency/Model/CurrencyInterface.php index 85daaebcfe..7e6f25c64a 100644 --- a/src/Sylius/Component/Currency/Model/CurrencyInterface.php +++ b/src/Sylius/Component/Currency/Model/CurrencyInterface.php @@ -13,9 +13,9 @@ declare(strict_types=1); namespace Sylius\Component\Currency\Model; -use Sylius\Component\Resource\Model\CodeAwareInterface; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\TimestampableInterface; +use Sylius\Resource\Model\CodeAwareInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\TimestampableInterface; interface CurrencyInterface extends CodeAwareInterface, diff --git a/src/Sylius/Component/Currency/Model/ExchangeRate.php b/src/Sylius/Component/Currency/Model/ExchangeRate.php index 06af2d6de6..e81e8099df 100644 --- a/src/Sylius/Component/Currency/Model/ExchangeRate.php +++ b/src/Sylius/Component/Currency/Model/ExchangeRate.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Currency\Model; -use Sylius\Component\Resource\Model\TimestampableTrait; +use Sylius\Resource\Model\TimestampableTrait; class ExchangeRate implements ExchangeRateInterface { diff --git a/src/Sylius/Component/Currency/Model/ExchangeRateInterface.php b/src/Sylius/Component/Currency/Model/ExchangeRateInterface.php index 4e561c1c9d..34f1a85873 100644 --- a/src/Sylius/Component/Currency/Model/ExchangeRateInterface.php +++ b/src/Sylius/Component/Currency/Model/ExchangeRateInterface.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Currency\Model; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ResourceInterface; interface ExchangeRateInterface extends ResourceInterface { diff --git a/src/Sylius/Component/Currency/Repository/CurrencyRepositoryInterface.php b/src/Sylius/Component/Currency/Repository/CurrencyRepositoryInterface.php index 776774a7e4..257402e724 100644 --- a/src/Sylius/Component/Currency/Repository/CurrencyRepositoryInterface.php +++ b/src/Sylius/Component/Currency/Repository/CurrencyRepositoryInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Currency\Repository; use Sylius\Component\Currency\Model\CurrencyInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of CurrencyInterface diff --git a/src/Sylius/Component/Currency/Repository/ExchangeRateRepositoryInterface.php b/src/Sylius/Component/Currency/Repository/ExchangeRateRepositoryInterface.php index 8af0943c0f..a6200b8948 100644 --- a/src/Sylius/Component/Currency/Repository/ExchangeRateRepositoryInterface.php +++ b/src/Sylius/Component/Currency/Repository/ExchangeRateRepositoryInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Currency\Repository; use Sylius\Component\Currency\Model\ExchangeRateInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of ExchangeRateInterface diff --git a/src/Sylius/Component/Currency/composer.json b/src/Sylius/Component/Currency/composer.json index afc7d7e397..3d207c93c8 100644 --- a/src/Sylius/Component/Currency/composer.json +++ b/src/Sylius/Component/Currency/composer.json @@ -26,7 +26,7 @@ ], "require": { "php": "^8.2", - "sylius/resource": "^1.10", + "sylius/resource": "^1.11", "symfony/intl": "^6.4.0", "laminas/laminas-stdlib": "^3.3.1" }, diff --git a/src/Sylius/Component/Customer/Model/Customer.php b/src/Sylius/Component/Customer/Model/Customer.php index 8a31bde099..e7650fdf00 100644 --- a/src/Sylius/Component/Customer/Model/Customer.php +++ b/src/Sylius/Component/Customer/Model/Customer.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Customer\Model; -use Sylius\Component\Resource\Model\TimestampableTrait; +use Sylius\Resource\Model\TimestampableTrait; class Customer implements CustomerInterface, \Stringable { diff --git a/src/Sylius/Component/Customer/Model/CustomerGroupInterface.php b/src/Sylius/Component/Customer/Model/CustomerGroupInterface.php index b4f3192415..8336ba8fa2 100644 --- a/src/Sylius/Component/Customer/Model/CustomerGroupInterface.php +++ b/src/Sylius/Component/Customer/Model/CustomerGroupInterface.php @@ -13,8 +13,8 @@ declare(strict_types=1); namespace Sylius\Component\Customer\Model; -use Sylius\Component\Resource\Model\CodeAwareInterface; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\CodeAwareInterface; +use Sylius\Resource\Model\ResourceInterface; interface CustomerGroupInterface extends ResourceInterface, CodeAwareInterface { diff --git a/src/Sylius/Component/Customer/Model/CustomerInterface.php b/src/Sylius/Component/Customer/Model/CustomerInterface.php index a25196f524..cc252d4ab8 100644 --- a/src/Sylius/Component/Customer/Model/CustomerInterface.php +++ b/src/Sylius/Component/Customer/Model/CustomerInterface.php @@ -13,8 +13,8 @@ declare(strict_types=1); namespace Sylius\Component\Customer\Model; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\TimestampableInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\TimestampableInterface; interface CustomerInterface extends TimestampableInterface, ResourceInterface { diff --git a/src/Sylius/Component/Customer/Repository/CustomerGroupRepositoryInterface.php b/src/Sylius/Component/Customer/Repository/CustomerGroupRepositoryInterface.php index 0035cee79e..a3aafd4342 100644 --- a/src/Sylius/Component/Customer/Repository/CustomerGroupRepositoryInterface.php +++ b/src/Sylius/Component/Customer/Repository/CustomerGroupRepositoryInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Customer\Repository; use Sylius\Component\Customer\Model\CustomerGroupInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of CustomerGroupInterface diff --git a/src/Sylius/Component/Customer/composer.json b/src/Sylius/Component/Customer/composer.json index cfec08d8dd..8b22e790c3 100644 --- a/src/Sylius/Component/Customer/composer.json +++ b/src/Sylius/Component/Customer/composer.json @@ -33,7 +33,7 @@ "require": { "php": "^8.2", "doctrine/collections": "^1.6", - "sylius/resource": "^1.10" + "sylius/resource": "^1.11" }, "require-dev": { "phpspec/phpspec": "^7.2" diff --git a/src/Sylius/Component/Inventory/Model/InventoryUnitInterface.php b/src/Sylius/Component/Inventory/Model/InventoryUnitInterface.php index dfe99dcf9e..002def9873 100644 --- a/src/Sylius/Component/Inventory/Model/InventoryUnitInterface.php +++ b/src/Sylius/Component/Inventory/Model/InventoryUnitInterface.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Inventory\Model; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ResourceInterface; interface InventoryUnitInterface extends ResourceInterface { diff --git a/src/Sylius/Component/Inventory/composer.json b/src/Sylius/Component/Inventory/composer.json index 805dcf5748..17ea56bd2b 100644 --- a/src/Sylius/Component/Inventory/composer.json +++ b/src/Sylius/Component/Inventory/composer.json @@ -27,7 +27,7 @@ ], "require": { "php": "^8.2", - "sylius/resource": "^1.10", + "sylius/resource": "^1.11", "webmozart/assert": "^1.9" }, "require-dev": { diff --git a/src/Sylius/Component/Locale/Model/Locale.php b/src/Sylius/Component/Locale/Model/Locale.php index fdab5b9f13..0218e3d367 100644 --- a/src/Sylius/Component/Locale/Model/Locale.php +++ b/src/Sylius/Component/Locale/Model/Locale.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Locale\Model; -use Sylius\Component\Resource\Model\TimestampableTrait; +use Sylius\Resource\Model\TimestampableTrait; use Symfony\Component\Intl\Locales; class Locale implements LocaleInterface, \Stringable diff --git a/src/Sylius/Component/Locale/Model/LocaleInterface.php b/src/Sylius/Component/Locale/Model/LocaleInterface.php index 166a4bacc7..040868775b 100644 --- a/src/Sylius/Component/Locale/Model/LocaleInterface.php +++ b/src/Sylius/Component/Locale/Model/LocaleInterface.php @@ -13,9 +13,9 @@ declare(strict_types=1); namespace Sylius\Component\Locale\Model; -use Sylius\Component\Resource\Model\CodeAwareInterface; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\TimestampableInterface; +use Sylius\Resource\Model\CodeAwareInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\TimestampableInterface; interface LocaleInterface extends ResourceInterface, CodeAwareInterface, TimestampableInterface { diff --git a/src/Sylius/Component/Locale/Provider/LocaleCollectionProvider.php b/src/Sylius/Component/Locale/Provider/LocaleCollectionProvider.php index f37c5b00d7..c1f3d0eae2 100644 --- a/src/Sylius/Component/Locale/Provider/LocaleCollectionProvider.php +++ b/src/Sylius/Component/Locale/Provider/LocaleCollectionProvider.php @@ -14,13 +14,11 @@ declare(strict_types=1); namespace Sylius\Component\Locale\Provider; use Sylius\Component\Locale\Model\LocaleInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class LocaleCollectionProvider implements LocaleCollectionProviderInterface { - /** - * @param RepositoryInterface $localeRepository - */ + /** @param RepositoryInterface $localeRepository */ public function __construct(private RepositoryInterface $localeRepository) { } diff --git a/src/Sylius/Component/Locale/Provider/LocaleProvider.php b/src/Sylius/Component/Locale/Provider/LocaleProvider.php index feb7964f64..965535433c 100644 --- a/src/Sylius/Component/Locale/Provider/LocaleProvider.php +++ b/src/Sylius/Component/Locale/Provider/LocaleProvider.php @@ -14,15 +14,15 @@ declare(strict_types=1); namespace Sylius\Component\Locale\Provider; use Sylius\Component\Locale\Model\LocaleInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class LocaleProvider implements LocaleProviderInterface { - /** - * @param RepositoryInterface|LocaleCollectionProviderInterface $localeRepository - */ - public function __construct(private LocaleCollectionProviderInterface|RepositoryInterface $localeRepository, private string $defaultLocaleCode) - { + /** @param RepositoryInterface|LocaleCollectionProviderInterface $localeRepository */ + public function __construct( + private LocaleCollectionProviderInterface|RepositoryInterface $localeRepository, + private string $defaultLocaleCode, + ) { if ($this->localeRepository instanceof RepositoryInterface) { trigger_deprecation( 'sylius/locale', diff --git a/src/Sylius/Component/Locale/composer.json b/src/Sylius/Component/Locale/composer.json index ec556ab2ca..b96ad1141f 100644 --- a/src/Sylius/Component/Locale/composer.json +++ b/src/Sylius/Component/Locale/composer.json @@ -27,7 +27,7 @@ ], "require": { "php": "^8.2", - "sylius/resource": "^1.10", + "sylius/resource": "^1.11", "symfony/intl": "^6.4.0", "laminas/laminas-stdlib": "^3.3.1" }, diff --git a/src/Sylius/Component/Locale/spec/Model/LocaleSpec.php b/src/Sylius/Component/Locale/spec/Model/LocaleSpec.php index d3a6b2ae22..805305a455 100644 --- a/src/Sylius/Component/Locale/spec/Model/LocaleSpec.php +++ b/src/Sylius/Component/Locale/spec/Model/LocaleSpec.php @@ -15,7 +15,7 @@ namespace spec\Sylius\Component\Locale\Model; use PhpSpec\ObjectBehavior; use Sylius\Component\Locale\Model\LocaleInterface; -use Sylius\Component\Resource\Model\TimestampableInterface; +use Sylius\Resource\Model\TimestampableInterface; final class LocaleSpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Locale/spec/Provider/LocaleCollectionProviderSpec.php b/src/Sylius/Component/Locale/spec/Provider/LocaleCollectionProviderSpec.php index 2268a957c7..db02432575 100644 --- a/src/Sylius/Component/Locale/spec/Provider/LocaleCollectionProviderSpec.php +++ b/src/Sylius/Component/Locale/spec/Provider/LocaleCollectionProviderSpec.php @@ -16,10 +16,11 @@ namespace spec\Sylius\Component\Locale\Provider; use PhpSpec\ObjectBehavior; use Sylius\Component\Locale\Model\LocaleInterface; use Sylius\Component\Locale\Provider\LocaleCollectionProviderInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class LocaleCollectionProviderSpec extends ObjectBehavior { + /** @param RepositoryInterface $localeRepository */ function let(RepositoryInterface $localeRepository): void { $this->beConstructedWith($localeRepository); diff --git a/src/Sylius/Component/Locale/spec/Provider/LocaleProviderSpec.php b/src/Sylius/Component/Locale/spec/Provider/LocaleProviderSpec.php index 334fecf43f..eb21984a88 100644 --- a/src/Sylius/Component/Locale/spec/Provider/LocaleProviderSpec.php +++ b/src/Sylius/Component/Locale/spec/Provider/LocaleProviderSpec.php @@ -17,7 +17,7 @@ use PhpSpec\ObjectBehavior; use Sylius\Component\Locale\Model\LocaleInterface; use Sylius\Component\Locale\Provider\LocaleCollectionProviderInterface; use Sylius\Component\Locale\Provider\LocaleProviderInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class LocaleProviderSpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Order/Context/CartContext.php b/src/Sylius/Component/Order/Context/CartContext.php index 9989efc68f..422b3848ac 100644 --- a/src/Sylius/Component/Order/Context/CartContext.php +++ b/src/Sylius/Component/Order/Context/CartContext.php @@ -14,10 +14,11 @@ declare(strict_types=1); namespace Sylius\Component\Order\Context; use Sylius\Component\Order\Model\OrderInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class CartContext implements CartContextInterface { + /** @param FactoryInterface $cartFactory */ public function __construct(private FactoryInterface $cartFactory) { } diff --git a/src/Sylius/Component/Order/Factory/AdjustmentFactory.php b/src/Sylius/Component/Order/Factory/AdjustmentFactory.php index b37ce21112..4d0650d331 100644 --- a/src/Sylius/Component/Order/Factory/AdjustmentFactory.php +++ b/src/Sylius/Component/Order/Factory/AdjustmentFactory.php @@ -14,13 +14,16 @@ declare(strict_types=1); namespace Sylius\Component\Order\Factory; use Sylius\Component\Order\Model\AdjustmentInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; /** - * @implements AdjustmentFactoryInterface + * @template T of AdjustmentInterface + * + * @implements AdjustmentFactoryInterface */ class AdjustmentFactory implements AdjustmentFactoryInterface { + /** @param FactoryInterface $adjustmentFactory */ public function __construct(private FactoryInterface $adjustmentFactory) { } diff --git a/src/Sylius/Component/Order/Factory/AdjustmentFactoryInterface.php b/src/Sylius/Component/Order/Factory/AdjustmentFactoryInterface.php index 0f44fa37b3..cd55a8341a 100644 --- a/src/Sylius/Component/Order/Factory/AdjustmentFactoryInterface.php +++ b/src/Sylius/Component/Order/Factory/AdjustmentFactoryInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Order\Factory; use Sylius\Component\Order\Model\AdjustmentInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; /** * @template T of AdjustmentInterface diff --git a/src/Sylius/Component/Order/Factory/OrderItemUnitFactory.php b/src/Sylius/Component/Order/Factory/OrderItemUnitFactory.php index f315ff02fe..8f04eae080 100644 --- a/src/Sylius/Component/Order/Factory/OrderItemUnitFactory.php +++ b/src/Sylius/Component/Order/Factory/OrderItemUnitFactory.php @@ -15,10 +15,12 @@ namespace Sylius\Component\Order\Factory; use Sylius\Component\Order\Model\OrderItemInterface; use Sylius\Component\Order\Model\OrderItemUnitInterface; -use Sylius\Component\Resource\Exception\UnsupportedMethodException; +use Sylius\Resource\Exception\UnsupportedMethodException; /** - * @implements OrderItemUnitFactoryInterface + * @template T of OrderItemUnitInterface + * + * @implements OrderItemUnitFactoryInterface */ class OrderItemUnitFactory implements OrderItemUnitFactoryInterface { diff --git a/src/Sylius/Component/Order/Factory/OrderItemUnitFactoryInterface.php b/src/Sylius/Component/Order/Factory/OrderItemUnitFactoryInterface.php index 8ee42845be..1c4929b39d 100644 --- a/src/Sylius/Component/Order/Factory/OrderItemUnitFactoryInterface.php +++ b/src/Sylius/Component/Order/Factory/OrderItemUnitFactoryInterface.php @@ -15,7 +15,7 @@ namespace Sylius\Component\Order\Factory; use Sylius\Component\Order\Model\OrderItemInterface; use Sylius\Component\Order\Model\OrderItemUnitInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; /** * @template T of OrderItemUnitInterface diff --git a/src/Sylius/Component/Order/Model/Adjustment.php b/src/Sylius/Component/Order/Model/Adjustment.php index b6944331c1..b9b55bc00a 100644 --- a/src/Sylius/Component/Order/Model/Adjustment.php +++ b/src/Sylius/Component/Order/Model/Adjustment.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Order\Model; -use Sylius\Component\Resource\Model\TimestampableTrait; +use Sylius\Resource\Model\TimestampableTrait; class Adjustment implements AdjustmentInterface { diff --git a/src/Sylius/Component/Order/Model/AdjustmentInterface.php b/src/Sylius/Component/Order/Model/AdjustmentInterface.php index 5b55d3b5d4..5cd69733c7 100644 --- a/src/Sylius/Component/Order/Model/AdjustmentInterface.php +++ b/src/Sylius/Component/Order/Model/AdjustmentInterface.php @@ -13,8 +13,8 @@ declare(strict_types=1); namespace Sylius\Component\Order\Model; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\TimestampableInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\TimestampableInterface; interface AdjustmentInterface extends ResourceInterface, TimestampableInterface { diff --git a/src/Sylius/Component/Order/Model/Order.php b/src/Sylius/Component/Order/Model/Order.php index f37c2846cc..ef396c3763 100644 --- a/src/Sylius/Component/Order/Model/Order.php +++ b/src/Sylius/Component/Order/Model/Order.php @@ -15,7 +15,7 @@ namespace Sylius\Component\Order\Model; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; -use Sylius\Component\Resource\Model\TimestampableTrait; +use Sylius\Resource\Model\TimestampableTrait; class Order implements OrderInterface { diff --git a/src/Sylius/Component/Order/Model/OrderInterface.php b/src/Sylius/Component/Order/Model/OrderInterface.php index 300900fa8d..422f25f517 100644 --- a/src/Sylius/Component/Order/Model/OrderInterface.php +++ b/src/Sylius/Component/Order/Model/OrderInterface.php @@ -14,8 +14,8 @@ declare(strict_types=1); namespace Sylius\Component\Order\Model; use Doctrine\Common\Collections\Collection; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\TimestampableInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\TimestampableInterface; interface OrderInterface extends AdjustableInterface, diff --git a/src/Sylius/Component/Order/Model/OrderItemInterface.php b/src/Sylius/Component/Order/Model/OrderItemInterface.php index 209d4bcb20..4a7c6a3bf7 100644 --- a/src/Sylius/Component/Order/Model/OrderItemInterface.php +++ b/src/Sylius/Component/Order/Model/OrderItemInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Order\Model; use Doctrine\Common\Collections\Collection; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ResourceInterface; interface OrderItemInterface extends AdjustableInterface, diff --git a/src/Sylius/Component/Order/Model/OrderItemUnitInterface.php b/src/Sylius/Component/Order/Model/OrderItemUnitInterface.php index a3bc1b8b15..7044247e33 100644 --- a/src/Sylius/Component/Order/Model/OrderItemUnitInterface.php +++ b/src/Sylius/Component/Order/Model/OrderItemUnitInterface.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Order\Model; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ResourceInterface; interface OrderItemUnitInterface extends ResourceInterface, AdjustableInterface { diff --git a/src/Sylius/Component/Order/Model/OrderSequenceInterface.php b/src/Sylius/Component/Order/Model/OrderSequenceInterface.php index eda5e8934f..eb6cd18b65 100644 --- a/src/Sylius/Component/Order/Model/OrderSequenceInterface.php +++ b/src/Sylius/Component/Order/Model/OrderSequenceInterface.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Order\Model; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ResourceInterface; interface OrderSequenceInterface extends ResourceInterface { diff --git a/src/Sylius/Component/Order/Repository/OrderItemRepositoryInterface.php b/src/Sylius/Component/Order/Repository/OrderItemRepositoryInterface.php index 35b32be4cd..3a97d816d2 100644 --- a/src/Sylius/Component/Order/Repository/OrderItemRepositoryInterface.php +++ b/src/Sylius/Component/Order/Repository/OrderItemRepositoryInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Order\Repository; use Sylius\Component\Order\Model\OrderItemInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of OrderItemInterface diff --git a/src/Sylius/Component/Order/Repository/OrderRepositoryInterface.php b/src/Sylius/Component/Order/Repository/OrderRepositoryInterface.php index 0657e14114..d8689dcd7e 100644 --- a/src/Sylius/Component/Order/Repository/OrderRepositoryInterface.php +++ b/src/Sylius/Component/Order/Repository/OrderRepositoryInterface.php @@ -15,7 +15,7 @@ namespace Sylius\Component\Order\Repository; use Doctrine\ORM\QueryBuilder; use Sylius\Component\Order\Model\OrderInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of OrderInterface diff --git a/src/Sylius/Component/Order/composer.json b/src/Sylius/Component/Order/composer.json index e5b219f369..d210546364 100644 --- a/src/Sylius/Component/Order/composer.json +++ b/src/Sylius/Component/Order/composer.json @@ -27,7 +27,7 @@ ], "require": { "php": "^8.2", - "sylius/resource": "^1.10", + "sylius/resource": "^1.11", "webmozart/assert": "^1.9", "laminas/laminas-stdlib": "^3.3.1" }, diff --git a/src/Sylius/Component/Order/spec/Context/CartContextSpec.php b/src/Sylius/Component/Order/spec/Context/CartContextSpec.php index 7f12a9d8d0..015c090bbb 100644 --- a/src/Sylius/Component/Order/spec/Context/CartContextSpec.php +++ b/src/Sylius/Component/Order/spec/Context/CartContextSpec.php @@ -16,7 +16,7 @@ namespace spec\Sylius\Component\Order\Context; use PhpSpec\ObjectBehavior; use Sylius\Component\Order\Context\CartContextInterface; use Sylius\Component\Order\Model\OrderInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class CartContextSpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Order/spec/Factory/AdjustmentFactorySpec.php b/src/Sylius/Component/Order/spec/Factory/AdjustmentFactorySpec.php index bd8fdfdb78..2f60465607 100644 --- a/src/Sylius/Component/Order/spec/Factory/AdjustmentFactorySpec.php +++ b/src/Sylius/Component/Order/spec/Factory/AdjustmentFactorySpec.php @@ -16,7 +16,7 @@ namespace spec\Sylius\Component\Order\Factory; use PhpSpec\ObjectBehavior; use Sylius\Component\Order\Factory\AdjustmentFactoryInterface; use Sylius\Component\Order\Model\AdjustmentInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class AdjustmentFactorySpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Order/spec/Factory/OrderItemUnitFactorySpec.php b/src/Sylius/Component/Order/spec/Factory/OrderItemUnitFactorySpec.php index 9be06115c9..408b5c141f 100644 --- a/src/Sylius/Component/Order/spec/Factory/OrderItemUnitFactorySpec.php +++ b/src/Sylius/Component/Order/spec/Factory/OrderItemUnitFactorySpec.php @@ -18,7 +18,7 @@ use Sylius\Component\Order\Factory\OrderItemUnitFactoryInterface; use Sylius\Component\Order\Model\OrderItemInterface; use Sylius\Component\Order\Model\OrderItemUnit; use Sylius\Component\Order\Model\OrderItemUnitInterface; -use Sylius\Component\Resource\Exception\UnsupportedMethodException; +use Sylius\Resource\Exception\UnsupportedMethodException; final class OrderItemUnitFactorySpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Order/spec/Model/OrderSpec.php b/src/Sylius/Component/Order/spec/Model/OrderSpec.php index 61e000f428..c245e72593 100644 --- a/src/Sylius/Component/Order/spec/Model/OrderSpec.php +++ b/src/Sylius/Component/Order/spec/Model/OrderSpec.php @@ -21,7 +21,7 @@ use Sylius\Component\Order\Model\AdjustableInterface; use Sylius\Component\Order\Model\AdjustmentInterface; use Sylius\Component\Order\Model\OrderInterface; use Sylius\Component\Order\Model\OrderItemInterface; -use Sylius\Component\Resource\Model\TimestampableInterface; +use Sylius\Resource\Model\TimestampableInterface; final class OrderSpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Payment/Factory/PaymentFactory.php b/src/Sylius/Component/Payment/Factory/PaymentFactory.php index 87940fcafa..b113955872 100644 --- a/src/Sylius/Component/Payment/Factory/PaymentFactory.php +++ b/src/Sylius/Component/Payment/Factory/PaymentFactory.php @@ -14,13 +14,16 @@ declare(strict_types=1); namespace Sylius\Component\Payment\Factory; use Sylius\Component\Payment\Model\PaymentInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; /** - * @implements PaymentFactoryInterface + * @template T of PaymentInterface + * + * @implements PaymentFactoryInterface */ final class PaymentFactory implements PaymentFactoryInterface { + /** @param FactoryInterface $factory */ public function __construct(private FactoryInterface $factory) { } diff --git a/src/Sylius/Component/Payment/Factory/PaymentFactoryInterface.php b/src/Sylius/Component/Payment/Factory/PaymentFactoryInterface.php index efdee7b5a9..9361dc0260 100644 --- a/src/Sylius/Component/Payment/Factory/PaymentFactoryInterface.php +++ b/src/Sylius/Component/Payment/Factory/PaymentFactoryInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Payment\Factory; use Sylius\Component\Payment\Model\PaymentInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; /** * @template T of PaymentInterface diff --git a/src/Sylius/Component/Payment/Model/Payment.php b/src/Sylius/Component/Payment/Model/Payment.php index efe6935e8d..a5dc1a3064 100644 --- a/src/Sylius/Component/Payment/Model/Payment.php +++ b/src/Sylius/Component/Payment/Model/Payment.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Payment\Model; -use Sylius\Component\Resource\Model\TimestampableTrait; +use Sylius\Resource\Model\TimestampableTrait; class Payment implements PaymentInterface { diff --git a/src/Sylius/Component/Payment/Model/PaymentInterface.php b/src/Sylius/Component/Payment/Model/PaymentInterface.php index 52575168c2..086c42c49a 100644 --- a/src/Sylius/Component/Payment/Model/PaymentInterface.php +++ b/src/Sylius/Component/Payment/Model/PaymentInterface.php @@ -13,8 +13,8 @@ declare(strict_types=1); namespace Sylius\Component\Payment\Model; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\TimestampableInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\TimestampableInterface; interface PaymentInterface extends TimestampableInterface, ResourceInterface { diff --git a/src/Sylius/Component/Payment/Model/PaymentMethod.php b/src/Sylius/Component/Payment/Model/PaymentMethod.php index f09ce36f75..b72e9b1b08 100644 --- a/src/Sylius/Component/Payment/Model/PaymentMethod.php +++ b/src/Sylius/Component/Payment/Model/PaymentMethod.php @@ -13,10 +13,10 @@ declare(strict_types=1); namespace Sylius\Component\Payment\Model; -use Sylius\Component\Resource\Model\TimestampableTrait; -use Sylius\Component\Resource\Model\ToggleableTrait; -use Sylius\Component\Resource\Model\TranslatableTrait; -use Sylius\Component\Resource\Model\TranslationInterface; +use Sylius\Resource\Model\TimestampableTrait; +use Sylius\Resource\Model\ToggleableTrait; +use Sylius\Resource\Model\TranslatableTrait; +use Sylius\Resource\Model\TranslationInterface; class PaymentMethod implements PaymentMethodInterface, \Stringable { diff --git a/src/Sylius/Component/Payment/Model/PaymentMethodInterface.php b/src/Sylius/Component/Payment/Model/PaymentMethodInterface.php index f21117db75..172d71a8cf 100644 --- a/src/Sylius/Component/Payment/Model/PaymentMethodInterface.php +++ b/src/Sylius/Component/Payment/Model/PaymentMethodInterface.php @@ -13,12 +13,12 @@ declare(strict_types=1); namespace Sylius\Component\Payment\Model; -use Sylius\Component\Resource\Model\CodeAwareInterface; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\TimestampableInterface; -use Sylius\Component\Resource\Model\ToggleableInterface; -use Sylius\Component\Resource\Model\TranslatableInterface; -use Sylius\Component\Resource\Model\TranslationInterface; +use Sylius\Resource\Model\CodeAwareInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\TimestampableInterface; +use Sylius\Resource\Model\ToggleableInterface; +use Sylius\Resource\Model\TranslatableInterface; +use Sylius\Resource\Model\TranslationInterface; interface PaymentMethodInterface extends CodeAwareInterface, diff --git a/src/Sylius/Component/Payment/Model/PaymentMethodTranslation.php b/src/Sylius/Component/Payment/Model/PaymentMethodTranslation.php index 3c4973dd85..fb094874d5 100644 --- a/src/Sylius/Component/Payment/Model/PaymentMethodTranslation.php +++ b/src/Sylius/Component/Payment/Model/PaymentMethodTranslation.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Payment\Model; -use Sylius\Component\Resource\Model\AbstractTranslation; +use Sylius\Resource\Model\AbstractTranslation; class PaymentMethodTranslation extends AbstractTranslation implements PaymentMethodTranslationInterface, \Stringable { diff --git a/src/Sylius/Component/Payment/Model/PaymentMethodTranslationInterface.php b/src/Sylius/Component/Payment/Model/PaymentMethodTranslationInterface.php index 1659eaeff2..68d6f5a20c 100644 --- a/src/Sylius/Component/Payment/Model/PaymentMethodTranslationInterface.php +++ b/src/Sylius/Component/Payment/Model/PaymentMethodTranslationInterface.php @@ -13,8 +13,8 @@ declare(strict_types=1); namespace Sylius\Component\Payment\Model; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\TranslationInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\TranslationInterface; interface PaymentMethodTranslationInterface extends ResourceInterface, TranslationInterface { diff --git a/src/Sylius/Component/Payment/Repository/PaymentMethodRepositoryInterface.php b/src/Sylius/Component/Payment/Repository/PaymentMethodRepositoryInterface.php index 685b896092..e50470dc44 100644 --- a/src/Sylius/Component/Payment/Repository/PaymentMethodRepositoryInterface.php +++ b/src/Sylius/Component/Payment/Repository/PaymentMethodRepositoryInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Payment\Repository; use Sylius\Component\Payment\Model\PaymentMethodInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of PaymentMethodInterface diff --git a/src/Sylius/Component/Payment/Resolver/PaymentMethodsResolver.php b/src/Sylius/Component/Payment/Resolver/PaymentMethodsResolver.php index 69440df957..c35a3715d3 100644 --- a/src/Sylius/Component/Payment/Resolver/PaymentMethodsResolver.php +++ b/src/Sylius/Component/Payment/Resolver/PaymentMethodsResolver.php @@ -14,10 +14,12 @@ declare(strict_types=1); namespace Sylius\Component\Payment\Resolver; use Sylius\Component\Payment\Model\PaymentInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Component\Payment\Model\PaymentMethodInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class PaymentMethodsResolver implements PaymentMethodsResolverInterface { + /** @param RepositoryInterface $paymentMethodRepository */ public function __construct(private RepositoryInterface $paymentMethodRepository) { } diff --git a/src/Sylius/Component/Payment/composer.json b/src/Sylius/Component/Payment/composer.json index 2c6b5fae15..fe814f6bb9 100644 --- a/src/Sylius/Component/Payment/composer.json +++ b/src/Sylius/Component/Payment/composer.json @@ -28,7 +28,7 @@ "require": { "php": "^8.2", "sylius/registry": "^1.6", - "sylius/resource": "^1.10" + "sylius/resource": "^1.11" }, "require-dev": { "phpspec/phpspec": "^7.2" diff --git a/src/Sylius/Component/Payment/spec/Factory/PaymentFactorySpec.php b/src/Sylius/Component/Payment/spec/Factory/PaymentFactorySpec.php index 65b3dd1183..3819ad41a6 100644 --- a/src/Sylius/Component/Payment/spec/Factory/PaymentFactorySpec.php +++ b/src/Sylius/Component/Payment/spec/Factory/PaymentFactorySpec.php @@ -16,7 +16,7 @@ namespace spec\Sylius\Component\Payment\Factory; use PhpSpec\ObjectBehavior; use Sylius\Component\Payment\Factory\PaymentFactoryInterface; use Sylius\Component\Payment\Model\PaymentInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class PaymentFactorySpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Payment/spec/Resolver/PaymentMethodsResolverSpec.php b/src/Sylius/Component/Payment/spec/Resolver/PaymentMethodsResolverSpec.php index 167fe0877f..f53fa1bd50 100644 --- a/src/Sylius/Component/Payment/spec/Resolver/PaymentMethodsResolverSpec.php +++ b/src/Sylius/Component/Payment/spec/Resolver/PaymentMethodsResolverSpec.php @@ -17,7 +17,7 @@ use PhpSpec\ObjectBehavior; use Sylius\Component\Payment\Model\PaymentInterface; use Sylius\Component\Payment\Model\PaymentMethodInterface; use Sylius\Component\Payment\Resolver\PaymentMethodsResolverInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class PaymentMethodsResolverSpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Product/Factory/ProductFactory.php b/src/Sylius/Component/Product/Factory/ProductFactory.php index e19deb4f74..492fe68f6e 100644 --- a/src/Sylius/Component/Product/Factory/ProductFactory.php +++ b/src/Sylius/Component/Product/Factory/ProductFactory.php @@ -14,12 +14,24 @@ declare(strict_types=1); namespace Sylius\Component\Product\Factory; use Sylius\Component\Product\Model\ProductInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Component\Product\Model\ProductVariantInterface; +use Sylius\Resource\Factory\FactoryInterface; +/** + * @template T of ProductInterface + * + * @implements ProductFactoryInterface + */ class ProductFactory implements ProductFactoryInterface { - public function __construct(private FactoryInterface $factory, private FactoryInterface $variantFactory) - { + /** + * @param FactoryInterface $factory + * @param FactoryInterface $variantFactory + */ + public function __construct( + private FactoryInterface $factory, + private FactoryInterface $variantFactory, + ) { } public function createNew(): ProductInterface diff --git a/src/Sylius/Component/Product/Factory/ProductFactoryInterface.php b/src/Sylius/Component/Product/Factory/ProductFactoryInterface.php index ba4d609513..4bb57baf01 100644 --- a/src/Sylius/Component/Product/Factory/ProductFactoryInterface.php +++ b/src/Sylius/Component/Product/Factory/ProductFactoryInterface.php @@ -14,10 +14,12 @@ declare(strict_types=1); namespace Sylius\Component\Product\Factory; use Sylius\Component\Product\Model\ProductInterface; -use Sylius\Component\Resource\Factory\TranslatableFactoryInterface; +use Sylius\Resource\Factory\TranslatableFactoryInterface; /** - * @extends TranslatableFactoryInterface + * @template T of ProductInterface + * + * @extends TranslatableFactoryInterface */ interface ProductFactoryInterface extends TranslatableFactoryInterface { diff --git a/src/Sylius/Component/Product/Factory/ProductVariantFactory.php b/src/Sylius/Component/Product/Factory/ProductVariantFactory.php index 2364b28e48..93271352bf 100644 --- a/src/Sylius/Component/Product/Factory/ProductVariantFactory.php +++ b/src/Sylius/Component/Product/Factory/ProductVariantFactory.php @@ -15,13 +15,16 @@ namespace Sylius\Component\Product\Factory; use Sylius\Component\Product\Model\ProductInterface; use Sylius\Component\Product\Model\ProductVariantInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; /** - * @implements ProductVariantFactoryInterface + * @template T of ProductVariantInterface + * + * @implements ProductVariantFactoryInterface */ class ProductVariantFactory implements ProductVariantFactoryInterface { + /** @param FactoryInterface $factory */ public function __construct(private FactoryInterface $factory) { } @@ -33,7 +36,6 @@ class ProductVariantFactory implements ProductVariantFactoryInterface public function createForProduct(ProductInterface $product): ProductVariantInterface { - /** @var ProductVariantInterface $variant */ $variant = $this->createNew(); $variant->setProduct($product); diff --git a/src/Sylius/Component/Product/Factory/ProductVariantFactoryInterface.php b/src/Sylius/Component/Product/Factory/ProductVariantFactoryInterface.php index dea27b230d..0eccb67663 100644 --- a/src/Sylius/Component/Product/Factory/ProductVariantFactoryInterface.php +++ b/src/Sylius/Component/Product/Factory/ProductVariantFactoryInterface.php @@ -15,7 +15,7 @@ namespace Sylius\Component\Product\Factory; use Sylius\Component\Product\Model\ProductInterface; use Sylius\Component\Product\Model\ProductVariantInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; /** * @template T of ProductVariantInterface diff --git a/src/Sylius/Component/Product/Generator/ProductVariantGenerator.php b/src/Sylius/Component/Product/Generator/ProductVariantGenerator.php index 4f97777e80..b2b03a4843 100644 --- a/src/Sylius/Component/Product/Generator/ProductVariantGenerator.php +++ b/src/Sylius/Component/Product/Generator/ProductVariantGenerator.php @@ -17,7 +17,7 @@ use Sylius\Component\Product\Checker\ProductVariantsParityCheckerInterface; use Sylius\Component\Product\Factory\ProductVariantFactoryInterface; use Sylius\Component\Product\Model\ProductInterface; use Sylius\Component\Product\Model\ProductVariantInterface; -use Sylius\Component\Resource\Exception\VariantWithNoOptionsValuesException; +use Sylius\Resource\Exception\VariantWithNoOptionsValuesException; use Webmozart\Assert\Assert; final class ProductVariantGenerator implements ProductVariantGeneratorInterface diff --git a/src/Sylius/Component/Product/Generator/ProductVariantGeneratorInterface.php b/src/Sylius/Component/Product/Generator/ProductVariantGeneratorInterface.php index 59cc161e00..020effcd45 100644 --- a/src/Sylius/Component/Product/Generator/ProductVariantGeneratorInterface.php +++ b/src/Sylius/Component/Product/Generator/ProductVariantGeneratorInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Product\Generator; use Sylius\Component\Product\Model\ProductInterface; -use Sylius\Component\Resource\Exception\VariantWithNoOptionsValuesException; +use Sylius\Resource\Exception\VariantWithNoOptionsValuesException; interface ProductVariantGeneratorInterface { diff --git a/src/Sylius/Component/Product/Model/Product.php b/src/Sylius/Component/Product/Model/Product.php index e7850ab136..174501ded5 100644 --- a/src/Sylius/Component/Product/Model/Product.php +++ b/src/Sylius/Component/Product/Model/Product.php @@ -16,10 +16,10 @@ namespace Sylius\Component\Product\Model; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Sylius\Component\Attribute\Model\AttributeValueInterface; -use Sylius\Component\Resource\Model\TimestampableTrait; -use Sylius\Component\Resource\Model\ToggleableTrait; -use Sylius\Component\Resource\Model\TranslatableTrait; -use Sylius\Component\Resource\Model\TranslationInterface; +use Sylius\Resource\Model\TimestampableTrait; +use Sylius\Resource\Model\ToggleableTrait; +use Sylius\Resource\Model\TranslatableTrait; +use Sylius\Resource\Model\TranslationInterface; use Webmozart\Assert\Assert; class Product implements ProductInterface, \Stringable diff --git a/src/Sylius/Component/Product/Model/ProductAssociation.php b/src/Sylius/Component/Product/Model/ProductAssociation.php index 7821244432..b243792b7f 100644 --- a/src/Sylius/Component/Product/Model/ProductAssociation.php +++ b/src/Sylius/Component/Product/Model/ProductAssociation.php @@ -15,7 +15,7 @@ namespace Sylius\Component\Product\Model; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; -use Sylius\Component\Resource\Model\TimestampableTrait; +use Sylius\Resource\Model\TimestampableTrait; class ProductAssociation implements ProductAssociationInterface { diff --git a/src/Sylius/Component/Product/Model/ProductAssociationInterface.php b/src/Sylius/Component/Product/Model/ProductAssociationInterface.php index 962cfcc588..a6f0545bf6 100644 --- a/src/Sylius/Component/Product/Model/ProductAssociationInterface.php +++ b/src/Sylius/Component/Product/Model/ProductAssociationInterface.php @@ -14,8 +14,8 @@ declare(strict_types=1); namespace Sylius\Component\Product\Model; use Doctrine\Common\Collections\Collection; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\TimestampableInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\TimestampableInterface; interface ProductAssociationInterface extends TimestampableInterface, ResourceInterface { diff --git a/src/Sylius/Component/Product/Model/ProductAssociationType.php b/src/Sylius/Component/Product/Model/ProductAssociationType.php index 2b25ab710b..bd6f6b1662 100644 --- a/src/Sylius/Component/Product/Model/ProductAssociationType.php +++ b/src/Sylius/Component/Product/Model/ProductAssociationType.php @@ -13,9 +13,9 @@ declare(strict_types=1); namespace Sylius\Component\Product\Model; -use Sylius\Component\Resource\Model\TimestampableTrait; -use Sylius\Component\Resource\Model\TranslatableTrait; -use Sylius\Component\Resource\Model\TranslationInterface; +use Sylius\Resource\Model\TimestampableTrait; +use Sylius\Resource\Model\TranslatableTrait; +use Sylius\Resource\Model\TranslationInterface; class ProductAssociationType implements ProductAssociationTypeInterface, \Stringable { diff --git a/src/Sylius/Component/Product/Model/ProductAssociationTypeInterface.php b/src/Sylius/Component/Product/Model/ProductAssociationTypeInterface.php index 877a8607b7..8e2f64890d 100644 --- a/src/Sylius/Component/Product/Model/ProductAssociationTypeInterface.php +++ b/src/Sylius/Component/Product/Model/ProductAssociationTypeInterface.php @@ -13,11 +13,11 @@ declare(strict_types=1); namespace Sylius\Component\Product\Model; -use Sylius\Component\Resource\Model\CodeAwareInterface; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\TimestampableInterface; -use Sylius\Component\Resource\Model\TranslatableInterface; -use Sylius\Component\Resource\Model\TranslationInterface; +use Sylius\Resource\Model\CodeAwareInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\TimestampableInterface; +use Sylius\Resource\Model\TranslatableInterface; +use Sylius\Resource\Model\TranslationInterface; interface ProductAssociationTypeInterface extends CodeAwareInterface, diff --git a/src/Sylius/Component/Product/Model/ProductAssociationTypeTranslation.php b/src/Sylius/Component/Product/Model/ProductAssociationTypeTranslation.php index 3132cc28bc..0f3f76a971 100644 --- a/src/Sylius/Component/Product/Model/ProductAssociationTypeTranslation.php +++ b/src/Sylius/Component/Product/Model/ProductAssociationTypeTranslation.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Product\Model; -use Sylius\Component\Resource\Model\AbstractTranslation; +use Sylius\Resource\Model\AbstractTranslation; class ProductAssociationTypeTranslation extends AbstractTranslation implements ProductAssociationTypeTranslationInterface { diff --git a/src/Sylius/Component/Product/Model/ProductAssociationTypeTranslationInterface.php b/src/Sylius/Component/Product/Model/ProductAssociationTypeTranslationInterface.php index 85480cca37..aad4cffbbb 100644 --- a/src/Sylius/Component/Product/Model/ProductAssociationTypeTranslationInterface.php +++ b/src/Sylius/Component/Product/Model/ProductAssociationTypeTranslationInterface.php @@ -13,8 +13,8 @@ declare(strict_types=1); namespace Sylius\Component\Product\Model; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\TranslationInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\TranslationInterface; interface ProductAssociationTypeTranslationInterface extends ResourceInterface, TranslationInterface { diff --git a/src/Sylius/Component/Product/Model/ProductInterface.php b/src/Sylius/Component/Product/Model/ProductInterface.php index 61d9e912fe..1171c29317 100644 --- a/src/Sylius/Component/Product/Model/ProductInterface.php +++ b/src/Sylius/Component/Product/Model/ProductInterface.php @@ -15,13 +15,13 @@ namespace Sylius\Component\Product\Model; use Doctrine\Common\Collections\Collection; use Sylius\Component\Attribute\Model\AttributeSubjectInterface; -use Sylius\Component\Resource\Model\CodeAwareInterface; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\SlugAwareInterface; -use Sylius\Component\Resource\Model\TimestampableInterface; -use Sylius\Component\Resource\Model\ToggleableInterface; -use Sylius\Component\Resource\Model\TranslatableInterface; -use Sylius\Component\Resource\Model\TranslationInterface; +use Sylius\Resource\Model\CodeAwareInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\SlugAwareInterface; +use Sylius\Resource\Model\TimestampableInterface; +use Sylius\Resource\Model\ToggleableInterface; +use Sylius\Resource\Model\TranslatableInterface; +use Sylius\Resource\Model\TranslationInterface; interface ProductInterface extends AttributeSubjectInterface, diff --git a/src/Sylius/Component/Product/Model/ProductOption.php b/src/Sylius/Component/Product/Model/ProductOption.php index 51a7748017..a1e17d76fd 100644 --- a/src/Sylius/Component/Product/Model/ProductOption.php +++ b/src/Sylius/Component/Product/Model/ProductOption.php @@ -15,9 +15,9 @@ namespace Sylius\Component\Product\Model; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; -use Sylius\Component\Resource\Model\TimestampableTrait; -use Sylius\Component\Resource\Model\TranslatableTrait; -use Sylius\Component\Resource\Model\TranslationInterface; +use Sylius\Resource\Model\TimestampableTrait; +use Sylius\Resource\Model\TranslatableTrait; +use Sylius\Resource\Model\TranslationInterface; class ProductOption implements ProductOptionInterface, \Stringable { diff --git a/src/Sylius/Component/Product/Model/ProductOptionInterface.php b/src/Sylius/Component/Product/Model/ProductOptionInterface.php index 764dc6e7e7..fbc2852dda 100644 --- a/src/Sylius/Component/Product/Model/ProductOptionInterface.php +++ b/src/Sylius/Component/Product/Model/ProductOptionInterface.php @@ -14,11 +14,11 @@ declare(strict_types=1); namespace Sylius\Component\Product\Model; use Doctrine\Common\Collections\Collection; -use Sylius\Component\Resource\Model\CodeAwareInterface; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\TimestampableInterface; -use Sylius\Component\Resource\Model\TranslatableInterface; -use Sylius\Component\Resource\Model\TranslationInterface; +use Sylius\Resource\Model\CodeAwareInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\TimestampableInterface; +use Sylius\Resource\Model\TranslatableInterface; +use Sylius\Resource\Model\TranslationInterface; interface ProductOptionInterface extends ResourceInterface, diff --git a/src/Sylius/Component/Product/Model/ProductOptionTranslation.php b/src/Sylius/Component/Product/Model/ProductOptionTranslation.php index 7ab88b3fe2..a9505d5ddb 100644 --- a/src/Sylius/Component/Product/Model/ProductOptionTranslation.php +++ b/src/Sylius/Component/Product/Model/ProductOptionTranslation.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Product\Model; -use Sylius\Component\Resource\Model\AbstractTranslation; +use Sylius\Resource\Model\AbstractTranslation; class ProductOptionTranslation extends AbstractTranslation implements ProductOptionTranslationInterface { diff --git a/src/Sylius/Component/Product/Model/ProductOptionTranslationInterface.php b/src/Sylius/Component/Product/Model/ProductOptionTranslationInterface.php index 3d7283b866..83332c5ffd 100644 --- a/src/Sylius/Component/Product/Model/ProductOptionTranslationInterface.php +++ b/src/Sylius/Component/Product/Model/ProductOptionTranslationInterface.php @@ -13,8 +13,8 @@ declare(strict_types=1); namespace Sylius\Component\Product\Model; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\TranslationInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\TranslationInterface; interface ProductOptionTranslationInterface extends ResourceInterface, TranslationInterface { diff --git a/src/Sylius/Component/Product/Model/ProductOptionValue.php b/src/Sylius/Component/Product/Model/ProductOptionValue.php index e01ef3d902..dd044bfdaa 100644 --- a/src/Sylius/Component/Product/Model/ProductOptionValue.php +++ b/src/Sylius/Component/Product/Model/ProductOptionValue.php @@ -13,8 +13,8 @@ declare(strict_types=1); namespace Sylius\Component\Product\Model; -use Sylius\Component\Resource\Model\TranslatableTrait; -use Sylius\Component\Resource\Model\TranslationInterface; +use Sylius\Resource\Model\TranslatableTrait; +use Sylius\Resource\Model\TranslationInterface; class ProductOptionValue implements ProductOptionValueInterface, \Stringable { diff --git a/src/Sylius/Component/Product/Model/ProductOptionValueInterface.php b/src/Sylius/Component/Product/Model/ProductOptionValueInterface.php index ec2309f84c..a00abd17cc 100644 --- a/src/Sylius/Component/Product/Model/ProductOptionValueInterface.php +++ b/src/Sylius/Component/Product/Model/ProductOptionValueInterface.php @@ -13,10 +13,10 @@ declare(strict_types=1); namespace Sylius\Component\Product\Model; -use Sylius\Component\Resource\Model\CodeAwareInterface; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\TranslatableInterface; -use Sylius\Component\Resource\Model\TranslationInterface; +use Sylius\Resource\Model\CodeAwareInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\TranslatableInterface; +use Sylius\Resource\Model\TranslationInterface; interface ProductOptionValueInterface extends ResourceInterface, CodeAwareInterface, TranslatableInterface { diff --git a/src/Sylius/Component/Product/Model/ProductOptionValueTranslation.php b/src/Sylius/Component/Product/Model/ProductOptionValueTranslation.php index a5086fc96b..f99e013151 100644 --- a/src/Sylius/Component/Product/Model/ProductOptionValueTranslation.php +++ b/src/Sylius/Component/Product/Model/ProductOptionValueTranslation.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Product\Model; -use Sylius\Component\Resource\Model\AbstractTranslation; +use Sylius\Resource\Model\AbstractTranslation; class ProductOptionValueTranslation extends AbstractTranslation implements ProductOptionValueTranslationInterface { diff --git a/src/Sylius/Component/Product/Model/ProductOptionValueTranslationInterface.php b/src/Sylius/Component/Product/Model/ProductOptionValueTranslationInterface.php index 196d23fd8c..ff9bec9bb8 100644 --- a/src/Sylius/Component/Product/Model/ProductOptionValueTranslationInterface.php +++ b/src/Sylius/Component/Product/Model/ProductOptionValueTranslationInterface.php @@ -13,8 +13,8 @@ declare(strict_types=1); namespace Sylius\Component\Product\Model; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\TranslationInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\TranslationInterface; interface ProductOptionValueTranslationInterface extends ResourceInterface, TranslationInterface { diff --git a/src/Sylius/Component/Product/Model/ProductTranslation.php b/src/Sylius/Component/Product/Model/ProductTranslation.php index f007a96b81..619a98a635 100644 --- a/src/Sylius/Component/Product/Model/ProductTranslation.php +++ b/src/Sylius/Component/Product/Model/ProductTranslation.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Product\Model; -use Sylius\Component\Resource\Model\AbstractTranslation; +use Sylius\Resource\Model\AbstractTranslation; class ProductTranslation extends AbstractTranslation implements ProductTranslationInterface { diff --git a/src/Sylius/Component/Product/Model/ProductTranslationInterface.php b/src/Sylius/Component/Product/Model/ProductTranslationInterface.php index dad8ba71a3..d39218c45d 100644 --- a/src/Sylius/Component/Product/Model/ProductTranslationInterface.php +++ b/src/Sylius/Component/Product/Model/ProductTranslationInterface.php @@ -13,9 +13,9 @@ declare(strict_types=1); namespace Sylius\Component\Product\Model; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\SlugAwareInterface; -use Sylius\Component\Resource\Model\TranslationInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\SlugAwareInterface; +use Sylius\Resource\Model\TranslationInterface; interface ProductTranslationInterface extends SlugAwareInterface, ResourceInterface, TranslationInterface { diff --git a/src/Sylius/Component/Product/Model/ProductVariant.php b/src/Sylius/Component/Product/Model/ProductVariant.php index 7f851be8f0..757bc6dc52 100644 --- a/src/Sylius/Component/Product/Model/ProductVariant.php +++ b/src/Sylius/Component/Product/Model/ProductVariant.php @@ -15,10 +15,10 @@ namespace Sylius\Component\Product\Model; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; -use Sylius\Component\Resource\Model\TimestampableTrait; -use Sylius\Component\Resource\Model\ToggleableTrait; -use Sylius\Component\Resource\Model\TranslatableTrait; -use Sylius\Component\Resource\Model\TranslationInterface; +use Sylius\Resource\Model\TimestampableTrait; +use Sylius\Resource\Model\ToggleableTrait; +use Sylius\Resource\Model\TranslatableTrait; +use Sylius\Resource\Model\TranslationInterface; class ProductVariant implements ProductVariantInterface { diff --git a/src/Sylius/Component/Product/Model/ProductVariantInterface.php b/src/Sylius/Component/Product/Model/ProductVariantInterface.php index 3e674ccaa3..4ab0c68efb 100644 --- a/src/Sylius/Component/Product/Model/ProductVariantInterface.php +++ b/src/Sylius/Component/Product/Model/ProductVariantInterface.php @@ -14,12 +14,12 @@ declare(strict_types=1); namespace Sylius\Component\Product\Model; use Doctrine\Common\Collections\Collection; -use Sylius\Component\Resource\Model\CodeAwareInterface; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\TimestampableInterface; -use Sylius\Component\Resource\Model\ToggleableInterface; -use Sylius\Component\Resource\Model\TranslatableInterface; -use Sylius\Component\Resource\Model\TranslationInterface; +use Sylius\Resource\Model\CodeAwareInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\TimestampableInterface; +use Sylius\Resource\Model\ToggleableInterface; +use Sylius\Resource\Model\TranslatableInterface; +use Sylius\Resource\Model\TranslationInterface; interface ProductVariantInterface extends TimestampableInterface, diff --git a/src/Sylius/Component/Product/Model/ProductVariantTranslation.php b/src/Sylius/Component/Product/Model/ProductVariantTranslation.php index 25cc071a51..1f52bc37c3 100644 --- a/src/Sylius/Component/Product/Model/ProductVariantTranslation.php +++ b/src/Sylius/Component/Product/Model/ProductVariantTranslation.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Product\Model; -use Sylius\Component\Resource\Model\AbstractTranslation; +use Sylius\Resource\Model\AbstractTranslation; class ProductVariantTranslation extends AbstractTranslation implements ProductVariantTranslationInterface { diff --git a/src/Sylius/Component/Product/Model/ProductVariantTranslationInterface.php b/src/Sylius/Component/Product/Model/ProductVariantTranslationInterface.php index f53202a981..342b6a34d9 100644 --- a/src/Sylius/Component/Product/Model/ProductVariantTranslationInterface.php +++ b/src/Sylius/Component/Product/Model/ProductVariantTranslationInterface.php @@ -13,8 +13,8 @@ declare(strict_types=1); namespace Sylius\Component\Product\Model; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\TranslationInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\TranslationInterface; interface ProductVariantTranslationInterface extends ResourceInterface, TranslationInterface { diff --git a/src/Sylius/Component/Product/Repository/ProductAssociationRepositoryInterface.php b/src/Sylius/Component/Product/Repository/ProductAssociationRepositoryInterface.php index f44e06e7b9..a41cdcbdfd 100644 --- a/src/Sylius/Component/Product/Repository/ProductAssociationRepositoryInterface.php +++ b/src/Sylius/Component/Product/Repository/ProductAssociationRepositoryInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Product\Repository; use Sylius\Component\Product\Model\ProductAssociationInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of ProductAssociationInterface diff --git a/src/Sylius/Component/Product/Repository/ProductAssociationTypeRepositoryInterface.php b/src/Sylius/Component/Product/Repository/ProductAssociationTypeRepositoryInterface.php index a27bc34d6d..ea9cdbde4a 100644 --- a/src/Sylius/Component/Product/Repository/ProductAssociationTypeRepositoryInterface.php +++ b/src/Sylius/Component/Product/Repository/ProductAssociationTypeRepositoryInterface.php @@ -15,7 +15,7 @@ namespace Sylius\Component\Product\Repository; use Doctrine\ORM\QueryBuilder; use Sylius\Component\Product\Model\ProductAssociationTypeInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of ProductAssociationTypeInterface diff --git a/src/Sylius/Component/Product/Repository/ProductAssociationTypeTranslationRepositoryInterface.php b/src/Sylius/Component/Product/Repository/ProductAssociationTypeTranslationRepositoryInterface.php index 97ff617f49..518729fe8a 100644 --- a/src/Sylius/Component/Product/Repository/ProductAssociationTypeTranslationRepositoryInterface.php +++ b/src/Sylius/Component/Product/Repository/ProductAssociationTypeTranslationRepositoryInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Product\Repository; use Sylius\Component\Product\Model\ProductAssociationTypeTranslationInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of ProductAssociationTypeTranslationInterface diff --git a/src/Sylius/Component/Product/Repository/ProductAttributeRepositoryInterface.php b/src/Sylius/Component/Product/Repository/ProductAttributeRepositoryInterface.php index 50d9c6ff0b..f6270a01d6 100644 --- a/src/Sylius/Component/Product/Repository/ProductAttributeRepositoryInterface.php +++ b/src/Sylius/Component/Product/Repository/ProductAttributeRepositoryInterface.php @@ -15,7 +15,7 @@ namespace Sylius\Component\Product\Repository; use Doctrine\ORM\QueryBuilder; use Sylius\Component\Product\Model\ProductAttributeInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of ProductAttributeInterface diff --git a/src/Sylius/Component/Product/Repository/ProductAttributeTranslationRepositoryInterface.php b/src/Sylius/Component/Product/Repository/ProductAttributeTranslationRepositoryInterface.php index e85db69ece..5ff6cac13a 100644 --- a/src/Sylius/Component/Product/Repository/ProductAttributeTranslationRepositoryInterface.php +++ b/src/Sylius/Component/Product/Repository/ProductAttributeTranslationRepositoryInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Product\Repository; use Sylius\Component\Product\Model\ProductAttributeTranslationInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of ProductAttributeTranslationInterface diff --git a/src/Sylius/Component/Product/Repository/ProductOptionRepositoryInterface.php b/src/Sylius/Component/Product/Repository/ProductOptionRepositoryInterface.php index 113b72a3ff..b2ff05ddf5 100644 --- a/src/Sylius/Component/Product/Repository/ProductOptionRepositoryInterface.php +++ b/src/Sylius/Component/Product/Repository/ProductOptionRepositoryInterface.php @@ -15,7 +15,7 @@ namespace Sylius\Component\Product\Repository; use Doctrine\ORM\QueryBuilder; use Sylius\Component\Product\Model\ProductOptionInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of ProductOptionInterface diff --git a/src/Sylius/Component/Product/Repository/ProductOptionTranslationRepositoryInterface.php b/src/Sylius/Component/Product/Repository/ProductOptionTranslationRepositoryInterface.php index fd4637c12f..2cd5f65a72 100644 --- a/src/Sylius/Component/Product/Repository/ProductOptionTranslationRepositoryInterface.php +++ b/src/Sylius/Component/Product/Repository/ProductOptionTranslationRepositoryInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Product\Repository; use Sylius\Component\Product\Model\ProductOptionTranslationInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of ProductOptionTranslationInterface diff --git a/src/Sylius/Component/Product/Repository/ProductOptionValueRepositoryInterface.php b/src/Sylius/Component/Product/Repository/ProductOptionValueRepositoryInterface.php index 79ff3f6030..30a104245b 100644 --- a/src/Sylius/Component/Product/Repository/ProductOptionValueRepositoryInterface.php +++ b/src/Sylius/Component/Product/Repository/ProductOptionValueRepositoryInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Product\Repository; use Sylius\Component\Product\Model\ProductOptionValueInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of ProductOptionValueInterface diff --git a/src/Sylius/Component/Product/Repository/ProductOptionValueTranslationRepositoryInterface.php b/src/Sylius/Component/Product/Repository/ProductOptionValueTranslationRepositoryInterface.php index cf1e86aae3..926a7c8e3c 100644 --- a/src/Sylius/Component/Product/Repository/ProductOptionValueTranslationRepositoryInterface.php +++ b/src/Sylius/Component/Product/Repository/ProductOptionValueTranslationRepositoryInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Product\Repository; use Sylius\Component\Product\Model\ProductOptionValueTranslationInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of ProductOptionValueTranslationInterface diff --git a/src/Sylius/Component/Product/Repository/ProductRepositoryInterface.php b/src/Sylius/Component/Product/Repository/ProductRepositoryInterface.php index 0bca9b9c28..e6c41eb45a 100644 --- a/src/Sylius/Component/Product/Repository/ProductRepositoryInterface.php +++ b/src/Sylius/Component/Product/Repository/ProductRepositoryInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Product\Repository; use Sylius\Component\Product\Model\ProductInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of ProductInterface diff --git a/src/Sylius/Component/Product/Repository/ProductTranslationRepositoryInterface.php b/src/Sylius/Component/Product/Repository/ProductTranslationRepositoryInterface.php index ce346261c4..ea1ce7786b 100644 --- a/src/Sylius/Component/Product/Repository/ProductTranslationRepositoryInterface.php +++ b/src/Sylius/Component/Product/Repository/ProductTranslationRepositoryInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Product\Repository; use Sylius\Component\Product\Model\ProductTranslationInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of ProductTranslationInterface diff --git a/src/Sylius/Component/Product/Repository/ProductVariantRepositoryInterface.php b/src/Sylius/Component/Product/Repository/ProductVariantRepositoryInterface.php index 582ed6359b..a959183da4 100644 --- a/src/Sylius/Component/Product/Repository/ProductVariantRepositoryInterface.php +++ b/src/Sylius/Component/Product/Repository/ProductVariantRepositoryInterface.php @@ -16,7 +16,7 @@ namespace Sylius\Component\Product\Repository; use Doctrine\ORM\QueryBuilder; use Sylius\Component\Product\Model\ProductInterface; use Sylius\Component\Product\Model\ProductVariantInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of ProductVariantInterface diff --git a/src/Sylius/Component/Product/Repository/ProductVariantTranslationRepositoryInterface.php b/src/Sylius/Component/Product/Repository/ProductVariantTranslationRepositoryInterface.php index 490fd11c2b..cf30e2a73b 100644 --- a/src/Sylius/Component/Product/Repository/ProductVariantTranslationRepositoryInterface.php +++ b/src/Sylius/Component/Product/Repository/ProductVariantTranslationRepositoryInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Product\Repository; use Sylius\Component\Product\Model\ProductVariantTranslationInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of ProductVariantTranslationInterface diff --git a/src/Sylius/Component/Product/composer.json b/src/Sylius/Component/Product/composer.json index 35042564f4..5052615303 100644 --- a/src/Sylius/Component/Product/composer.json +++ b/src/Sylius/Component/Product/composer.json @@ -31,7 +31,7 @@ "php": "^8.2", "behat/transliterator": "^1.3", "sylius/attribute": "^2.0", - "sylius/resource": "^1.10", + "sylius/resource": "^1.11", "symfony/polyfill-iconv": "^1.28", "webmozart/assert": "^1.9" }, diff --git a/src/Sylius/Component/Product/spec/Factory/ProductFactorySpec.php b/src/Sylius/Component/Product/spec/Factory/ProductFactorySpec.php index 223fbb9dac..c67fb45450 100644 --- a/src/Sylius/Component/Product/spec/Factory/ProductFactorySpec.php +++ b/src/Sylius/Component/Product/spec/Factory/ProductFactorySpec.php @@ -17,7 +17,7 @@ use PhpSpec\ObjectBehavior; use Sylius\Component\Product\Factory\ProductFactoryInterface; use Sylius\Component\Product\Model\ProductInterface; use Sylius\Component\Product\Model\ProductVariantInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class ProductFactorySpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Product/spec/Factory/ProductVariantFactorySpec.php b/src/Sylius/Component/Product/spec/Factory/ProductVariantFactorySpec.php index 01fd5630fe..f1f26d5af0 100644 --- a/src/Sylius/Component/Product/spec/Factory/ProductVariantFactorySpec.php +++ b/src/Sylius/Component/Product/spec/Factory/ProductVariantFactorySpec.php @@ -17,7 +17,7 @@ use PhpSpec\ObjectBehavior; use Sylius\Component\Product\Factory\ProductVariantFactoryInterface; use Sylius\Component\Product\Model\ProductInterface; use Sylius\Component\Product\Model\ProductVariantInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class ProductVariantFactorySpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Product/spec/Model/ProductAssociationTypeTranslationSpec.php b/src/Sylius/Component/Product/spec/Model/ProductAssociationTypeTranslationSpec.php index ec1b8c5663..cf24a16b7e 100644 --- a/src/Sylius/Component/Product/spec/Model/ProductAssociationTypeTranslationSpec.php +++ b/src/Sylius/Component/Product/spec/Model/ProductAssociationTypeTranslationSpec.php @@ -15,7 +15,7 @@ namespace spec\Sylius\Component\Product\Model; use PhpSpec\ObjectBehavior; use Sylius\Component\Product\Model\ProductAssociationTypeTranslationInterface; -use Sylius\Component\Resource\Model\AbstractTranslation; +use Sylius\Resource\Model\AbstractTranslation; final class ProductAssociationTypeTranslationSpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Product/spec/Model/ProductSpec.php b/src/Sylius/Component/Product/spec/Model/ProductSpec.php index de44c2e644..caf1601ac4 100644 --- a/src/Sylius/Component/Product/spec/Model/ProductSpec.php +++ b/src/Sylius/Component/Product/spec/Model/ProductSpec.php @@ -22,7 +22,7 @@ use Sylius\Component\Product\Model\ProductAttributeValueInterface; use Sylius\Component\Product\Model\ProductInterface; use Sylius\Component\Product\Model\ProductOptionInterface; use Sylius\Component\Product\Model\ProductVariantInterface; -use Sylius\Component\Resource\Model\ToggleableInterface; +use Sylius\Resource\Model\ToggleableInterface; final class ProductSpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Product/spec/Model/ProductVariantSpec.php b/src/Sylius/Component/Product/spec/Model/ProductVariantSpec.php index 9dc00c4f28..2b9786d354 100644 --- a/src/Sylius/Component/Product/spec/Model/ProductVariantSpec.php +++ b/src/Sylius/Component/Product/spec/Model/ProductVariantSpec.php @@ -17,8 +17,8 @@ use Doctrine\Common\Collections\Collection; use PhpSpec\ObjectBehavior; use Sylius\Component\Product\Model\ProductOptionValueInterface; use Sylius\Component\Product\Model\ProductVariantInterface; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\ToggleableInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ToggleableInterface; final class ProductVariantSpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Product/spec/Model/ProductVariantTranslationSpec.php b/src/Sylius/Component/Product/spec/Model/ProductVariantTranslationSpec.php index 110150ed3b..2f7cc4d71a 100644 --- a/src/Sylius/Component/Product/spec/Model/ProductVariantTranslationSpec.php +++ b/src/Sylius/Component/Product/spec/Model/ProductVariantTranslationSpec.php @@ -15,7 +15,7 @@ namespace spec\Sylius\Component\Product\Model; use PhpSpec\ObjectBehavior; use Sylius\Component\Product\Model\ProductVariantTranslationInterface; -use Sylius\Component\Resource\Model\AbstractTranslation; +use Sylius\Resource\Model\AbstractTranslation; final class ProductVariantTranslationSpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Promotion/Exception/UnsupportedTypeException.php b/src/Sylius/Component/Promotion/Exception/UnsupportedTypeException.php index cc806dd902..48c1d64669 100644 --- a/src/Sylius/Component/Promotion/Exception/UnsupportedTypeException.php +++ b/src/Sylius/Component/Promotion/Exception/UnsupportedTypeException.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Promotion\Exception; -use Sylius\Component\Resource\Exception\UnexpectedTypeException; +use Sylius\Resource\Exception\UnexpectedTypeException; final class UnsupportedTypeException extends UnexpectedTypeException { diff --git a/src/Sylius/Component/Promotion/Factory/PromotionCouponFactory.php b/src/Sylius/Component/Promotion/Factory/PromotionCouponFactory.php index 215f02e28c..e866226936 100644 --- a/src/Sylius/Component/Promotion/Factory/PromotionCouponFactory.php +++ b/src/Sylius/Component/Promotion/Factory/PromotionCouponFactory.php @@ -15,14 +15,17 @@ namespace Sylius\Component\Promotion\Factory; use Sylius\Component\Promotion\Model\PromotionCouponInterface; use Sylius\Component\Promotion\Model\PromotionInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Webmozart\Assert\Assert; /** - * @implements PromotionCouponFactoryInterface + * @template T of PromotionCouponInterface + * + * @implements PromotionCouponFactoryInterface */ final class PromotionCouponFactory implements PromotionCouponFactoryInterface { + /** @param FactoryInterface $factory */ public function __construct(private FactoryInterface $factory) { } diff --git a/src/Sylius/Component/Promotion/Factory/PromotionCouponFactoryInterface.php b/src/Sylius/Component/Promotion/Factory/PromotionCouponFactoryInterface.php index e8f8866580..6572f7485e 100644 --- a/src/Sylius/Component/Promotion/Factory/PromotionCouponFactoryInterface.php +++ b/src/Sylius/Component/Promotion/Factory/PromotionCouponFactoryInterface.php @@ -15,7 +15,7 @@ namespace Sylius\Component\Promotion\Factory; use Sylius\Component\Promotion\Model\PromotionCouponInterface; use Sylius\Component\Promotion\Model\PromotionInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; /** * @template T of PromotionCouponInterface diff --git a/src/Sylius/Component/Promotion/Generator/PromotionCouponGenerator.php b/src/Sylius/Component/Promotion/Generator/PromotionCouponGenerator.php index abe4503116..0ea2b13585 100644 --- a/src/Sylius/Component/Promotion/Generator/PromotionCouponGenerator.php +++ b/src/Sylius/Component/Promotion/Generator/PromotionCouponGenerator.php @@ -18,11 +18,12 @@ use Sylius\Component\Promotion\Exception\FailedGenerationException; use Sylius\Component\Promotion\Model\PromotionCouponInterface; use Sylius\Component\Promotion\Model\PromotionInterface; use Sylius\Component\Promotion\Repository\PromotionCouponRepositoryInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; use Webmozart\Assert\Assert; final class PromotionCouponGenerator implements PromotionCouponGeneratorInterface { + /** @param FactoryInterface $couponFactory */ public function __construct( private FactoryInterface $couponFactory, private PromotionCouponRepositoryInterface $couponRepository, diff --git a/src/Sylius/Component/Promotion/Model/CatalogPromotion.php b/src/Sylius/Component/Promotion/Model/CatalogPromotion.php index 0d65e64713..63bf23d54f 100644 --- a/src/Sylius/Component/Promotion/Model/CatalogPromotion.php +++ b/src/Sylius/Component/Promotion/Model/CatalogPromotion.php @@ -15,8 +15,8 @@ namespace Sylius\Component\Promotion\Model; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; -use Sylius\Component\Resource\Model\TranslatableTrait; -use Sylius\Component\Resource\Model\TranslationInterface; +use Sylius\Resource\Model\TranslatableTrait; +use Sylius\Resource\Model\TranslationInterface; class CatalogPromotion implements CatalogPromotionInterface { diff --git a/src/Sylius/Component/Promotion/Model/CatalogPromotionActionInterface.php b/src/Sylius/Component/Promotion/Model/CatalogPromotionActionInterface.php index 6013764714..c00d18bc89 100644 --- a/src/Sylius/Component/Promotion/Model/CatalogPromotionActionInterface.php +++ b/src/Sylius/Component/Promotion/Model/CatalogPromotionActionInterface.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Promotion\Model; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ResourceInterface; interface CatalogPromotionActionInterface extends ResourceInterface { diff --git a/src/Sylius/Component/Promotion/Model/CatalogPromotionInterface.php b/src/Sylius/Component/Promotion/Model/CatalogPromotionInterface.php index 92581cd0f4..842c018376 100644 --- a/src/Sylius/Component/Promotion/Model/CatalogPromotionInterface.php +++ b/src/Sylius/Component/Promotion/Model/CatalogPromotionInterface.php @@ -14,11 +14,11 @@ declare(strict_types=1); namespace Sylius\Component\Promotion\Model; use Doctrine\Common\Collections\Collection; -use Sylius\Component\Resource\Model\CodeAwareInterface; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\ToggleableInterface; -use Sylius\Component\Resource\Model\TranslatableInterface; -use Sylius\Component\Resource\Model\TranslationInterface; +use Sylius\Resource\Model\CodeAwareInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ToggleableInterface; +use Sylius\Resource\Model\TranslatableInterface; +use Sylius\Resource\Model\TranslationInterface; interface CatalogPromotionInterface extends ResourceInterface, CodeAwareInterface, TranslatableInterface, ToggleableInterface { diff --git a/src/Sylius/Component/Promotion/Model/CatalogPromotionScopeInterface.php b/src/Sylius/Component/Promotion/Model/CatalogPromotionScopeInterface.php index ae6ae9e697..a170e1118a 100644 --- a/src/Sylius/Component/Promotion/Model/CatalogPromotionScopeInterface.php +++ b/src/Sylius/Component/Promotion/Model/CatalogPromotionScopeInterface.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Promotion\Model; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ResourceInterface; interface CatalogPromotionScopeInterface extends ResourceInterface { diff --git a/src/Sylius/Component/Promotion/Model/CatalogPromotionTranslation.php b/src/Sylius/Component/Promotion/Model/CatalogPromotionTranslation.php index 58894d8a56..98126e4838 100644 --- a/src/Sylius/Component/Promotion/Model/CatalogPromotionTranslation.php +++ b/src/Sylius/Component/Promotion/Model/CatalogPromotionTranslation.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Promotion\Model; -use Sylius\Component\Resource\Model\AbstractTranslation; +use Sylius\Resource\Model\AbstractTranslation; class CatalogPromotionTranslation extends AbstractTranslation implements CatalogPromotionTranslationInterface { diff --git a/src/Sylius/Component/Promotion/Model/CatalogPromotionTranslationInterface.php b/src/Sylius/Component/Promotion/Model/CatalogPromotionTranslationInterface.php index e4e91b49ef..24233cc0bc 100644 --- a/src/Sylius/Component/Promotion/Model/CatalogPromotionTranslationInterface.php +++ b/src/Sylius/Component/Promotion/Model/CatalogPromotionTranslationInterface.php @@ -13,8 +13,8 @@ declare(strict_types=1); namespace Sylius\Component\Promotion\Model; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\TranslationInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\TranslationInterface; interface CatalogPromotionTranslationInterface extends ResourceInterface, TranslationInterface { diff --git a/src/Sylius/Component/Promotion/Model/ConfigurablePromotionElementInterface.php b/src/Sylius/Component/Promotion/Model/ConfigurablePromotionElementInterface.php index 801ef3479c..7745d430ce 100644 --- a/src/Sylius/Component/Promotion/Model/ConfigurablePromotionElementInterface.php +++ b/src/Sylius/Component/Promotion/Model/ConfigurablePromotionElementInterface.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Promotion\Model; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ResourceInterface; interface ConfigurablePromotionElementInterface extends ResourceInterface { diff --git a/src/Sylius/Component/Promotion/Model/Promotion.php b/src/Sylius/Component/Promotion/Model/Promotion.php index b6a6669ad7..002d21e631 100644 --- a/src/Sylius/Component/Promotion/Model/Promotion.php +++ b/src/Sylius/Component/Promotion/Model/Promotion.php @@ -15,10 +15,10 @@ namespace Sylius\Component\Promotion\Model; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; -use Sylius\Component\Resource\Model\ArchivableTrait; -use Sylius\Component\Resource\Model\TimestampableTrait; -use Sylius\Component\Resource\Model\TranslatableTrait; -use Sylius\Component\Resource\Model\TranslationInterface; +use Sylius\Resource\Model\ArchivableTrait; +use Sylius\Resource\Model\TimestampableTrait; +use Sylius\Resource\Model\TranslatableTrait; +use Sylius\Resource\Model\TranslationInterface; class Promotion implements PromotionInterface { diff --git a/src/Sylius/Component/Promotion/Model/PromotionActionInterface.php b/src/Sylius/Component/Promotion/Model/PromotionActionInterface.php index 1ef081c4f7..891bebe31c 100644 --- a/src/Sylius/Component/Promotion/Model/PromotionActionInterface.php +++ b/src/Sylius/Component/Promotion/Model/PromotionActionInterface.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Promotion\Model; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ResourceInterface; interface PromotionActionInterface extends ResourceInterface, ConfigurablePromotionElementInterface { diff --git a/src/Sylius/Component/Promotion/Model/PromotionCoupon.php b/src/Sylius/Component/Promotion/Model/PromotionCoupon.php index fd46d4fb0d..206fc78d04 100644 --- a/src/Sylius/Component/Promotion/Model/PromotionCoupon.php +++ b/src/Sylius/Component/Promotion/Model/PromotionCoupon.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Promotion\Model; -use Sylius\Component\Resource\Model\TimestampableTrait; +use Sylius\Resource\Model\TimestampableTrait; class PromotionCoupon implements PromotionCouponInterface { diff --git a/src/Sylius/Component/Promotion/Model/PromotionCouponInterface.php b/src/Sylius/Component/Promotion/Model/PromotionCouponInterface.php index b4e44bec2c..12fd894bf5 100644 --- a/src/Sylius/Component/Promotion/Model/PromotionCouponInterface.php +++ b/src/Sylius/Component/Promotion/Model/PromotionCouponInterface.php @@ -13,9 +13,9 @@ declare(strict_types=1); namespace Sylius\Component\Promotion\Model; -use Sylius\Component\Resource\Model\CodeAwareInterface; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\TimestampableInterface; +use Sylius\Resource\Model\CodeAwareInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\TimestampableInterface; interface PromotionCouponInterface extends CodeAwareInterface, TimestampableInterface, ResourceInterface { diff --git a/src/Sylius/Component/Promotion/Model/PromotionInterface.php b/src/Sylius/Component/Promotion/Model/PromotionInterface.php index 556a1b1fa6..d679bee470 100644 --- a/src/Sylius/Component/Promotion/Model/PromotionInterface.php +++ b/src/Sylius/Component/Promotion/Model/PromotionInterface.php @@ -14,11 +14,11 @@ declare(strict_types=1); namespace Sylius\Component\Promotion\Model; use Doctrine\Common\Collections\Collection; -use Sylius\Component\Resource\Model\ArchivableInterface; -use Sylius\Component\Resource\Model\CodeAwareInterface; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\TimestampableInterface; -use Sylius\Component\Resource\Model\TranslatableInterface; +use Sylius\Resource\Model\ArchivableInterface; +use Sylius\Resource\Model\CodeAwareInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\TimestampableInterface; +use Sylius\Resource\Model\TranslatableInterface; interface PromotionInterface extends ArchivableInterface, CodeAwareInterface, TimestampableInterface, TranslatableInterface, ResourceInterface { diff --git a/src/Sylius/Component/Promotion/Model/PromotionRuleInterface.php b/src/Sylius/Component/Promotion/Model/PromotionRuleInterface.php index 76a33e12b9..66a445db7f 100644 --- a/src/Sylius/Component/Promotion/Model/PromotionRuleInterface.php +++ b/src/Sylius/Component/Promotion/Model/PromotionRuleInterface.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Promotion\Model; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ResourceInterface; interface PromotionRuleInterface extends ResourceInterface, ConfigurablePromotionElementInterface { diff --git a/src/Sylius/Component/Promotion/Model/PromotionTranslation.php b/src/Sylius/Component/Promotion/Model/PromotionTranslation.php index ed10eace08..fadb7504a7 100644 --- a/src/Sylius/Component/Promotion/Model/PromotionTranslation.php +++ b/src/Sylius/Component/Promotion/Model/PromotionTranslation.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Promotion\Model; -use Sylius\Component\Resource\Model\AbstractTranslation; +use Sylius\Resource\Model\AbstractTranslation; class PromotionTranslation extends AbstractTranslation implements PromotionTranslationInterface { diff --git a/src/Sylius/Component/Promotion/Model/PromotionTranslationInterface.php b/src/Sylius/Component/Promotion/Model/PromotionTranslationInterface.php index cf9cb72dac..3d41bb7e43 100644 --- a/src/Sylius/Component/Promotion/Model/PromotionTranslationInterface.php +++ b/src/Sylius/Component/Promotion/Model/PromotionTranslationInterface.php @@ -13,8 +13,8 @@ declare(strict_types=1); namespace Sylius\Component\Promotion\Model; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\TranslationInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\TranslationInterface; interface PromotionTranslationInterface extends ResourceInterface, TranslationInterface { diff --git a/src/Sylius/Component/Promotion/Repository/CatalogPromotionRepositoryInterface.php b/src/Sylius/Component/Promotion/Repository/CatalogPromotionRepositoryInterface.php index 3a8d7aaaef..ed6eb44958 100644 --- a/src/Sylius/Component/Promotion/Repository/CatalogPromotionRepositoryInterface.php +++ b/src/Sylius/Component/Promotion/Repository/CatalogPromotionRepositoryInterface.php @@ -15,7 +15,7 @@ namespace Sylius\Component\Promotion\Repository; use Sylius\Bundle\PromotionBundle\Criteria\CriteriaInterface; use Sylius\Component\Promotion\Model\CatalogPromotionInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of CatalogPromotionInterface diff --git a/src/Sylius/Component/Promotion/Repository/PromotionCouponRepositoryInterface.php b/src/Sylius/Component/Promotion/Repository/PromotionCouponRepositoryInterface.php index 06991b9208..c2096d3298 100644 --- a/src/Sylius/Component/Promotion/Repository/PromotionCouponRepositoryInterface.php +++ b/src/Sylius/Component/Promotion/Repository/PromotionCouponRepositoryInterface.php @@ -15,7 +15,7 @@ namespace Sylius\Component\Promotion\Repository; use Doctrine\ORM\QueryBuilder; use Sylius\Component\Promotion\Model\PromotionCouponInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of PromotionCouponInterface diff --git a/src/Sylius/Component/Promotion/Repository/PromotionRepositoryInterface.php b/src/Sylius/Component/Promotion/Repository/PromotionRepositoryInterface.php index 8fb97e7c37..6102a758e4 100644 --- a/src/Sylius/Component/Promotion/Repository/PromotionRepositoryInterface.php +++ b/src/Sylius/Component/Promotion/Repository/PromotionRepositoryInterface.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Sylius\Component\Promotion\Repository; use Sylius\Component\Promotion\Model\PromotionInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of PromotionInterface diff --git a/src/Sylius/Component/Promotion/composer.json b/src/Sylius/Component/Promotion/composer.json index a8b9537efb..f8da09faa0 100644 --- a/src/Sylius/Component/Promotion/composer.json +++ b/src/Sylius/Component/Promotion/composer.json @@ -28,7 +28,7 @@ "php": "^8.2", "doctrine/orm": "^2.13", "sylius/registry": "^1.6", - "sylius/resource": "^1.10" + "sylius/resource": "^1.11" }, "require-dev": { "phpspec/phpspec": "^7.2" diff --git a/src/Sylius/Component/Promotion/spec/Factory/PromotionCouponFactorySpec.php b/src/Sylius/Component/Promotion/spec/Factory/PromotionCouponFactorySpec.php index 4b3fc81f49..250581dc1b 100644 --- a/src/Sylius/Component/Promotion/spec/Factory/PromotionCouponFactorySpec.php +++ b/src/Sylius/Component/Promotion/spec/Factory/PromotionCouponFactorySpec.php @@ -17,7 +17,7 @@ use PhpSpec\ObjectBehavior; use Sylius\Component\Promotion\Factory\PromotionCouponFactoryInterface; use Sylius\Component\Promotion\Model\PromotionCouponInterface; use Sylius\Component\Promotion\Model\PromotionInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class PromotionCouponFactorySpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Promotion/spec/Generator/PromotionCouponGeneratorSpec.php b/src/Sylius/Component/Promotion/spec/Generator/PromotionCouponGeneratorSpec.php index 37e996b6d0..d4b05cc05d 100644 --- a/src/Sylius/Component/Promotion/spec/Generator/PromotionCouponGeneratorSpec.php +++ b/src/Sylius/Component/Promotion/spec/Generator/PromotionCouponGeneratorSpec.php @@ -23,7 +23,7 @@ use Sylius\Component\Promotion\Generator\ReadablePromotionCouponGeneratorInstruc use Sylius\Component\Promotion\Model\PromotionCouponInterface; use Sylius\Component\Promotion\Model\PromotionInterface; use Sylius\Component\Promotion\Repository\PromotionCouponRepositoryInterface; -use Sylius\Component\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\FactoryInterface; final class PromotionCouponGeneratorSpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Review/Factory/ReviewFactory.php b/src/Sylius/Component/Review/Factory/ReviewFactory.php index a8e64652b0..84589b59df 100644 --- a/src/Sylius/Component/Review/Factory/ReviewFactory.php +++ b/src/Sylius/Component/Review/Factory/ReviewFactory.php @@ -13,16 +13,19 @@ declare(strict_types=1); namespace Sylius\Component\Review\Factory; -use Sylius\Component\Resource\Factory\FactoryInterface; use Sylius\Component\Review\Model\ReviewableInterface; use Sylius\Component\Review\Model\ReviewerInterface; use Sylius\Component\Review\Model\ReviewInterface; +use Sylius\Resource\Factory\FactoryInterface; /** - * @implements ReviewFactoryInterface + * @template T of ReviewInterface + * + * @implements ReviewFactoryInterface */ final class ReviewFactory implements ReviewFactoryInterface { + /** @param FactoryInterface $factory */ public function __construct(private FactoryInterface $factory) { } diff --git a/src/Sylius/Component/Review/Factory/ReviewFactoryInterface.php b/src/Sylius/Component/Review/Factory/ReviewFactoryInterface.php index e2d6773e60..a434bcc8d8 100644 --- a/src/Sylius/Component/Review/Factory/ReviewFactoryInterface.php +++ b/src/Sylius/Component/Review/Factory/ReviewFactoryInterface.php @@ -13,10 +13,10 @@ declare(strict_types=1); namespace Sylius\Component\Review\Factory; -use Sylius\Component\Resource\Factory\FactoryInterface; use Sylius\Component\Review\Model\ReviewableInterface; use Sylius\Component\Review\Model\ReviewerInterface; use Sylius\Component\Review\Model\ReviewInterface; +use Sylius\Resource\Factory\FactoryInterface; /** * @template T of ReviewInterface diff --git a/src/Sylius/Component/Review/Model/Review.php b/src/Sylius/Component/Review/Model/Review.php index 7c1b690e42..9a33d86072 100644 --- a/src/Sylius/Component/Review/Model/Review.php +++ b/src/Sylius/Component/Review/Model/Review.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Review\Model; -use Sylius\Component\Resource\Model\TimestampableTrait; +use Sylius\Resource\Model\TimestampableTrait; class Review implements ReviewInterface { diff --git a/src/Sylius/Component/Review/Model/ReviewInterface.php b/src/Sylius/Component/Review/Model/ReviewInterface.php index e0149874e8..eadf4f613b 100644 --- a/src/Sylius/Component/Review/Model/ReviewInterface.php +++ b/src/Sylius/Component/Review/Model/ReviewInterface.php @@ -13,8 +13,8 @@ declare(strict_types=1); namespace Sylius\Component\Review\Model; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\TimestampableInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\TimestampableInterface; interface ReviewInterface extends TimestampableInterface, ResourceInterface { diff --git a/src/Sylius/Component/Review/Model/ReviewerInterface.php b/src/Sylius/Component/Review/Model/ReviewerInterface.php index 6779bb3bd6..bbc3277861 100644 --- a/src/Sylius/Component/Review/Model/ReviewerInterface.php +++ b/src/Sylius/Component/Review/Model/ReviewerInterface.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Review\Model; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ResourceInterface; interface ReviewerInterface extends ResourceInterface { diff --git a/src/Sylius/Component/Review/composer.json b/src/Sylius/Component/Review/composer.json index bec653616a..f628a39dc4 100644 --- a/src/Sylius/Component/Review/composer.json +++ b/src/Sylius/Component/Review/composer.json @@ -39,7 +39,7 @@ "require": { "php": "^8.2", "doctrine/collections": "^1.6", - "sylius/resource": "^1.10" + "sylius/resource": "^1.11" }, "require-dev": { "phpspec/phpspec": "^7.2" diff --git a/src/Sylius/Component/Review/spec/Factory/ReviewFactorySpec.php b/src/Sylius/Component/Review/spec/Factory/ReviewFactorySpec.php index ae29f803c6..c990013632 100644 --- a/src/Sylius/Component/Review/spec/Factory/ReviewFactorySpec.php +++ b/src/Sylius/Component/Review/spec/Factory/ReviewFactorySpec.php @@ -14,11 +14,11 @@ declare(strict_types=1); namespace spec\Sylius\Component\Review\Factory; use PhpSpec\ObjectBehavior; -use Sylius\Component\Resource\Factory\FactoryInterface; use Sylius\Component\Review\Factory\ReviewFactoryInterface; use Sylius\Component\Review\Model\ReviewableInterface; use Sylius\Component\Review\Model\ReviewerInterface; use Sylius\Component\Review\Model\ReviewInterface; +use Sylius\Resource\Factory\FactoryInterface; final class ReviewFactorySpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Shipping/Model/ConfigurableShippingMethodElementInterface.php b/src/Sylius/Component/Shipping/Model/ConfigurableShippingMethodElementInterface.php index dc576ed847..6164a4515f 100644 --- a/src/Sylius/Component/Shipping/Model/ConfigurableShippingMethodElementInterface.php +++ b/src/Sylius/Component/Shipping/Model/ConfigurableShippingMethodElementInterface.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Shipping\Model; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ResourceInterface; interface ConfigurableShippingMethodElementInterface extends ResourceInterface { diff --git a/src/Sylius/Component/Shipping/Model/Shipment.php b/src/Sylius/Component/Shipping/Model/Shipment.php index 9ae45bb531..557fc61b8f 100644 --- a/src/Sylius/Component/Shipping/Model/Shipment.php +++ b/src/Sylius/Component/Shipping/Model/Shipment.php @@ -15,7 +15,7 @@ namespace Sylius\Component\Shipping\Model; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; -use Sylius\Component\Resource\Model\TimestampableTrait; +use Sylius\Resource\Model\TimestampableTrait; class Shipment implements ShipmentInterface, \Stringable { diff --git a/src/Sylius/Component/Shipping/Model/ShipmentInterface.php b/src/Sylius/Component/Shipping/Model/ShipmentInterface.php index 32252ac510..2e2e81d414 100644 --- a/src/Sylius/Component/Shipping/Model/ShipmentInterface.php +++ b/src/Sylius/Component/Shipping/Model/ShipmentInterface.php @@ -14,8 +14,8 @@ declare(strict_types=1); namespace Sylius\Component\Shipping\Model; use Doctrine\Common\Collections\Collection; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\TimestampableInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\TimestampableInterface; interface ShipmentInterface extends ResourceInterface, ShippingSubjectInterface, TimestampableInterface { diff --git a/src/Sylius/Component/Shipping/Model/ShipmentUnit.php b/src/Sylius/Component/Shipping/Model/ShipmentUnit.php index b90f0d0301..d928baf042 100644 --- a/src/Sylius/Component/Shipping/Model/ShipmentUnit.php +++ b/src/Sylius/Component/Shipping/Model/ShipmentUnit.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Shipping\Model; -use Sylius\Component\Resource\Model\TimestampableTrait; +use Sylius\Resource\Model\TimestampableTrait; class ShipmentUnit implements ShipmentUnitInterface, \Stringable { diff --git a/src/Sylius/Component/Shipping/Model/ShipmentUnitInterface.php b/src/Sylius/Component/Shipping/Model/ShipmentUnitInterface.php index 9fbc310351..88afd41a8c 100644 --- a/src/Sylius/Component/Shipping/Model/ShipmentUnitInterface.php +++ b/src/Sylius/Component/Shipping/Model/ShipmentUnitInterface.php @@ -13,8 +13,8 @@ declare(strict_types=1); namespace Sylius\Component\Shipping\Model; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\TimestampableInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\TimestampableInterface; interface ShipmentUnitInterface extends TimestampableInterface, ResourceInterface { diff --git a/src/Sylius/Component/Shipping/Model/ShippingCategory.php b/src/Sylius/Component/Shipping/Model/ShippingCategory.php index b1a3f57e61..36b01bb83d 100644 --- a/src/Sylius/Component/Shipping/Model/ShippingCategory.php +++ b/src/Sylius/Component/Shipping/Model/ShippingCategory.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Shipping\Model; -use Sylius\Component\Resource\Model\TimestampableTrait; +use Sylius\Resource\Model\TimestampableTrait; class ShippingCategory implements ShippingCategoryInterface, \Stringable { diff --git a/src/Sylius/Component/Shipping/Model/ShippingCategoryInterface.php b/src/Sylius/Component/Shipping/Model/ShippingCategoryInterface.php index e2250f3772..cd35e44a14 100644 --- a/src/Sylius/Component/Shipping/Model/ShippingCategoryInterface.php +++ b/src/Sylius/Component/Shipping/Model/ShippingCategoryInterface.php @@ -13,9 +13,9 @@ declare(strict_types=1); namespace Sylius\Component\Shipping\Model; -use Sylius\Component\Resource\Model\CodeAwareInterface; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\TimestampableInterface; +use Sylius\Resource\Model\CodeAwareInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\TimestampableInterface; interface ShippingCategoryInterface extends CodeAwareInterface, TimestampableInterface, ResourceInterface { diff --git a/src/Sylius/Component/Shipping/Model/ShippingMethod.php b/src/Sylius/Component/Shipping/Model/ShippingMethod.php index d5901bd0b3..4dcde91f09 100644 --- a/src/Sylius/Component/Shipping/Model/ShippingMethod.php +++ b/src/Sylius/Component/Shipping/Model/ShippingMethod.php @@ -15,11 +15,11 @@ namespace Sylius\Component\Shipping\Model; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; -use Sylius\Component\Resource\Model\ArchivableTrait; -use Sylius\Component\Resource\Model\TimestampableTrait; -use Sylius\Component\Resource\Model\ToggleableTrait; -use Sylius\Component\Resource\Model\TranslatableTrait; -use Sylius\Component\Resource\Model\TranslationInterface; +use Sylius\Resource\Model\ArchivableTrait; +use Sylius\Resource\Model\TimestampableTrait; +use Sylius\Resource\Model\ToggleableTrait; +use Sylius\Resource\Model\TranslatableTrait; +use Sylius\Resource\Model\TranslationInterface; class ShippingMethod implements ShippingMethodInterface, \Stringable { diff --git a/src/Sylius/Component/Shipping/Model/ShippingMethodInterface.php b/src/Sylius/Component/Shipping/Model/ShippingMethodInterface.php index 4c7aa61993..0fdc2db463 100644 --- a/src/Sylius/Component/Shipping/Model/ShippingMethodInterface.php +++ b/src/Sylius/Component/Shipping/Model/ShippingMethodInterface.php @@ -14,13 +14,13 @@ declare(strict_types=1); namespace Sylius\Component\Shipping\Model; use Doctrine\Common\Collections\Collection; -use Sylius\Component\Resource\Model\ArchivableInterface; -use Sylius\Component\Resource\Model\CodeAwareInterface; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\TimestampableInterface; -use Sylius\Component\Resource\Model\ToggleableInterface; -use Sylius\Component\Resource\Model\TranslatableInterface; -use Sylius\Component\Resource\Model\TranslationInterface; +use Sylius\Resource\Model\ArchivableInterface; +use Sylius\Resource\Model\CodeAwareInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\TimestampableInterface; +use Sylius\Resource\Model\ToggleableInterface; +use Sylius\Resource\Model\TranslatableInterface; +use Sylius\Resource\Model\TranslationInterface; interface ShippingMethodInterface extends ResourceInterface, diff --git a/src/Sylius/Component/Shipping/Model/ShippingMethodRuleInterface.php b/src/Sylius/Component/Shipping/Model/ShippingMethodRuleInterface.php index eafaf7282e..4a4ec71eb0 100644 --- a/src/Sylius/Component/Shipping/Model/ShippingMethodRuleInterface.php +++ b/src/Sylius/Component/Shipping/Model/ShippingMethodRuleInterface.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Shipping\Model; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ResourceInterface; interface ShippingMethodRuleInterface extends ResourceInterface, ConfigurableShippingMethodElementInterface { diff --git a/src/Sylius/Component/Shipping/Model/ShippingMethodTranslation.php b/src/Sylius/Component/Shipping/Model/ShippingMethodTranslation.php index 047f8266e5..48f4b45c86 100644 --- a/src/Sylius/Component/Shipping/Model/ShippingMethodTranslation.php +++ b/src/Sylius/Component/Shipping/Model/ShippingMethodTranslation.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Shipping\Model; -use Sylius\Component\Resource\Model\AbstractTranslation; +use Sylius\Resource\Model\AbstractTranslation; class ShippingMethodTranslation extends AbstractTranslation implements ShippingMethodTranslationInterface, \Stringable { diff --git a/src/Sylius/Component/Shipping/Model/ShippingMethodTranslationInterface.php b/src/Sylius/Component/Shipping/Model/ShippingMethodTranslationInterface.php index 4d40b77814..36a0b82e1e 100644 --- a/src/Sylius/Component/Shipping/Model/ShippingMethodTranslationInterface.php +++ b/src/Sylius/Component/Shipping/Model/ShippingMethodTranslationInterface.php @@ -13,8 +13,8 @@ declare(strict_types=1); namespace Sylius\Component\Shipping\Model; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\TranslationInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\TranslationInterface; interface ShippingMethodTranslationInterface extends ResourceInterface, TranslationInterface { diff --git a/src/Sylius/Component/Shipping/Repository/ShippingMethodRepositoryInterface.php b/src/Sylius/Component/Shipping/Repository/ShippingMethodRepositoryInterface.php index eae3d41ab7..0d2fea29a5 100644 --- a/src/Sylius/Component/Shipping/Repository/ShippingMethodRepositoryInterface.php +++ b/src/Sylius/Component/Shipping/Repository/ShippingMethodRepositoryInterface.php @@ -13,8 +13,8 @@ declare(strict_types=1); namespace Sylius\Component\Shipping\Repository; -use Sylius\Component\Resource\Repository\RepositoryInterface; use Sylius\Component\Shipping\Model\ShippingMethodInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of ShippingMethodInterface diff --git a/src/Sylius/Component/Shipping/composer.json b/src/Sylius/Component/Shipping/composer.json index 354d3a3220..c7959726b0 100644 --- a/src/Sylius/Component/Shipping/composer.json +++ b/src/Sylius/Component/Shipping/composer.json @@ -30,7 +30,7 @@ "require": { "php": "^8.2", "sylius/registry": "^1.6", - "sylius/resource": "^1.10", + "sylius/resource": "^1.11", "symfony/options-resolver": "^6.4.0" }, "require-dev": { diff --git a/src/Sylius/Component/Shipping/spec/Model/ShippingMethodSpec.php b/src/Sylius/Component/Shipping/spec/Model/ShippingMethodSpec.php index c7add4bfb8..7464343eb8 100644 --- a/src/Sylius/Component/Shipping/spec/Model/ShippingMethodSpec.php +++ b/src/Sylius/Component/Shipping/spec/Model/ShippingMethodSpec.php @@ -32,7 +32,7 @@ final class ShippingMethodSpec extends ObjectBehavior function it_implements_Sylius_toogleable_interface(): void { - $this->shouldImplement('Sylius\Component\Resource\Model\ToggleableInterface'); + $this->shouldImplement('Sylius\Resource\Model\ToggleableInterface'); } function it_has_no_id_by_default(): void diff --git a/src/Sylius/Component/Taxation/Model/TaxCategory.php b/src/Sylius/Component/Taxation/Model/TaxCategory.php index 34c4460fa0..598dd84ae7 100644 --- a/src/Sylius/Component/Taxation/Model/TaxCategory.php +++ b/src/Sylius/Component/Taxation/Model/TaxCategory.php @@ -15,7 +15,7 @@ namespace Sylius\Component\Taxation\Model; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; -use Sylius\Component\Resource\Model\TimestampableTrait; +use Sylius\Resource\Model\TimestampableTrait; class TaxCategory implements TaxCategoryInterface, \Stringable { diff --git a/src/Sylius/Component/Taxation/Model/TaxCategoryInterface.php b/src/Sylius/Component/Taxation/Model/TaxCategoryInterface.php index 3cd17eb4a6..0717f07e3f 100644 --- a/src/Sylius/Component/Taxation/Model/TaxCategoryInterface.php +++ b/src/Sylius/Component/Taxation/Model/TaxCategoryInterface.php @@ -14,9 +14,9 @@ declare(strict_types=1); namespace Sylius\Component\Taxation\Model; use Doctrine\Common\Collections\Collection; -use Sylius\Component\Resource\Model\CodeAwareInterface; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\TimestampableInterface; +use Sylius\Resource\Model\CodeAwareInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\TimestampableInterface; interface TaxCategoryInterface extends CodeAwareInterface, TimestampableInterface, ResourceInterface { diff --git a/src/Sylius/Component/Taxation/Model/TaxRate.php b/src/Sylius/Component/Taxation/Model/TaxRate.php index 199a1fb074..e6c5b3d7a1 100644 --- a/src/Sylius/Component/Taxation/Model/TaxRate.php +++ b/src/Sylius/Component/Taxation/Model/TaxRate.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Taxation\Model; -use Sylius\Component\Resource\Model\TimestampableTrait; +use Sylius\Resource\Model\TimestampableTrait; class TaxRate implements TaxRateInterface { diff --git a/src/Sylius/Component/Taxation/Model/TaxRateInterface.php b/src/Sylius/Component/Taxation/Model/TaxRateInterface.php index 1a2e409b21..9ad829560e 100644 --- a/src/Sylius/Component/Taxation/Model/TaxRateInterface.php +++ b/src/Sylius/Component/Taxation/Model/TaxRateInterface.php @@ -13,9 +13,9 @@ declare(strict_types=1); namespace Sylius\Component\Taxation\Model; -use Sylius\Component\Resource\Model\CodeAwareInterface; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\TimestampableInterface; +use Sylius\Resource\Model\CodeAwareInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\TimestampableInterface; interface TaxRateInterface extends CodeAwareInterface, TimestampableInterface, ResourceInterface { diff --git a/src/Sylius/Component/Taxation/Repository/TaxCategoryRepositoryInterface.php b/src/Sylius/Component/Taxation/Repository/TaxCategoryRepositoryInterface.php index bc588b667a..ef8e252209 100644 --- a/src/Sylius/Component/Taxation/Repository/TaxCategoryRepositoryInterface.php +++ b/src/Sylius/Component/Taxation/Repository/TaxCategoryRepositoryInterface.php @@ -13,8 +13,8 @@ declare(strict_types=1); namespace Sylius\Component\Taxation\Repository; -use Sylius\Component\Resource\Repository\RepositoryInterface; use Sylius\Component\Taxation\Model\TaxCategoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of TaxCategoryInterface diff --git a/src/Sylius/Component/Taxation/Resolver/TaxRateResolver.php b/src/Sylius/Component/Taxation/Resolver/TaxRateResolver.php index 6f8d8931bc..524b22dad8 100644 --- a/src/Sylius/Component/Taxation/Resolver/TaxRateResolver.php +++ b/src/Sylius/Component/Taxation/Resolver/TaxRateResolver.php @@ -13,13 +13,14 @@ declare(strict_types=1); namespace Sylius\Component\Taxation\Resolver; -use Sylius\Component\Resource\Repository\RepositoryInterface; use Sylius\Component\Taxation\Checker\TaxRateDateEligibilityCheckerInterface; use Sylius\Component\Taxation\Model\TaxableInterface; use Sylius\Component\Taxation\Model\TaxRateInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; class TaxRateResolver implements TaxRateResolverInterface { + /** @param RepositoryInterface $taxRateRepository */ public function __construct( protected RepositoryInterface $taxRateRepository, protected TaxRateDateEligibilityCheckerInterface $taxRateDateChecker, diff --git a/src/Sylius/Component/Taxation/composer.json b/src/Sylius/Component/Taxation/composer.json index 6f04f479be..a7f980b1e8 100644 --- a/src/Sylius/Component/Taxation/composer.json +++ b/src/Sylius/Component/Taxation/composer.json @@ -30,7 +30,7 @@ "require": { "php": "^8.2", "sylius/registry": "^1.6", - "sylius/resource": "^1.10", + "sylius/resource": "^1.11", "symfony/clock": "^6.4.0" }, "require-dev": { diff --git a/src/Sylius/Component/Taxation/spec/Resolver/TaxRateResolverSpec.php b/src/Sylius/Component/Taxation/spec/Resolver/TaxRateResolverSpec.php index 8cc1e39d3f..e390a5c0ce 100644 --- a/src/Sylius/Component/Taxation/spec/Resolver/TaxRateResolverSpec.php +++ b/src/Sylius/Component/Taxation/spec/Resolver/TaxRateResolverSpec.php @@ -14,12 +14,12 @@ declare(strict_types=1); namespace spec\Sylius\Component\Taxation\Resolver; use PhpSpec\ObjectBehavior; -use Sylius\Component\Resource\Repository\RepositoryInterface; use Sylius\Component\Taxation\Checker\TaxRateDateEligibilityCheckerInterface; use Sylius\Component\Taxation\Model\TaxableInterface; use Sylius\Component\Taxation\Model\TaxCategoryInterface; use Sylius\Component\Taxation\Model\TaxRateInterface; use Sylius\Component\Taxation\Resolver\TaxRateResolverInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class TaxRateResolverSpec extends ObjectBehavior { diff --git a/src/Sylius/Component/Taxonomy/Factory/TaxonFactory.php b/src/Sylius/Component/Taxonomy/Factory/TaxonFactory.php index 03053c283a..af03bf9ba0 100644 --- a/src/Sylius/Component/Taxonomy/Factory/TaxonFactory.php +++ b/src/Sylius/Component/Taxonomy/Factory/TaxonFactory.php @@ -13,14 +13,17 @@ declare(strict_types=1); namespace Sylius\Component\Taxonomy\Factory; -use Sylius\Component\Resource\Factory\FactoryInterface; use Sylius\Component\Taxonomy\Model\TaxonInterface; +use Sylius\Resource\Factory\FactoryInterface; /** - * @implements TaxonFactoryInterface + * @template T of TaxonInterface + * + * @implements TaxonFactoryInterface */ final class TaxonFactory implements TaxonFactoryInterface { + /** @param FactoryInterface $factory */ public function __construct(private FactoryInterface $factory) { } diff --git a/src/Sylius/Component/Taxonomy/Factory/TaxonFactoryInterface.php b/src/Sylius/Component/Taxonomy/Factory/TaxonFactoryInterface.php index 308778d9f4..736b389102 100644 --- a/src/Sylius/Component/Taxonomy/Factory/TaxonFactoryInterface.php +++ b/src/Sylius/Component/Taxonomy/Factory/TaxonFactoryInterface.php @@ -13,8 +13,8 @@ declare(strict_types=1); namespace Sylius\Component\Taxonomy\Factory; -use Sylius\Component\Resource\Factory\FactoryInterface; use Sylius\Component\Taxonomy\Model\TaxonInterface; +use Sylius\Resource\Factory\FactoryInterface; /** * @template T of TaxonInterface diff --git a/src/Sylius/Component/Taxonomy/Model/Taxon.php b/src/Sylius/Component/Taxonomy/Model/Taxon.php index abd9fa87f4..4ac922fd58 100644 --- a/src/Sylius/Component/Taxonomy/Model/Taxon.php +++ b/src/Sylius/Component/Taxonomy/Model/Taxon.php @@ -15,9 +15,9 @@ namespace Sylius\Component\Taxonomy\Model; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; -use Sylius\Component\Resource\Model\ToggleableTrait; -use Sylius\Component\Resource\Model\TranslatableTrait; -use Sylius\Component\Resource\Model\TranslationInterface; +use Sylius\Resource\Model\ToggleableTrait; +use Sylius\Resource\Model\TranslatableTrait; +use Sylius\Resource\Model\TranslationInterface; class Taxon implements TaxonInterface, \Stringable { diff --git a/src/Sylius/Component/Taxonomy/Model/TaxonInterface.php b/src/Sylius/Component/Taxonomy/Model/TaxonInterface.php index 7d883d2aed..078f985df8 100644 --- a/src/Sylius/Component/Taxonomy/Model/TaxonInterface.php +++ b/src/Sylius/Component/Taxonomy/Model/TaxonInterface.php @@ -14,12 +14,12 @@ declare(strict_types=1); namespace Sylius\Component\Taxonomy\Model; use Doctrine\Common\Collections\Collection; -use Sylius\Component\Resource\Model\CodeAwareInterface; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\SlugAwareInterface; -use Sylius\Component\Resource\Model\ToggleableInterface; -use Sylius\Component\Resource\Model\TranslatableInterface; -use Sylius\Component\Resource\Model\TranslationInterface; +use Sylius\Resource\Model\CodeAwareInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\SlugAwareInterface; +use Sylius\Resource\Model\ToggleableInterface; +use Sylius\Resource\Model\TranslatableInterface; +use Sylius\Resource\Model\TranslationInterface; interface TaxonInterface extends CodeAwareInterface, TranslatableInterface, ResourceInterface, SlugAwareInterface, ToggleableInterface { diff --git a/src/Sylius/Component/Taxonomy/Model/TaxonTranslation.php b/src/Sylius/Component/Taxonomy/Model/TaxonTranslation.php index 9e4ef97adb..293bb6c856 100644 --- a/src/Sylius/Component/Taxonomy/Model/TaxonTranslation.php +++ b/src/Sylius/Component/Taxonomy/Model/TaxonTranslation.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Taxonomy\Model; -use Sylius\Component\Resource\Model\AbstractTranslation; +use Sylius\Resource\Model\AbstractTranslation; class TaxonTranslation extends AbstractTranslation implements TaxonTranslationInterface, \Stringable { diff --git a/src/Sylius/Component/Taxonomy/Model/TaxonTranslationInterface.php b/src/Sylius/Component/Taxonomy/Model/TaxonTranslationInterface.php index 19fdc25ba4..d986a98ed5 100644 --- a/src/Sylius/Component/Taxonomy/Model/TaxonTranslationInterface.php +++ b/src/Sylius/Component/Taxonomy/Model/TaxonTranslationInterface.php @@ -13,9 +13,9 @@ declare(strict_types=1); namespace Sylius\Component\Taxonomy\Model; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\SlugAwareInterface; -use Sylius\Component\Resource\Model\TranslationInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\SlugAwareInterface; +use Sylius\Resource\Model\TranslationInterface; interface TaxonTranslationInterface extends SlugAwareInterface, ResourceInterface, TranslationInterface { diff --git a/src/Sylius/Component/Taxonomy/Repository/TaxonRepositoryInterface.php b/src/Sylius/Component/Taxonomy/Repository/TaxonRepositoryInterface.php index 0ef37cc8cb..b05afe1fab 100644 --- a/src/Sylius/Component/Taxonomy/Repository/TaxonRepositoryInterface.php +++ b/src/Sylius/Component/Taxonomy/Repository/TaxonRepositoryInterface.php @@ -14,8 +14,8 @@ declare(strict_types=1); namespace Sylius\Component\Taxonomy\Repository; use Doctrine\ORM\QueryBuilder; -use Sylius\Component\Resource\Repository\RepositoryInterface; use Sylius\Component\Taxonomy\Model\TaxonInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of TaxonInterface diff --git a/src/Sylius/Component/Taxonomy/composer.json b/src/Sylius/Component/Taxonomy/composer.json index 68cb164b5a..6854a5c64e 100644 --- a/src/Sylius/Component/Taxonomy/composer.json +++ b/src/Sylius/Component/Taxonomy/composer.json @@ -28,7 +28,7 @@ "require": { "php": "^8.2", "behat/transliterator": "^1.3", - "sylius/resource": "^1.10", + "sylius/resource": "^1.11", "webmozart/assert": "^1.9" }, "require-dev": { diff --git a/src/Sylius/Component/Taxonomy/spec/Factory/TaxonFactorySpec.php b/src/Sylius/Component/Taxonomy/spec/Factory/TaxonFactorySpec.php index 015f179687..b9dc961846 100644 --- a/src/Sylius/Component/Taxonomy/spec/Factory/TaxonFactorySpec.php +++ b/src/Sylius/Component/Taxonomy/spec/Factory/TaxonFactorySpec.php @@ -14,9 +14,9 @@ declare(strict_types=1); namespace spec\Sylius\Component\Taxonomy\Factory; use PhpSpec\ObjectBehavior; -use Sylius\Component\Resource\Factory\FactoryInterface; use Sylius\Component\Taxonomy\Factory\TaxonFactoryInterface; use Sylius\Component\Taxonomy\Model\TaxonInterface; +use Sylius\Resource\Factory\FactoryInterface; final class TaxonFactorySpec extends ObjectBehavior { diff --git a/src/Sylius/Component/User/Model/User.php b/src/Sylius/Component/User/Model/User.php index 7db49156b0..6b415534c1 100644 --- a/src/Sylius/Component/User/Model/User.php +++ b/src/Sylius/Component/User/Model/User.php @@ -15,8 +15,8 @@ namespace Sylius\Component\User\Model; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; -use Sylius\Component\Resource\Model\TimestampableTrait; -use Sylius\Component\Resource\Model\ToggleableTrait; +use Sylius\Resource\Model\TimestampableTrait; +use Sylius\Resource\Model\ToggleableTrait; class User implements UserInterface, \Stringable { diff --git a/src/Sylius/Component/User/Model/UserInterface.php b/src/Sylius/Component/User/Model/UserInterface.php index fc6250c155..56f08e8a47 100644 --- a/src/Sylius/Component/User/Model/UserInterface.php +++ b/src/Sylius/Component/User/Model/UserInterface.php @@ -14,9 +14,9 @@ declare(strict_types=1); namespace Sylius\Component\User\Model; use Doctrine\Common\Collections\Collection; -use Sylius\Component\Resource\Model\ResourceInterface; -use Sylius\Component\Resource\Model\TimestampableInterface; -use Sylius\Component\Resource\Model\ToggleableInterface; +use Sylius\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\TimestampableInterface; +use Sylius\Resource\Model\ToggleableInterface; use SyliusLabs\Polyfill\Symfony\Security\Core\Encoder\EncoderAwareInterface; use SyliusLabs\Polyfill\Symfony\Security\Core\User\AdvancedUserInterface; use Symfony\Component\PasswordHasher\Hasher\PasswordHasherAwareInterface; diff --git a/src/Sylius/Component/User/Model/UserOAuthInterface.php b/src/Sylius/Component/User/Model/UserOAuthInterface.php index 5e56d4163b..0735dc3a7e 100644 --- a/src/Sylius/Component/User/Model/UserOAuthInterface.php +++ b/src/Sylius/Component/User/Model/UserOAuthInterface.php @@ -13,7 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\User\Model; -use Sylius\Component\Resource\Model\ResourceInterface; +use Sylius\Resource\Model\ResourceInterface; interface UserOAuthInterface extends UserAwareInterface, ResourceInterface { diff --git a/src/Sylius/Component/User/Repository/UserRepositoryInterface.php b/src/Sylius/Component/User/Repository/UserRepositoryInterface.php index 1a92dd1cd1..1bea2ab1db 100644 --- a/src/Sylius/Component/User/Repository/UserRepositoryInterface.php +++ b/src/Sylius/Component/User/Repository/UserRepositoryInterface.php @@ -13,8 +13,8 @@ declare(strict_types=1); namespace Sylius\Component\User\Repository; -use Sylius\Component\Resource\Repository\RepositoryInterface; use Sylius\Component\User\Model\UserInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; /** * @template T of UserInterface diff --git a/src/Sylius/Component/User/Security/Checker/TokenUniquenessChecker.php b/src/Sylius/Component/User/Security/Checker/TokenUniquenessChecker.php index bf76733815..3997c267e6 100644 --- a/src/Sylius/Component/User/Security/Checker/TokenUniquenessChecker.php +++ b/src/Sylius/Component/User/Security/Checker/TokenUniquenessChecker.php @@ -13,12 +13,16 @@ declare(strict_types=1); namespace Sylius\Component\User\Security\Checker; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Component\User\Model\UserInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class TokenUniquenessChecker implements UniquenessCheckerInterface { - public function __construct(private RepositoryInterface $repository, private string $tokenFieldName) - { + /** @param RepositoryInterface $repository */ + public function __construct( + private RepositoryInterface $repository, + private string $tokenFieldName, + ) { } public function isUnique(string $token): bool diff --git a/src/Sylius/Component/User/Security/Generator/UniquePinGenerator.php b/src/Sylius/Component/User/Security/Generator/UniquePinGenerator.php index 42c6b0ea02..e8216b3081 100644 --- a/src/Sylius/Component/User/Security/Generator/UniquePinGenerator.php +++ b/src/Sylius/Component/User/Security/Generator/UniquePinGenerator.php @@ -13,8 +13,8 @@ declare(strict_types=1); namespace Sylius\Component\User\Security\Generator; -use Sylius\Component\Resource\Generator\RandomnessGeneratorInterface; use Sylius\Component\User\Security\Checker\UniquenessCheckerInterface; +use Sylius\Resource\Generator\RandomnessGeneratorInterface; use Webmozart\Assert\Assert; final class UniquePinGenerator implements GeneratorInterface diff --git a/src/Sylius/Component/User/Security/Generator/UniqueTokenGenerator.php b/src/Sylius/Component/User/Security/Generator/UniqueTokenGenerator.php index 42e0ee3d6f..f26a15d769 100644 --- a/src/Sylius/Component/User/Security/Generator/UniqueTokenGenerator.php +++ b/src/Sylius/Component/User/Security/Generator/UniqueTokenGenerator.php @@ -13,8 +13,8 @@ declare(strict_types=1); namespace Sylius\Component\User\Security\Generator; -use Sylius\Component\Resource\Generator\RandomnessGeneratorInterface; use Sylius\Component\User\Security\Checker\UniquenessCheckerInterface; +use Sylius\Resource\Generator\RandomnessGeneratorInterface; use Webmozart\Assert\Assert; final class UniqueTokenGenerator implements GeneratorInterface diff --git a/src/Sylius/Component/User/composer.json b/src/Sylius/Component/User/composer.json index e71ee681d3..601689ee4f 100644 --- a/src/Sylius/Component/User/composer.json +++ b/src/Sylius/Component/User/composer.json @@ -36,7 +36,7 @@ "php": "^8.2", "doctrine/collections": "^1.6", "sylius-labs/polyfill-symfony-security": "^1.1", - "sylius/resource": "^1.10", + "sylius/resource": "^1.11", "symfony/polyfill-mbstring": "^1.28", "symfony/security-core": "^6.4.0" }, diff --git a/src/Sylius/Component/User/spec/Security/Checker/TokenUniquenessCheckerSpec.php b/src/Sylius/Component/User/spec/Security/Checker/TokenUniquenessCheckerSpec.php index 1abdc36c2e..98c60822ed 100644 --- a/src/Sylius/Component/User/spec/Security/Checker/TokenUniquenessCheckerSpec.php +++ b/src/Sylius/Component/User/spec/Security/Checker/TokenUniquenessCheckerSpec.php @@ -15,8 +15,8 @@ namespace spec\Sylius\Component\User\Security\Checker; use PhpSpec\ObjectBehavior; use Prophecy\Argument; -use Sylius\Component\Resource\Repository\RepositoryInterface; use Sylius\Component\User\Security\Checker\UniquenessCheckerInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class TokenUniquenessCheckerSpec extends ObjectBehavior { diff --git a/src/Sylius/Component/User/spec/Security/Generator/UniquePinGeneratorSpec.php b/src/Sylius/Component/User/spec/Security/Generator/UniquePinGeneratorSpec.php index 0c92f7d1c3..6e2d45a038 100644 --- a/src/Sylius/Component/User/spec/Security/Generator/UniquePinGeneratorSpec.php +++ b/src/Sylius/Component/User/spec/Security/Generator/UniquePinGeneratorSpec.php @@ -14,9 +14,9 @@ declare(strict_types=1); namespace spec\Sylius\Component\User\Security\Generator; use PhpSpec\ObjectBehavior; -use Sylius\Component\Resource\Generator\RandomnessGeneratorInterface; use Sylius\Component\User\Security\Checker\UniquenessCheckerInterface; use Sylius\Component\User\Security\Generator\GeneratorInterface; +use Sylius\Resource\Generator\RandomnessGeneratorInterface; final class UniquePinGeneratorSpec extends ObjectBehavior { diff --git a/src/Sylius/Component/User/spec/Security/Generator/UniqueTokenGeneratorSpec.php b/src/Sylius/Component/User/spec/Security/Generator/UniqueTokenGeneratorSpec.php index 3da3eb0b56..42870779b5 100644 --- a/src/Sylius/Component/User/spec/Security/Generator/UniqueTokenGeneratorSpec.php +++ b/src/Sylius/Component/User/spec/Security/Generator/UniqueTokenGeneratorSpec.php @@ -14,9 +14,9 @@ declare(strict_types=1); namespace spec\Sylius\Component\User\Security\Generator; use PhpSpec\ObjectBehavior; -use Sylius\Component\Resource\Generator\RandomnessGeneratorInterface; use Sylius\Component\User\Security\Checker\UniquenessCheckerInterface; use Sylius\Component\User\Security\Generator\GeneratorInterface; +use Sylius\Resource\Generator\RandomnessGeneratorInterface; final class UniqueTokenGeneratorSpec extends ObjectBehavior { diff --git a/src/Sylius/UPGRADE-1.14.md b/src/Sylius/UPGRADE-1.14.md deleted file mode 100644 index e986c035ab..0000000000 --- a/src/Sylius/UPGRADE-1.14.md +++ /dev/null @@ -1,12 +0,0 @@ -# UPGRADE FROM `v1.13.X` TO `v1.14.0` - -### Deprecations - -1. The following form extensions have been deprecated and will be removed in Sylius 2.0: - - `Sylius\Bundle\AdminBundle\Form\Extension\CatalogPromotionScopeTypeExtension` - - `Sylius\Bundle\AdminBundle\Form\Extension\CatalogPromotionActionTypeExtension` - - `Sylius\Bundle\CoreBundle\Form\Extension\CustomerTypeExtension` - - Starting with this version, form types will be extended using the parent form instead of through form extensions. - -1. The `Sylius\Bundle\CoreBundle\Form\EventSubscriber\AddUserFormSubscriber` has been deprecated and will be removed in Sylius 2.0. diff --git a/tests/Api/Admin/ChannelPricingLogEntryTest.php b/tests/Api/Admin/ChannelPricingLogEntryTest.php index e3efcd5c1f..6dd73f68ce 100644 --- a/tests/Api/Admin/ChannelPricingLogEntryTest.php +++ b/tests/Api/Admin/ChannelPricingLogEntryTest.php @@ -15,7 +15,7 @@ namespace Sylius\Tests\Api\Admin; use Sylius\Component\Core\Model\ChannelPricingInterface; use Sylius\Component\Core\Model\ChannelPricingLogEntryInterface; -use Sylius\Component\Resource\Repository\RepositoryInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Sylius\Tests\Api\JsonApiTestCase; use Symfony\Component\HttpFoundation\Response;