Merge branch '2.0' into bootstrap-shop

* 2.0:
  Update namespaces to Resource ^1.11 in 2.0
  [CS][DX] Refactor
  [CS][DX] Refactor
  [Maintenance] Update resource changes comparison in the upgrade file
  [Maintenance] Fix LazyOption repository template covariants
  [Maintenance] Note resource namespaces changes
  [Docs] Update namespaces
  [Maintenance] Update leftover namespaces
  [Maintenance] Fix translations' duplicated validation
  [Maintenance] Fix static analysis
  [Maintenance] Update resource models FQCNs
  [Maintenance] Update FactoryInterface FQCN
  [Maintenance] Update RepositoryInterface FQCN
  [Maintenance] Bumped Sylius resource packages to ^1.11
This commit is contained in:
Grzegorz Sadowski 2024-09-09 08:34:56 +02:00
commit d333483655
No known key found for this signature in database
GPG key ID: EF87FF4E6E3BD364
669 changed files with 1453 additions and 1176 deletions

View file

@ -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",

View file

@ -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
{

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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.

View file

@ -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'

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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();

View file

@ -59,7 +59,7 @@ The **CurrencyProvider** allows you to get all available currencies.
<?php
use Sylius\Component\Currency\Provider\CurrencyProvider;
use Sylius\Component\Resource\Repository\InMemoryRepository;
use Sylius\Resource\Doctrine\Persistence\InMemoryRepository;
$currencyRepository = new InMemoryRepository();
$currencyProvider = new CurrencyProvider($currencyRepository);

View file

@ -104,7 +104,7 @@ The **InventoryOperator** provides basic operations on your inventory.
use Sylius\Component\Inventory\Operator\InventoryOperator;
use Sylius\Component\Inventory\Checker\AvailabilityChecker;
use Sylius\Component\Resource\Repository\InMemoryRepository;
use Sylius\Resource\Doctrine\Persistence\InMemoryRepository;
$inMemoryRepository = new InMemoryRepository(); // Repository model.
$product = new Product(); // Stockable model.

View file

@ -15,7 +15,7 @@ To create new resources you should use the default factory implementation.
<?php
use Sylius\Component\Product\Model\Product;
use Sylius\Component\Resource\Factory\Factory;
use Sylius\Resource\Factory\Factory;
$factory = new Factory(Product::class);

View file

@ -70,7 +70,7 @@ To achieve that you will need to:
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Inventory\Checker\AvailabilityCheckerInterface;
use Sylius\Component\Mailer\Sender\SenderInterface;
use Sylius\Component\Resource\Repository\RepositoryInterface;
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
final class OutOfStockEmailManager
{

View file

@ -67,7 +67,7 @@ Go to the generated class file and make it implement the ``ResourceInterface``:
namespace App\Entity;
use Sylius\Component\Resource\Model\ResourceInterface;
use Sylius\Resource\Model\ResourceInterface;
class Supplier implements ResourceInterface
{

View file

@ -43,8 +43,8 @@ Below the final ``SupplierTranslation`` class is presented, it implements the ``
namespace App\Entity;
use Sylius\Component\Resource\Model\AbstractTranslation;
use Sylius\Component\Resource\Model\ResourceInterface;
use Sylius\Resource\Model\AbstractTranslation;
use Sylius\Resource\Model\ResourceInterface;
class SupplierTranslation extends AbstractTranslation implements ResourceInterface
{
@ -130,9 +130,9 @@ As a result you should get such a ``Supplier`` class:
namespace App\Entity;
use Sylius\Component\Resource\Model\ResourceInterface;
use Sylius\Component\Resource\Model\TranslatableInterface;
use Sylius\Component\Resource\Model\TranslatableTrait;
use Sylius\Resource\Model\ResourceInterface;
use Sylius\Resource\Model\TranslatableInterface;
use Sylius\Resource\Model\TranslatableTrait;
class Supplier implements ResourceInterface, TranslatableInterface
{
@ -319,7 +319,7 @@ Then let's prepare the entity type, that will include the translation type.
use Sylius\Bundle\ResourceBundle\Form\Type\AbstractResourceType;
use Sylius\Bundle\ResourceBundle\Form\Type\ResourceTranslationsType;
use Sylius\Component\Resource\Translation\Provider\TranslationLocaleProviderInterface;
use Sylius\Resource\Translation\Provider\TranslationLocaleProviderInterface;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\Extension\Core\Type\TextType;

View file

@ -142,7 +142,7 @@ RefundPlugin doesn't know anything about order items, so we need to tell them ho
namespace App\Provider;
use Sylius\Component\Core\Model\OrderItemInterface;
use Sylius\Component\Resource\Repository\RepositoryInterface;
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
use Sylius\RefundPlugin\Provider\RefundUnitTotalProviderInterface;
use Webmozart\Assert\Assert;
@ -311,7 +311,7 @@ line items, we need to provide a converter that will convert the `OrderItemRefun
use App\Entity\Refund\OrderItemRefund;
use Sylius\Component\Core\Model\OrderItemInterface;
use Sylius\Component\Resource\Repository\RepositoryInterface;
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
use Sylius\RefundPlugin\Converter\LineItemsConverterUnitRefundAwareInterface;
use Sylius\RefundPlugin\Entity\LineItem;
use Sylius\RefundPlugin\Entity\LineItemInterface;

View file

@ -60,7 +60,7 @@ Currently **Sylius** by default is using route definition and **sylius-add-to-ca
}
});
If you want to have custom logic after cart add action you can use **ResourceControllerEvent** to set your custom response.
If you want to have custom logic after cart add action you can use Resource's **GenericEvent** to set your custom response.
Let's assume that you would like such a feature in your system:
@ -68,6 +68,8 @@ Let's assume that you would like such a feature in your system:
<?php
use Sylius\Resource\Symfony\EventDispatcher\GenericEvent;
final class ChangeRedirectAfterAddingToCartListener
{
/**
@ -84,9 +86,9 @@ Let's assume that you would like such a feature in your system:
}
/**
* @param ResourceControllerEvent $event
* @param GenericEvent $event
*/
public function onSuccessfulAddToCart(ResourceControllerEvent $event)
public function onSuccessfulAddToCart(GenericEvent $event)
{
if (!$event->getSubject() instanceof OrderItemInterface) {
throw new \LogicException(

View file

@ -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;

View file

@ -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.

View file

@ -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<Sylius\\Component\\Payment\\Model\\PaymentMethodInterface> but returns array<int, Sylius\\Resource\\Model\\ResourceInterface>\./'
- '/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+<Sylius\\Component\\\w+\\Model\\\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+<Sylius\\Component\\\w+\\Model\\\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+<Sylius\\Component\\\w+\\Model\\\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+<Sylius\\Component\\\w+\\Model\\\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+<Sylius\\Component\\\w+\\Model\\\w+> but interface Sylius\\Component\\Resource\\\w+\\\w+ is not generic\./'

View file

@ -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

View file

@ -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;

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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;

View file

@ -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
{

View file

@ -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
{

View file

@ -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
{

View file

@ -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
{

View file

@ -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
{

View file

@ -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
{

View file

@ -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;

View file

@ -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

View file

@ -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
{

View file

@ -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
{

View file

@ -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;

View file

@ -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
{

View file

@ -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
{

View file

@ -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
{

View file

@ -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
{

View file

@ -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
{

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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
{

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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),
);
}

View file

@ -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

View file

@ -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
{

View file

@ -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
{

View file

@ -130,7 +130,7 @@
<argument type="service" id="sylius.order_item_quantity_modifier" />
<argument type="service" id="doctrine.orm.entity_manager" />
<argument type="service" id="sylius.behat.clock" />
<argument type="service" id="Sylius\Component\Resource\Generator\RandomnessGeneratorInterface" />
<argument type="service" id="Sylius\Resource\Generator\RandomnessGeneratorInterface" />
</service>
<service id="sylius.behat.context.setup.payment" class="Sylius\Behat\Context\Setup\PaymentContext">

View file

@ -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;

View file

@ -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<CountryInterface> $countryRepository */
public function __construct(private RepositoryInterface $countryRepository)
{
}

View file

@ -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<CountryInterface> $countryRepository */
public function __construct(private RepositoryInterface $countryRepository)
{
}

View file

@ -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<ProvinceInterface> $provinceRepository */
public function __construct(private RepositoryInterface $provinceRepository)
{
}

View file

@ -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<ProvinceInterface> $provinceRepository */
public function __construct(private RepositoryInterface $provinceRepository)
{
}

View file

@ -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<ZoneInterface> $zoneRepository
* @param array<string, mixed> $scopeTypes
*/
public function __construct(
private readonly RepositoryInterface $zoneRepository,
private readonly array $scopeTypes,

View file

@ -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<ZoneInterface> $zoneRepository */
public function __construct(private RepositoryInterface $zoneRepository)
{
}

View file

@ -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;

View file

@ -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;

View file

@ -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<CountryInterface> $countryRepository
* @param RepositoryInterface<ProvinceInterface> $provinceRepository
*/
public function __construct(private RepositoryInterface $countryRepository, private RepositoryInterface $provinceRepository)
{
}

View file

@ -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"
},

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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<CustomerInterface> $customerRepository */
public function __construct(
private CustomerStatisticsProviderInterface $statisticsProvider,
private RepositoryInterface $customerRepository,

View file

@ -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

View file

@ -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();

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

Some files were not shown because too many files have changed in this diff Show more