mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 17:10:53 +00:00
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:
commit
d333483655
669 changed files with 1453 additions and 1176 deletions
|
|
@ -84,8 +84,8 @@
|
||||||
"sylius/mailer": "^2.0",
|
"sylius/mailer": "^2.0",
|
||||||
"sylius/mailer-bundle": "^2.0",
|
"sylius/mailer-bundle": "^2.0",
|
||||||
"sylius/registry": "^1.6",
|
"sylius/registry": "^1.6",
|
||||||
"sylius/resource": "^1.10",
|
"sylius/resource": "^1.11",
|
||||||
"sylius/resource-bundle": "^1.10",
|
"sylius/resource-bundle": "^1.11",
|
||||||
"sylius/theme-bundle": "^2.3",
|
"sylius/theme-bundle": "^2.3",
|
||||||
"sylius/twig-hooks": "~0.3.0",
|
"sylius/twig-hooks": "~0.3.0",
|
||||||
"symfony/asset": "^6.4.0",
|
"symfony/asset": "^6.4.0",
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ Assuming that we would like to have a translatable model of a ``Supplier``, we n
|
||||||
|
|
||||||
namespace App\Entity;
|
namespace App\Entity;
|
||||||
|
|
||||||
use Sylius\Component\Resource\Model\AbstractTranslation;
|
use Sylius\Resource\Model\AbstractTranslation;
|
||||||
|
|
||||||
class SupplierTranslation extends AbstractTranslation
|
class SupplierTranslation extends AbstractTranslation
|
||||||
{
|
{
|
||||||
|
|
@ -62,8 +62,8 @@ The actual entity has access to its translation by using the ``TranslatableTrait
|
||||||
|
|
||||||
namespace App\Entity;
|
namespace App\Entity;
|
||||||
|
|
||||||
use Sylius\Component\Resource\Model\TranslatableInterface;
|
use Sylius\Resource\Model\TranslatableInterface;
|
||||||
use Sylius\Component\Resource\Model\TranslatableTrait;
|
use Sylius\Resource\Model\TranslatableTrait;
|
||||||
|
|
||||||
class Supplier implements TranslatableInterface
|
class Supplier implements TranslatableInterface
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ Configuration Reference
|
||||||
interface: Sylius\Component\Addressing\Model\AddressInterface
|
interface: Sylius\Component\Addressing\Model\AddressInterface
|
||||||
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
||||||
repository: ~
|
repository: ~
|
||||||
factory: Sylius\Component\Resource\Factory\Factory
|
factory: Sylius\Resource\Factory\Factory
|
||||||
form: Sylius\Bundle\AddressingBundle\Form\Type\AddressType
|
form: Sylius\Bundle\AddressingBundle\Form\Type\AddressType
|
||||||
country:
|
country:
|
||||||
classes:
|
classes:
|
||||||
|
|
@ -31,7 +31,7 @@ Configuration Reference
|
||||||
interface: Sylius\Component\Addressing\Model\CountryInterface
|
interface: Sylius\Component\Addressing\Model\CountryInterface
|
||||||
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
||||||
repository: ~
|
repository: ~
|
||||||
factory: Sylius\Component\Resource\Factory\Factory
|
factory: Sylius\Resource\Factory\Factory
|
||||||
form: Sylius\Bundle\AddressingBundle\Form\Type\CountryType
|
form: Sylius\Bundle\AddressingBundle\Form\Type\CountryType
|
||||||
province:
|
province:
|
||||||
classes:
|
classes:
|
||||||
|
|
@ -39,7 +39,7 @@ Configuration Reference
|
||||||
interface: Sylius\Component\Addressing\Model\ProvinceInterface
|
interface: Sylius\Component\Addressing\Model\ProvinceInterface
|
||||||
controller: Sylius\Bundle\AddressingBundle\Controller\ProvinceController
|
controller: Sylius\Bundle\AddressingBundle\Controller\ProvinceController
|
||||||
repository: ~
|
repository: ~
|
||||||
factory: Sylius\Component\Resource\Factory\Factory
|
factory: Sylius\Resource\Factory\Factory
|
||||||
form: Sylius\Bundle\AddressingBundle\Form\Type\ProvinceType
|
form: Sylius\Bundle\AddressingBundle\Form\Type\ProvinceType
|
||||||
zone:
|
zone:
|
||||||
classes:
|
classes:
|
||||||
|
|
@ -47,7 +47,7 @@ Configuration Reference
|
||||||
interface: Sylius\Component\Addressing\Model\ZoneInterface
|
interface: Sylius\Component\Addressing\Model\ZoneInterface
|
||||||
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
||||||
repository: ~
|
repository: ~
|
||||||
factory: Sylius\Component\Resource\Factory\Factory
|
factory: Sylius\Resource\Factory\Factory
|
||||||
form: Sylius\Bundle\AddressingBundle\Form\Type\ZoneType
|
form: Sylius\Bundle\AddressingBundle\Form\Type\ZoneType
|
||||||
zone_member:
|
zone_member:
|
||||||
classes:
|
classes:
|
||||||
|
|
@ -55,7 +55,7 @@ Configuration Reference
|
||||||
interface: Sylius\Component\Addressing\Model\ZoneMemberInterface
|
interface: Sylius\Component\Addressing\Model\ZoneMemberInterface
|
||||||
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
||||||
repository: ~
|
repository: ~
|
||||||
factory: Sylius\Component\Resource\Factory\Factory
|
factory: Sylius\Resource\Factory\Factory
|
||||||
form: Sylius\Bundle\AddressingBundle\Form\Type\ZoneMemberType
|
form: Sylius\Bundle\AddressingBundle\Form\Type\ZoneMemberType
|
||||||
|
|
||||||
Bug tracking
|
Bug tracking
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ Configuration reference
|
||||||
interface: Sylius\Component\Attribute\Model\AttributeInterface
|
interface: Sylius\Component\Attribute\Model\AttributeInterface
|
||||||
repository: Sylius\Bundle\TranslationBundle\Doctrine\ORM\TranslatableResourceRepository
|
repository: Sylius\Bundle\TranslationBundle\Doctrine\ORM\TranslatableResourceRepository
|
||||||
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
||||||
factory: Sylius\Component\Resource\Factory\Factory
|
factory: Sylius\Resource\Factory\Factory
|
||||||
form: Sylius\Bundle\AttributeBundle\Form\Type\AttributeType
|
form: Sylius\Bundle\AttributeBundle\Form\Type\AttributeType
|
||||||
translation:
|
translation:
|
||||||
classes:
|
classes:
|
||||||
|
|
@ -30,7 +30,7 @@ Configuration reference
|
||||||
interface: Sylius\Component\Attribute\Model\AttributeTranslationInterface
|
interface: Sylius\Component\Attribute\Model\AttributeTranslationInterface
|
||||||
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
||||||
repository: ~ # Required: The repository class for the attribute translation.
|
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
|
form: Sylius\Bundle\AttributeBundle\Form\Type\AttributeTranslationType
|
||||||
attribute_value:
|
attribute_value:
|
||||||
classes:
|
classes:
|
||||||
|
|
@ -38,5 +38,5 @@ Configuration reference
|
||||||
interface: ~ # Required: The interface of the attribute value
|
interface: ~ # Required: The interface of the attribute value
|
||||||
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
||||||
repository: ~ # Required: The repository class for the attribute value.
|
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
|
form: Sylius\Bundle\AttributeBundle\Form\Type\AttributeValueType
|
||||||
|
|
|
||||||
|
|
@ -26,14 +26,14 @@ Configuration reference
|
||||||
choice: Sylius\Bundle\ResourceBundle\Form\Type\ResourceChoiceType
|
choice: Sylius\Bundle\ResourceBundle\Form\Type\ResourceChoiceType
|
||||||
interface: Sylius\Component\Customer\Model\CustomerInterface
|
interface: Sylius\Component\Customer\Model\CustomerInterface
|
||||||
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
||||||
factory: Sylius\Component\Resource\Factory\Factory
|
factory: Sylius\Resource\Factory\Factory
|
||||||
customer_group:
|
customer_group:
|
||||||
classes:
|
classes:
|
||||||
model: Sylius\Component\Customer\Model\CustomerGroup
|
model: Sylius\Component\Customer\Model\CustomerGroup
|
||||||
repository: Sylius\Bundle\CustomerBundle\Doctrine\ORM\CustomerGroupRepository
|
repository: Sylius\Bundle\CustomerBundle\Doctrine\ORM\CustomerGroupRepository
|
||||||
interface: Sylius\Component\Customer\Model\CustomerGroupInterface
|
interface: Sylius\Component\Customer\Model\CustomerGroupInterface
|
||||||
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
||||||
factory: Sylius\Component\Resource\Factory\Factory
|
factory: Sylius\Resource\Factory\Factory
|
||||||
form: Sylius\Bundle\CustomerBundle\Form\Type\CustomerGroupType
|
form: Sylius\Bundle\CustomerBundle\Form\Type\CustomerGroupType
|
||||||
|
|
||||||
Bug tracking
|
Bug tracking
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ Configuration reference
|
||||||
interface: Sylius\Component\Inventory\Model\InventoryUnitInterface
|
interface: Sylius\Component\Inventory\Model\InventoryUnitInterface
|
||||||
controller: Sylius\Bundle\InventoryBundle\Controller\InventoryUnitController
|
controller: Sylius\Bundle\InventoryBundle\Controller\InventoryUnitController
|
||||||
repository: ~ # You can override the repository class here.
|
repository: ~ # You can override the repository class here.
|
||||||
factory: Sylius\Component\Resource\Factory\Factory
|
factory: Sylius\Resource\Factory\Factory
|
||||||
stockable:
|
stockable:
|
||||||
classes:
|
classes:
|
||||||
model: ~ # The stockable model class.
|
model: ~ # The stockable model class.
|
||||||
|
|
|
||||||
|
|
@ -23,14 +23,14 @@ Configuration reference
|
||||||
repository: Sylius\Bundle\CoreBundle\Doctrine\ORM\OrderRepository
|
repository: Sylius\Bundle\CoreBundle\Doctrine\ORM\OrderRepository
|
||||||
form: Sylius\Bundle\CoreBundle\Form\Type\Order\OrderType
|
form: Sylius\Bundle\CoreBundle\Form\Type\Order\OrderType
|
||||||
interface: Sylius\Component\Order\Model\OrderInterface
|
interface: Sylius\Component\Order\Model\OrderInterface
|
||||||
factory: Sylius\Component\Resource\Factory\Factory
|
factory: Sylius\Resource\Factory\Factory
|
||||||
order_item:
|
order_item:
|
||||||
classes:
|
classes:
|
||||||
model: Sylius\Component\Core\Model\OrderItem
|
model: Sylius\Component\Core\Model\OrderItem
|
||||||
form: Sylius\Bundle\CoreBundle\Form\Type\Order\OrderItemType
|
form: Sylius\Bundle\CoreBundle\Form\Type\Order\OrderItemType
|
||||||
interface: Sylius\Component\Order\Model\OrderItemInterface
|
interface: Sylius\Component\Order\Model\OrderItemInterface
|
||||||
controller: Sylius\Bundle\OrderBundle\Controller\OrderItemController
|
controller: Sylius\Bundle\OrderBundle\Controller\OrderItemController
|
||||||
factory: Sylius\Component\Resource\Factory\Factory
|
factory: Sylius\Resource\Factory\Factory
|
||||||
order_item_unit:
|
order_item_unit:
|
||||||
classes:
|
classes:
|
||||||
model: Sylius\Component\Core\Model\OrderItemUnit
|
model: Sylius\Component\Core\Model\OrderItemUnit
|
||||||
|
|
@ -42,12 +42,12 @@ Configuration reference
|
||||||
model: Sylius\Component\Order\Model\Adjustment
|
model: Sylius\Component\Order\Model\Adjustment
|
||||||
interface: Sylius\Component\Order\Model\AdjustmentInterface
|
interface: Sylius\Component\Order\Model\AdjustmentInterface
|
||||||
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
||||||
factory: Sylius\Component\Resource\Factory\Factory
|
factory: Sylius\Resource\Factory\Factory
|
||||||
order_sequence:
|
order_sequence:
|
||||||
classes:
|
classes:
|
||||||
model: Sylius\Component\Order\Model\OrderSequence
|
model: Sylius\Component\Order\Model\OrderSequence
|
||||||
interface: Sylius\Component\Order\Model\OrderSequenceInterface
|
interface: Sylius\Component\Order\Model\OrderSequenceInterface
|
||||||
factory: Sylius\Component\Resource\Factory\Factory
|
factory: Sylius\Resource\Factory\Factory
|
||||||
expiration:
|
expiration:
|
||||||
cart: '2 days'
|
cart: '2 days'
|
||||||
order: '5 days'
|
order: '5 days'
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ Configuration reference
|
||||||
form: Sylius\Bundle\CoreBundle\Form\Type\Product\ProductTranslationType
|
form: Sylius\Bundle\CoreBundle\Form\Type\Product\ProductTranslationType
|
||||||
interface: Sylius\Component\Product\Model\ProductTranslationInterface
|
interface: Sylius\Component\Product\Model\ProductTranslationInterface
|
||||||
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
||||||
factory: Sylius\Component\Resource\Factory\Factory
|
factory: Sylius\Resource\Factory\Factory
|
||||||
product_variant:
|
product_variant:
|
||||||
classes:
|
classes:
|
||||||
model: Sylius\Component\Core\Model\ProductVariant
|
model: Sylius\Component\Core\Model\ProductVariant
|
||||||
|
|
@ -45,42 +45,42 @@ Configuration reference
|
||||||
model: Sylius\Component\Product\Model\ProductOption
|
model: Sylius\Component\Product\Model\ProductOption
|
||||||
interface: Sylius\Component\Product\Model\ProductOptionInterface
|
interface: Sylius\Component\Product\Model\ProductOptionInterface
|
||||||
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
||||||
factory: Sylius\Component\Resource\Factory\TranslatableFactory
|
factory: Sylius\Resource\Factory\TranslatableFactory
|
||||||
form: Sylius\Bundle\ProductBundle\Form\Type\ProductOptionType
|
form: Sylius\Bundle\ProductBundle\Form\Type\ProductOptionType
|
||||||
translation:
|
translation:
|
||||||
classes:
|
classes:
|
||||||
model: Sylius\Component\Product\Model\ProductOptionTranslation
|
model: Sylius\Component\Product\Model\ProductOptionTranslation
|
||||||
interface: Sylius\Component\Product\Model\ProductOptionTranslationInterface
|
interface: Sylius\Component\Product\Model\ProductOptionTranslationInterface
|
||||||
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
||||||
factory: Sylius\Component\Resource\Factory\Factory
|
factory: Sylius\Resource\Factory\Factory
|
||||||
form: Sylius\Bundle\ProductBundle\Form\Type\ProductOptionTranslationType
|
form: Sylius\Bundle\ProductBundle\Form\Type\ProductOptionTranslationType
|
||||||
product_option_value:
|
product_option_value:
|
||||||
classes:
|
classes:
|
||||||
model: Sylius\Component\Product\Model\ProductOptionValue
|
model: Sylius\Component\Product\Model\ProductOptionValue
|
||||||
interface: Sylius\Component\Product\Model\ProductOptionValueInterface
|
interface: Sylius\Component\Product\Model\ProductOptionValueInterface
|
||||||
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
||||||
factory: Sylius\Component\Resource\Factory\TranslatableFactory
|
factory: Sylius\Resource\Factory\TranslatableFactory
|
||||||
form: Sylius\Bundle\ProductBundle\Form\Type\ProductOptionValueType
|
form: Sylius\Bundle\ProductBundle\Form\Type\ProductOptionValueType
|
||||||
translation:
|
translation:
|
||||||
classes:
|
classes:
|
||||||
model: Sylius\Component\Product\Model\ProductOptionValueTranslation
|
model: Sylius\Component\Product\Model\ProductOptionValueTranslation
|
||||||
interface: Sylius\Component\Product\Model\ProductOptionValueTranslationInterface
|
interface: Sylius\Component\Product\Model\ProductOptionValueTranslationInterface
|
||||||
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
||||||
factory: Sylius\Component\Resource\Factory\Factory
|
factory: Sylius\Resource\Factory\Factory
|
||||||
form: Sylius\Bundle\ProductBundle\Form\Type\ProductOptionValueTranslationType
|
form: Sylius\Bundle\ProductBundle\Form\Type\ProductOptionValueTranslationType
|
||||||
product_association:
|
product_association:
|
||||||
classes:
|
classes:
|
||||||
model: Sylius\Component\Product\Model\ProductAssociation
|
model: Sylius\Component\Product\Model\ProductAssociation
|
||||||
interface: Sylius\Component\Product\Model\ProductAssociationInterface
|
interface: Sylius\Component\Product\Model\ProductAssociationInterface
|
||||||
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
||||||
factory: Sylius\Component\Resource\Factory\Factory
|
factory: Sylius\Resource\Factory\Factory
|
||||||
form: Sylius\Bundle\ProductBundle\Form\Type\ProductAssociationType
|
form: Sylius\Bundle\ProductBundle\Form\Type\ProductAssociationType
|
||||||
product_association_type:
|
product_association_type:
|
||||||
classes:
|
classes:
|
||||||
model: Sylius\Component\Product\Model\ProductAssociationType
|
model: Sylius\Component\Product\Model\ProductAssociationType
|
||||||
interface: Sylius\Component\Product\Model\ProductAssociationTypeInterface
|
interface: Sylius\Component\Product\Model\ProductAssociationTypeInterface
|
||||||
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
||||||
factory: Sylius\Component\Resource\Factory\Factory
|
factory: Sylius\Resource\Factory\Factory
|
||||||
form: Sylius\Bundle\ProductBundle\Form\Type\ProductAssociationTypeType
|
form: Sylius\Bundle\ProductBundle\Form\Type\ProductAssociationTypeType
|
||||||
|
|
||||||
Bug tracking
|
Bug tracking
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ Summary
|
||||||
interface: Sylius\Component\Promotion\Model\PromotionInterface
|
interface: Sylius\Component\Promotion\Model\PromotionInterface
|
||||||
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
||||||
repository: ~
|
repository: ~
|
||||||
factory: Sylius\Component\Resource\Factory\Factory
|
factory: Sylius\Resource\Factory\Factory
|
||||||
form: Sylius\Bundle\PromotionBundle\Form\Type\PromotionType
|
form: Sylius\Bundle\PromotionBundle\Form\Type\PromotionType
|
||||||
promotion_rule:
|
promotion_rule:
|
||||||
classes:
|
classes:
|
||||||
|
|
@ -38,7 +38,7 @@ Summary
|
||||||
interface: Sylius\Component\Promotion\Model\PromotionActionInterface
|
interface: Sylius\Component\Promotion\Model\PromotionActionInterface
|
||||||
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
||||||
repository: ~
|
repository: ~
|
||||||
factory: Sylius\Component\Resource\Factory\Factory
|
factory: Sylius\Resource\Factory\Factory
|
||||||
form: Sylius\Bundle\PromotionBundle\Form\Type\PromotionActionType
|
form: Sylius\Bundle\PromotionBundle\Form\Type\PromotionActionType
|
||||||
promotion_action:
|
promotion_action:
|
||||||
classes:
|
classes:
|
||||||
|
|
@ -46,7 +46,7 @@ Summary
|
||||||
interface: Sylius\Component\Promotion\Model\CouponInterface
|
interface: Sylius\Component\Promotion\Model\CouponInterface
|
||||||
controller: Sylius\Bundle\PromotionBundle\Controller\PromotionCouponController
|
controller: Sylius\Bundle\PromotionBundle\Controller\PromotionCouponController
|
||||||
repository: ~
|
repository: ~
|
||||||
factory: Sylius\Component\Resource\Factory\Factory
|
factory: Sylius\Resource\Factory\Factory
|
||||||
form: Sylius\Bundle\PromotionBundle\Form\Type\PromotionActionType
|
form: Sylius\Bundle\PromotionBundle\Form\Type\PromotionActionType
|
||||||
|
|
||||||
Bug tracking
|
Bug tracking
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ Configuration Reference
|
||||||
interface: Sylius\Component\Shipping\Model\ShipmentInterface
|
interface: Sylius\Component\Shipping\Model\ShipmentInterface
|
||||||
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
||||||
repository: ~
|
repository: ~
|
||||||
factory: Sylius\Component\Resource\Factory\Factory
|
factory: Sylius\Resource\Factory\Factory
|
||||||
form: Sylius\Bundle\ShippingBundle\Form\Type\ShipmentType
|
form: Sylius\Bundle\ShippingBundle\Form\Type\ShipmentType
|
||||||
shipment_item:
|
shipment_item:
|
||||||
classes:
|
classes:
|
||||||
|
|
@ -31,7 +31,7 @@ Configuration Reference
|
||||||
interface: Sylius\Component\Shipping\Model\ShipmentItemInterface
|
interface: Sylius\Component\Shipping\Model\ShipmentItemInterface
|
||||||
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
||||||
repository: ~
|
repository: ~
|
||||||
factory: Sylius\Component\Resource\Factory\Factory
|
factory: Sylius\Resource\Factory\Factory
|
||||||
form: Sylius\Bundle\ShippingBundle\Form\Type\ShipmentItemType
|
form: Sylius\Bundle\ShippingBundle\Form\Type\ShipmentItemType
|
||||||
shipping_method:
|
shipping_method:
|
||||||
classes:
|
classes:
|
||||||
|
|
@ -39,7 +39,7 @@ Configuration Reference
|
||||||
interface: Sylius\Component\Shipping\Model\ShippingMethodInterface
|
interface: Sylius\Component\Shipping\Model\ShippingMethodInterface
|
||||||
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
||||||
repository: ~
|
repository: ~
|
||||||
factory: Sylius\Component\Resource\Factory\Factory
|
factory: Sylius\Resource\Factory\Factory
|
||||||
form: Sylius\Bundle\ShippingBundle\Form\Type\ShippingMethodType
|
form: Sylius\Bundle\ShippingBundle\Form\Type\ShippingMethodType
|
||||||
translation:
|
translation:
|
||||||
classes:
|
classes:
|
||||||
|
|
@ -47,7 +47,7 @@ Configuration Reference
|
||||||
interface: Sylius\Component\Shipping\Model\ShippingMethodTranslationInterface
|
interface: Sylius\Component\Shipping\Model\ShippingMethodTranslationInterface
|
||||||
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
||||||
repository: ~
|
repository: ~
|
||||||
factory: Sylius\Component\Resource\Factory\Factory
|
factory: Sylius\Resource\Factory\Factory
|
||||||
form: Sylius\Bundle\ShippingBundle\Form\Type\ShippingMethodTranslationType
|
form: Sylius\Bundle\ShippingBundle\Form\Type\ShippingMethodTranslationType
|
||||||
shipping_category:
|
shipping_category:
|
||||||
classes:
|
classes:
|
||||||
|
|
@ -55,7 +55,7 @@ Configuration Reference
|
||||||
interface: Sylius\Component\Shipping\Model\ShippingCategoryInterface
|
interface: Sylius\Component\Shipping\Model\ShippingCategoryInterface
|
||||||
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
||||||
repository: ~
|
repository: ~
|
||||||
factory: Sylius\Component\Resource\Factory\Factory
|
factory: Sylius\Resource\Factory\Factory
|
||||||
form: Sylius\Bundle\ShippingBundle\Form\Type\ShippingCategoryType
|
form: Sylius\Bundle\ShippingBundle\Form\Type\ShippingCategoryType
|
||||||
|
|
||||||
Bug tracking
|
Bug tracking
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ Configuration Reference
|
||||||
interface: Sylius\Component\Taxation\Model\TaxCategoryInterface
|
interface: Sylius\Component\Taxation\Model\TaxCategoryInterface
|
||||||
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
||||||
repository: ~
|
repository: ~
|
||||||
factory: Sylius\Component\Resource\Factory\Factory
|
factory: Sylius\Resource\Factory\Factory
|
||||||
form: Sylius\Bundle\TaxationBundle\Form\Type\TaxCategoryType
|
form: Sylius\Bundle\TaxationBundle\Form\Type\TaxCategoryType
|
||||||
tax_rate:
|
tax_rate:
|
||||||
classes:
|
classes:
|
||||||
|
|
@ -31,7 +31,7 @@ Configuration Reference
|
||||||
interface: Sylius\Component\Taxation\Model\TaxRateInterface
|
interface: Sylius\Component\Taxation\Model\TaxRateInterface
|
||||||
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
||||||
repository: ~
|
repository: ~
|
||||||
factory: Sylius\Component\Resource\Factory\Factory
|
factory: Sylius\Resource\Factory\Factory
|
||||||
form: Sylius\Bundle\TaxationBundle\Form\Type\TaxRateType
|
form: Sylius\Bundle\TaxationBundle\Form\Type\TaxRateType
|
||||||
|
|
||||||
Bug tracking
|
Bug tracking
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ Configuration Reference
|
||||||
interface: Sylius\Component\Taxonomy\Model\TaxonInterface
|
interface: Sylius\Component\Taxonomy\Model\TaxonInterface
|
||||||
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
||||||
repository: ~
|
repository: ~
|
||||||
factory: Sylius\Component\Resource\Factory\TranslatableFactory
|
factory: Sylius\Resource\Factory\TranslatableFactory
|
||||||
form: Sylius\Bundle\TaxonomyBundle\Form\Type\TaxonType
|
form: Sylius\Bundle\TaxonomyBundle\Form\Type\TaxonType
|
||||||
translation:
|
translation:
|
||||||
classes:
|
classes:
|
||||||
|
|
@ -31,7 +31,7 @@ Configuration Reference
|
||||||
interface: Sylius\Component\Taxonomy\Model\TaxonTranslationInterface
|
interface: Sylius\Component\Taxonomy\Model\TaxonTranslationInterface
|
||||||
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
||||||
repository: ~
|
repository: ~
|
||||||
factory: Sylius\Component\Resource\Factory\Factory
|
factory: Sylius\Resource\Factory\Factory
|
||||||
form: Sylius\Bundle\TaxonomyBundle\Form\Type\TaxonTranslationType
|
form: Sylius\Bundle\TaxonomyBundle\Form\Type\TaxonTranslationType
|
||||||
|
|
||||||
Bug tracking
|
Bug tracking
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ Configuration reference
|
||||||
form: Sylius\Bundle\CoreBundle\Form\Type\User\AdminUserType
|
form: Sylius\Bundle\CoreBundle\Form\Type\User\AdminUserType
|
||||||
interface: Sylius\Component\User\Model\UserInterface
|
interface: Sylius\Component\User\Model\UserInterface
|
||||||
controller: Sylius\Bundle\UserBundle\Controller\UserController
|
controller: Sylius\Bundle\UserBundle\Controller\UserController
|
||||||
factory: Sylius\Component\Resource\Factory\Factory
|
factory: Sylius\Resource\Factory\Factory
|
||||||
templates: 'SyliusUserBundle:User'
|
templates: 'SyliusUserBundle:User'
|
||||||
encoder: null
|
encoder: null
|
||||||
login_tracking_interval: null
|
login_tracking_interval: null
|
||||||
|
|
@ -49,7 +49,7 @@ Configuration reference
|
||||||
form: Sylius\Bundle\CoreBundle\Form\Type\User\ShopUserType
|
form: Sylius\Bundle\CoreBundle\Form\Type\User\ShopUserType
|
||||||
interface: Sylius\Component\User\Model\UserInterface
|
interface: Sylius\Component\User\Model\UserInterface
|
||||||
controller: Sylius\Bundle\UserBundle\Controller\UserController
|
controller: Sylius\Bundle\UserBundle\Controller\UserController
|
||||||
factory: Sylius\Component\Resource\Factory\Factory
|
factory: Sylius\Resource\Factory\Factory
|
||||||
templates: 'SyliusUserBundle:User'
|
templates: 'SyliusUserBundle:User'
|
||||||
encoder: null
|
encoder: null
|
||||||
login_tracking_interval: null
|
login_tracking_interval: null
|
||||||
|
|
@ -71,7 +71,7 @@ Configuration reference
|
||||||
model: Sylius\Component\User\Model\UserOAuth
|
model: Sylius\Component\User\Model\UserOAuth
|
||||||
interface: Sylius\Component\User\Model\UserOAuthInterface
|
interface: Sylius\Component\User\Model\UserOAuthInterface
|
||||||
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
||||||
factory: Sylius\Component\Resource\Factory\Factory
|
factory: Sylius\Resource\Factory\Factory
|
||||||
form: Sylius\Bundle\UserBundle\Form\Type\UserType
|
form: Sylius\Bundle\UserBundle\Form\Type\UserType
|
||||||
templates: 'SyliusUserBundle:User'
|
templates: 'SyliusUserBundle:User'
|
||||||
encoder: false
|
encoder: false
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ First lets make some preparations.
|
||||||
use Sylius\Component\Addressing\Model\Zone;
|
use Sylius\Component\Addressing\Model\Zone;
|
||||||
use Sylius\Component\Addressing\Model\ZoneInterface;
|
use Sylius\Component\Addressing\Model\ZoneInterface;
|
||||||
use Sylius\Component\Addressing\Model\ZoneMember;
|
use Sylius\Component\Addressing\Model\ZoneMember;
|
||||||
use Sylius\Component\Resource\Repository\InMemoryRepository;
|
use Sylius\Resource\Doctrine\Persistence\InMemoryRepository;
|
||||||
|
|
||||||
$zoneRepository = new InMemoryRepository(ZoneInterface::class);
|
$zoneRepository = new InMemoryRepository(ZoneInterface::class);
|
||||||
$zone = new Zone();
|
$zone = new Zone();
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ The **CurrencyProvider** allows you to get all available currencies.
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Sylius\Component\Currency\Provider\CurrencyProvider;
|
use Sylius\Component\Currency\Provider\CurrencyProvider;
|
||||||
use Sylius\Component\Resource\Repository\InMemoryRepository;
|
use Sylius\Resource\Doctrine\Persistence\InMemoryRepository;
|
||||||
|
|
||||||
$currencyRepository = new InMemoryRepository();
|
$currencyRepository = new InMemoryRepository();
|
||||||
$currencyProvider = new CurrencyProvider($currencyRepository);
|
$currencyProvider = new CurrencyProvider($currencyRepository);
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ The **InventoryOperator** provides basic operations on your inventory.
|
||||||
|
|
||||||
use Sylius\Component\Inventory\Operator\InventoryOperator;
|
use Sylius\Component\Inventory\Operator\InventoryOperator;
|
||||||
use Sylius\Component\Inventory\Checker\AvailabilityChecker;
|
use Sylius\Component\Inventory\Checker\AvailabilityChecker;
|
||||||
use Sylius\Component\Resource\Repository\InMemoryRepository;
|
use Sylius\Resource\Doctrine\Persistence\InMemoryRepository;
|
||||||
|
|
||||||
$inMemoryRepository = new InMemoryRepository(); // Repository model.
|
$inMemoryRepository = new InMemoryRepository(); // Repository model.
|
||||||
$product = new Product(); // Stockable model.
|
$product = new Product(); // Stockable model.
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ To create new resources you should use the default factory implementation.
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Sylius\Component\Product\Model\Product;
|
use Sylius\Component\Product\Model\Product;
|
||||||
use Sylius\Component\Resource\Factory\Factory;
|
use Sylius\Resource\Factory\Factory;
|
||||||
|
|
||||||
$factory = new Factory(Product::class);
|
$factory = new Factory(Product::class);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ To achieve that you will need to:
|
||||||
use Sylius\Component\Core\Model\OrderInterface;
|
use Sylius\Component\Core\Model\OrderInterface;
|
||||||
use Sylius\Component\Inventory\Checker\AvailabilityCheckerInterface;
|
use Sylius\Component\Inventory\Checker\AvailabilityCheckerInterface;
|
||||||
use Sylius\Component\Mailer\Sender\SenderInterface;
|
use Sylius\Component\Mailer\Sender\SenderInterface;
|
||||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
|
|
||||||
final class OutOfStockEmailManager
|
final class OutOfStockEmailManager
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ Go to the generated class file and make it implement the ``ResourceInterface``:
|
||||||
|
|
||||||
namespace App\Entity;
|
namespace App\Entity;
|
||||||
|
|
||||||
use Sylius\Component\Resource\Model\ResourceInterface;
|
use Sylius\Resource\Model\ResourceInterface;
|
||||||
|
|
||||||
class Supplier implements ResourceInterface
|
class Supplier implements ResourceInterface
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -43,8 +43,8 @@ Below the final ``SupplierTranslation`` class is presented, it implements the ``
|
||||||
|
|
||||||
namespace App\Entity;
|
namespace App\Entity;
|
||||||
|
|
||||||
use Sylius\Component\Resource\Model\AbstractTranslation;
|
use Sylius\Resource\Model\AbstractTranslation;
|
||||||
use Sylius\Component\Resource\Model\ResourceInterface;
|
use Sylius\Resource\Model\ResourceInterface;
|
||||||
|
|
||||||
class SupplierTranslation extends AbstractTranslation implements ResourceInterface
|
class SupplierTranslation extends AbstractTranslation implements ResourceInterface
|
||||||
{
|
{
|
||||||
|
|
@ -130,9 +130,9 @@ As a result you should get such a ``Supplier`` class:
|
||||||
|
|
||||||
namespace App\Entity;
|
namespace App\Entity;
|
||||||
|
|
||||||
use Sylius\Component\Resource\Model\ResourceInterface;
|
use Sylius\Resource\Model\ResourceInterface;
|
||||||
use Sylius\Component\Resource\Model\TranslatableInterface;
|
use Sylius\Resource\Model\TranslatableInterface;
|
||||||
use Sylius\Component\Resource\Model\TranslatableTrait;
|
use Sylius\Resource\Model\TranslatableTrait;
|
||||||
|
|
||||||
class Supplier implements ResourceInterface, TranslatableInterface
|
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\AbstractResourceType;
|
||||||
use Sylius\Bundle\ResourceBundle\Form\Type\ResourceTranslationsType;
|
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\CheckboxType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
|
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,7 @@ RefundPlugin doesn't know anything about order items, so we need to tell them ho
|
||||||
namespace App\Provider;
|
namespace App\Provider;
|
||||||
|
|
||||||
use Sylius\Component\Core\Model\OrderItemInterface;
|
use Sylius\Component\Core\Model\OrderItemInterface;
|
||||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
use Sylius\RefundPlugin\Provider\RefundUnitTotalProviderInterface;
|
use Sylius\RefundPlugin\Provider\RefundUnitTotalProviderInterface;
|
||||||
use Webmozart\Assert\Assert;
|
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 App\Entity\Refund\OrderItemRefund;
|
||||||
use Sylius\Component\Core\Model\OrderItemInterface;
|
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\Converter\LineItemsConverterUnitRefundAwareInterface;
|
||||||
use Sylius\RefundPlugin\Entity\LineItem;
|
use Sylius\RefundPlugin\Entity\LineItem;
|
||||||
use Sylius\RefundPlugin\Entity\LineItemInterface;
|
use Sylius\RefundPlugin\Entity\LineItemInterface;
|
||||||
|
|
|
||||||
|
|
@ -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:
|
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
|
<?php
|
||||||
|
|
||||||
|
use Sylius\Resource\Symfony\EventDispatcher\GenericEvent;
|
||||||
|
|
||||||
final class ChangeRedirectAfterAddingToCartListener
|
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) {
|
if (!$event->getSubject() instanceof OrderItemInterface) {
|
||||||
throw new \LogicException(
|
throw new \LogicException(
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ getting a list of recommended products from your external api.
|
||||||
namespace App\Controller;
|
namespace App\Controller;
|
||||||
|
|
||||||
use Sylius\Bundle\ResourceBundle\Controller\ResourceController;
|
use Sylius\Bundle\ResourceBundle\Controller\ResourceController;
|
||||||
use Sylius\Component\Resource\ResourceActions;
|
use Sylius\Resource\ResourceActions;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ The output of that command should look similar to:
|
||||||
form: Sylius\Bundle\CoreBundle\Form\Type\User\AdminUserType
|
form: Sylius\Bundle\CoreBundle\Form\Type\User\AdminUserType
|
||||||
interface: Sylius\Component\User\Model\UserInterface
|
interface: Sylius\Component\User\Model\UserInterface
|
||||||
controller: Sylius\Bundle\UserBundle\Controller\UserController
|
controller: Sylius\Bundle\UserBundle\Controller\UserController
|
||||||
factory: Sylius\Component\Resource\Factory\Factory
|
factory: Sylius\Resource\Factory\Factory
|
||||||
...
|
...
|
||||||
shop:
|
shop:
|
||||||
user:
|
user:
|
||||||
|
|
@ -61,7 +61,7 @@ The output of that command should look similar to:
|
||||||
form: Sylius\Bundle\CoreBundle\Form\Type\User\ShopUserType
|
form: Sylius\Bundle\CoreBundle\Form\Type\User\ShopUserType
|
||||||
interface: Sylius\Component\User\Model\UserInterface
|
interface: Sylius\Component\User\Model\UserInterface
|
||||||
controller: Sylius\Bundle\UserBundle\Controller\UserController
|
controller: Sylius\Bundle\UserBundle\Controller\UserController
|
||||||
factory: Sylius\Component\Resource\Factory\Factory
|
factory: Sylius\Resource\Factory\Factory
|
||||||
...
|
...
|
||||||
oauth:
|
oauth:
|
||||||
user:
|
user:
|
||||||
|
|
@ -69,7 +69,7 @@ The output of that command should look similar to:
|
||||||
model: Sylius\Component\User\Model\UserOAuth
|
model: Sylius\Component\User\Model\UserOAuth
|
||||||
interface: Sylius\Component\User\Model\UserOAuthInterface
|
interface: Sylius\Component\User\Model\UserOAuthInterface
|
||||||
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
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.
|
As you can see there is an extra layer in the configuration here.
|
||||||
|
|
|
||||||
|
|
@ -40,40 +40,6 @@ parameters:
|
||||||
# Random errors related to Template Events (we're going to replace them with Twig Events anyway)
|
# Random errors related to Template Events (we're going to replace them with Twig Events anyway)
|
||||||
- 'src/Sylius/Bundle/UiBundle/Console/Command/DebugTemplateEventCommand.php'
|
- '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:
|
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
|
- '/(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/'
|
- '/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 [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\\AdminBundle\\Twig\\Component\\[a-zA-Z\\]+\:\:getDataModelValue\(\) is unused./'
|
||||||
- '/Method Sylius\\Bundle\\ShopBundle\\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\./'
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ use Sylius\Behat\Service\Converter\IriConverterInterface;
|
||||||
use Sylius\Behat\Service\SharedStorageInterface;
|
use Sylius\Behat\Service\SharedStorageInterface;
|
||||||
use Sylius\Component\Core\Model\ChannelInterface;
|
use Sylius\Component\Core\Model\ChannelInterface;
|
||||||
use Sylius\Component\Core\Model\TaxonInterface;
|
use Sylius\Component\Core\Model\TaxonInterface;
|
||||||
use Sylius\Component\Resource\Model\ResourceInterface;
|
use Sylius\Resource\Model\ResourceInterface;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
|
||||||
final class ManagingChannelPriceHistoryConfigContext implements Context
|
final class ManagingChannelPriceHistoryConfigContext implements Context
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ use Sylius\Component\Core\Model\ShopUserInterface;
|
||||||
use Sylius\Component\Core\OrderCheckoutStates;
|
use Sylius\Component\Core\OrderCheckoutStates;
|
||||||
use Sylius\Component\Core\Repository\OrderRepositoryInterface;
|
use Sylius\Component\Core\Repository\OrderRepositoryInterface;
|
||||||
use Sylius\Component\Product\Resolver\ProductVariantResolverInterface;
|
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\Request as HTTPRequest;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ use Sylius\Component\Core\Model\ProductInterface;
|
||||||
use Sylius\Component\Core\Repository\OrderRepositoryInterface;
|
use Sylius\Component\Core\Repository\OrderRepositoryInterface;
|
||||||
use Sylius\Component\Core\Updater\UnpaidOrdersStateUpdaterInterface;
|
use Sylius\Component\Core\Updater\UnpaidOrdersStateUpdaterInterface;
|
||||||
use Sylius\Component\Product\Resolver\ProductVariantResolverInterface;
|
use Sylius\Component\Product\Resolver\ProductVariantResolverInterface;
|
||||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
|
||||||
final class ManagingOrdersContext implements Context
|
final class ManagingOrdersContext implements Context
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ use Sylius\Bundle\CoreBundle\PriceHistory\Remover\ChannelPricingLogEntriesRemove
|
||||||
use Sylius\Component\Core\Model\ChannelPricingInterface;
|
use Sylius\Component\Core\Model\ChannelPricingInterface;
|
||||||
use Sylius\Component\Core\Model\ProductInterface;
|
use Sylius\Component\Core\Model\ProductInterface;
|
||||||
use Sylius\Component\Product\Resolver\ProductVariantResolverInterface;
|
use Sylius\Component\Product\Resolver\ProductVariantResolverInterface;
|
||||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
|
||||||
final class ManagingPriceHistoryContext implements Context
|
final class ManagingPriceHistoryContext implements Context
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ use Behat\Behat\Context\Context;
|
||||||
use Sylius\Behat\Service\SharedStorageInterface;
|
use Sylius\Behat\Service\SharedStorageInterface;
|
||||||
use Sylius\Component\Core\Model\ProductInterface;
|
use Sylius\Component\Core\Model\ProductInterface;
|
||||||
use Sylius\Component\Core\Model\ProductVariantInterface;
|
use Sylius\Component\Core\Model\ProductVariantInterface;
|
||||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
|
||||||
final class ManagingProductsContext implements Context
|
final class ManagingProductsContext implements Context
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,8 @@ namespace Sylius\Behat\Context\Domain;
|
||||||
|
|
||||||
use Behat\Behat\Context\Context;
|
use Behat\Behat\Context\Context;
|
||||||
use Doctrine\Persistence\ObjectManager;
|
use Doctrine\Persistence\ObjectManager;
|
||||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
|
||||||
use Sylius\Component\Shipping\Model\ShippingMethodInterface;
|
use Sylius\Component\Shipping\Model\ShippingMethodInterface;
|
||||||
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
|
||||||
final class ManagingShippingMethodsContext implements Context
|
final class ManagingShippingMethodsContext implements Context
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ use Sylius\Component\Core\Repository\OrderRepositoryInterface;
|
||||||
use Sylius\Component\Product\Model\ProductOptionInterface;
|
use Sylius\Component\Product\Model\ProductOptionInterface;
|
||||||
use Sylius\Component\Product\Model\ProductOptionValueInterface;
|
use Sylius\Component\Product\Model\ProductOptionValueInterface;
|
||||||
use Sylius\Component\Product\Resolver\ProductVariantResolverInterface;
|
use Sylius\Component\Product\Resolver\ProductVariantResolverInterface;
|
||||||
use Sylius\Component\Resource\Generator\RandomnessGeneratorInterface;
|
use Sylius\Resource\Generator\RandomnessGeneratorInterface;
|
||||||
use Symfony\Component\Messenger\MessageBusInterface;
|
use Symfony\Component\Messenger\MessageBusInterface;
|
||||||
|
|
||||||
final readonly class CartContext implements Context
|
final readonly class CartContext implements Context
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ use Sylius\Component\Promotion\Model\CatalogPromotionActionInterface;
|
||||||
use Sylius\Component\Promotion\Model\CatalogPromotionScopeInterface;
|
use Sylius\Component\Promotion\Model\CatalogPromotionScopeInterface;
|
||||||
use Sylius\Component\Promotion\Model\CatalogPromotionStates;
|
use Sylius\Component\Promotion\Model\CatalogPromotionStates;
|
||||||
use Sylius\Component\Promotion\Model\CatalogPromotionTransitions;
|
use Sylius\Component\Promotion\Model\CatalogPromotionTransitions;
|
||||||
use Sylius\Component\Resource\Factory\FactoryInterface;
|
use Sylius\Resource\Factory\FactoryInterface;
|
||||||
use Symfony\Component\Messenger\MessageBusInterface;
|
use Symfony\Component\Messenger\MessageBusInterface;
|
||||||
|
|
||||||
final class CatalogPromotionContext implements Context
|
final class CatalogPromotionContext implements Context
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,8 @@ use Sylius\Component\Core\Model\PaymentMethodInterface;
|
||||||
use Sylius\Component\Core\Model\ShipmentInterface;
|
use Sylius\Component\Core\Model\ShipmentInterface;
|
||||||
use Sylius\Component\Core\Model\ShippingMethodInterface;
|
use Sylius\Component\Core\Model\ShippingMethodInterface;
|
||||||
use Sylius\Component\Core\Repository\OrderRepositoryInterface;
|
use Sylius\Component\Core\Repository\OrderRepositoryInterface;
|
||||||
use Sylius\Component\Resource\Factory\FactoryInterface;
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
use Sylius\Resource\Factory\FactoryInterface;
|
||||||
use Symfony\Component\Messenger\MessageBusInterface;
|
use Symfony\Component\Messenger\MessageBusInterface;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,8 @@ use Doctrine\Persistence\ObjectManager;
|
||||||
use Sylius\Behat\Service\SharedStorageInterface;
|
use Sylius\Behat\Service\SharedStorageInterface;
|
||||||
use Sylius\Component\Core\Model\ChannelInterface;
|
use Sylius\Component\Core\Model\ChannelInterface;
|
||||||
use Sylius\Component\Currency\Model\CurrencyInterface;
|
use Sylius\Component\Currency\Model\CurrencyInterface;
|
||||||
use Sylius\Component\Resource\Factory\FactoryInterface;
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
use Sylius\Resource\Factory\FactoryInterface;
|
||||||
|
|
||||||
final class CurrencyContext implements Context
|
final class CurrencyContext implements Context
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ use Sylius\Component\Core\Model\CustomerInterface;
|
||||||
use Sylius\Component\Core\Model\ShopUserInterface;
|
use Sylius\Component\Core\Model\ShopUserInterface;
|
||||||
use Sylius\Component\Core\Repository\CustomerRepositoryInterface;
|
use Sylius\Component\Core\Repository\CustomerRepositoryInterface;
|
||||||
use Sylius\Component\Customer\Model\CustomerGroupInterface;
|
use Sylius\Component\Customer\Model\CustomerGroupInterface;
|
||||||
use Sylius\Component\Resource\Factory\FactoryInterface;
|
use Sylius\Resource\Factory\FactoryInterface;
|
||||||
|
|
||||||
final class CustomerContext implements Context
|
final class CustomerContext implements Context
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,8 @@ use Behat\Behat\Context\Context;
|
||||||
use Sylius\Behat\Service\SharedStorageInterface;
|
use Sylius\Behat\Service\SharedStorageInterface;
|
||||||
use Sylius\Component\Core\Formatter\StringInflector;
|
use Sylius\Component\Core\Formatter\StringInflector;
|
||||||
use Sylius\Component\Customer\Model\CustomerGroupInterface;
|
use Sylius\Component\Customer\Model\CustomerGroupInterface;
|
||||||
use Sylius\Component\Resource\Factory\FactoryInterface;
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
use Sylius\Resource\Factory\FactoryInterface;
|
||||||
|
|
||||||
final class CustomerGroupContext implements Context
|
final class CustomerGroupContext implements Context
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ use Sylius\Behat\Service\SharedStorageInterface;
|
||||||
use Sylius\Component\Currency\Model\CurrencyInterface;
|
use Sylius\Component\Currency\Model\CurrencyInterface;
|
||||||
use Sylius\Component\Currency\Model\ExchangeRateInterface;
|
use Sylius\Component\Currency\Model\ExchangeRateInterface;
|
||||||
use Sylius\Component\Currency\Repository\ExchangeRateRepositoryInterface;
|
use Sylius\Component\Currency\Repository\ExchangeRateRepositoryInterface;
|
||||||
use Sylius\Component\Resource\Factory\FactoryInterface;
|
use Sylius\Resource\Factory\FactoryInterface;
|
||||||
|
|
||||||
final class ExchangeRateContext implements Context
|
final class ExchangeRateContext implements Context
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,8 @@ use Sylius\Behat\Service\SharedStorageInterface;
|
||||||
use Sylius\Component\Addressing\Converter\CountryNameConverterInterface;
|
use Sylius\Component\Addressing\Converter\CountryNameConverterInterface;
|
||||||
use Sylius\Component\Addressing\Model\CountryInterface;
|
use Sylius\Component\Addressing\Model\CountryInterface;
|
||||||
use Sylius\Component\Addressing\Model\ProvinceInterface;
|
use Sylius\Component\Addressing\Model\ProvinceInterface;
|
||||||
use Sylius\Component\Resource\Factory\FactoryInterface;
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
use Sylius\Resource\Factory\FactoryInterface;
|
||||||
|
|
||||||
final class GeographicalContext implements Context
|
final class GeographicalContext implements Context
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,8 @@ use Sylius\Behat\Service\SharedStorageInterface;
|
||||||
use Sylius\Component\Core\Model\ChannelInterface;
|
use Sylius\Component\Core\Model\ChannelInterface;
|
||||||
use Sylius\Component\Locale\Converter\LocaleConverterInterface;
|
use Sylius\Component\Locale\Converter\LocaleConverterInterface;
|
||||||
use Sylius\Component\Locale\Model\LocaleInterface;
|
use Sylius\Component\Locale\Model\LocaleInterface;
|
||||||
use Sylius\Component\Resource\Factory\FactoryInterface;
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
use Sylius\Resource\Factory\FactoryInterface;
|
||||||
|
|
||||||
final readonly class LocaleContext implements Context
|
final readonly class LocaleContext implements Context
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -43,11 +43,11 @@ use Sylius\Component\Payment\Model\PaymentMethodInterface;
|
||||||
use Sylius\Component\Payment\PaymentTransitions;
|
use Sylius\Component\Payment\PaymentTransitions;
|
||||||
use Sylius\Component\Payment\Repository\PaymentMethodRepositoryInterface;
|
use Sylius\Component\Payment\Repository\PaymentMethodRepositoryInterface;
|
||||||
use Sylius\Component\Product\Resolver\ProductVariantResolverInterface;
|
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\Repository\ShippingMethodRepositoryInterface;
|
||||||
use Sylius\Component\Shipping\ShipmentTransitions;
|
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 Symfony\Component\Clock\ClockInterface;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ use Sylius\Component\Core\Model\OrderInterface;
|
||||||
use Sylius\Component\Core\Model\PaymentMethodInterface;
|
use Sylius\Component\Core\Model\PaymentMethodInterface;
|
||||||
use Sylius\Component\Payment\Model\PaymentMethodTranslationInterface;
|
use Sylius\Component\Payment\Model\PaymentMethodTranslationInterface;
|
||||||
use Sylius\Component\Payment\Repository\PaymentMethodRepositoryInterface;
|
use Sylius\Component\Payment\Repository\PaymentMethodRepositoryInterface;
|
||||||
use Sylius\Component\Resource\Factory\FactoryInterface;
|
use Sylius\Resource\Factory\FactoryInterface;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
|
||||||
final readonly class PaymentContext implements Context
|
final readonly class PaymentContext implements Context
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,8 @@ use Sylius\Component\Product\Model\ProductAssociationInterface;
|
||||||
use Sylius\Component\Product\Model\ProductAssociationTypeInterface;
|
use Sylius\Component\Product\Model\ProductAssociationTypeInterface;
|
||||||
use Sylius\Component\Product\Model\ProductAssociationTypeTranslationInterface;
|
use Sylius\Component\Product\Model\ProductAssociationTypeTranslationInterface;
|
||||||
use Sylius\Component\Product\Repository\ProductAssociationTypeRepositoryInterface;
|
use Sylius\Component\Product\Repository\ProductAssociationTypeRepositoryInterface;
|
||||||
use Sylius\Component\Resource\Factory\FactoryInterface;
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
use Sylius\Resource\Factory\FactoryInterface;
|
||||||
|
|
||||||
final class ProductAssociationContext implements Context
|
final class ProductAssociationContext implements Context
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -26,8 +26,8 @@ use Sylius\Component\Core\Formatter\StringInflector;
|
||||||
use Sylius\Component\Core\Model\ProductInterface;
|
use Sylius\Component\Core\Model\ProductInterface;
|
||||||
use Sylius\Component\Product\Model\ProductAttributeInterface;
|
use Sylius\Component\Product\Model\ProductAttributeInterface;
|
||||||
use Sylius\Component\Product\Model\ProductAttributeValueInterface;
|
use Sylius\Component\Product\Model\ProductAttributeValueInterface;
|
||||||
use Sylius\Component\Resource\Factory\FactoryInterface;
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
use Sylius\Resource\Factory\FactoryInterface;
|
||||||
|
|
||||||
final class ProductAttributeContext implements Context
|
final class ProductAttributeContext implements Context
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -39,9 +39,9 @@ use Sylius\Component\Product\Model\ProductOptionInterface;
|
||||||
use Sylius\Component\Product\Model\ProductOptionValueInterface;
|
use Sylius\Component\Product\Model\ProductOptionValueInterface;
|
||||||
use Sylius\Component\Product\Model\ProductVariantTranslationInterface;
|
use Sylius\Component\Product\Model\ProductVariantTranslationInterface;
|
||||||
use Sylius\Component\Product\Resolver\ProductVariantResolverInterface;
|
use Sylius\Component\Product\Resolver\ProductVariantResolverInterface;
|
||||||
use Sylius\Component\Resource\Factory\FactoryInterface;
|
|
||||||
use Sylius\Component\Shipping\Model\ShippingCategoryInterface;
|
use Sylius\Component\Shipping\Model\ShippingCategoryInterface;
|
||||||
use Sylius\Component\Taxation\Model\TaxCategoryInterface;
|
use Sylius\Component\Taxation\Model\TaxCategoryInterface;
|
||||||
|
use Sylius\Resource\Factory\FactoryInterface;
|
||||||
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
||||||
use Symfony\Component\Messenger\MessageBusInterface;
|
use Symfony\Component\Messenger\MessageBusInterface;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ use Sylius\Component\Core\Formatter\StringInflector;
|
||||||
use Sylius\Component\Product\Model\ProductOptionInterface;
|
use Sylius\Component\Product\Model\ProductOptionInterface;
|
||||||
use Sylius\Component\Product\Model\ProductOptionValueInterface;
|
use Sylius\Component\Product\Model\ProductOptionValueInterface;
|
||||||
use Sylius\Component\Product\Repository\ProductOptionRepositoryInterface;
|
use Sylius\Component\Product\Repository\ProductOptionRepositoryInterface;
|
||||||
use Sylius\Component\Resource\Factory\FactoryInterface;
|
use Sylius\Resource\Factory\FactoryInterface;
|
||||||
|
|
||||||
final class ProductOptionContext implements Context
|
final class ProductOptionContext implements Context
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,9 @@ use Sylius\Behat\Service\SharedStorageInterface;
|
||||||
use Sylius\Component\Core\Model\CustomerInterface;
|
use Sylius\Component\Core\Model\CustomerInterface;
|
||||||
use Sylius\Component\Core\Model\ProductInterface;
|
use Sylius\Component\Core\Model\ProductInterface;
|
||||||
use Sylius\Component\Core\ProductReviewTransitions;
|
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\Component\Review\Model\ReviewInterface;
|
||||||
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
|
use Sylius\Resource\Factory\FactoryInterface;
|
||||||
|
|
||||||
final class ProductReviewContext implements Context
|
final class ProductReviewContext implements Context
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ use Doctrine\Persistence\ObjectManager;
|
||||||
use Sylius\Component\Core\Model\ProductInterface;
|
use Sylius\Component\Core\Model\ProductInterface;
|
||||||
use Sylius\Component\Core\Model\ProductTaxonInterface;
|
use Sylius\Component\Core\Model\ProductTaxonInterface;
|
||||||
use Sylius\Component\Core\Model\TaxonInterface;
|
use Sylius\Component\Core\Model\TaxonInterface;
|
||||||
use Sylius\Component\Resource\Factory\FactoryInterface;
|
use Sylius\Resource\Factory\FactoryInterface;
|
||||||
|
|
||||||
final class ProductTaxonContext implements Context
|
final class ProductTaxonContext implements Context
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,9 @@ namespace Sylius\Behat\Context\Setup;
|
||||||
use Behat\Behat\Context\Context;
|
use Behat\Behat\Context\Context;
|
||||||
use Sylius\Behat\Service\SharedStorageInterface;
|
use Sylius\Behat\Service\SharedStorageInterface;
|
||||||
use Sylius\Component\Core\Formatter\StringInflector;
|
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\Component\Shipping\Model\ShippingCategoryInterface;
|
||||||
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
|
use Sylius\Resource\Factory\FactoryInterface;
|
||||||
|
|
||||||
final class ShippingCategoryContext implements Context
|
final class ShippingCategoryContext implements Context
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,6 @@ use Sylius\Component\Core\Model\ShippingMethodInterface;
|
||||||
use Sylius\Component\Core\Repository\ShippingMethodRepositoryInterface;
|
use Sylius\Component\Core\Repository\ShippingMethodRepositoryInterface;
|
||||||
use Sylius\Component\Core\Shipping\Checker\Rule\OrderTotalGreaterThanOrEqualRuleChecker;
|
use Sylius\Component\Core\Shipping\Checker\Rule\OrderTotalGreaterThanOrEqualRuleChecker;
|
||||||
use Sylius\Component\Core\Shipping\Checker\Rule\OrderTotalLessThanOrEqualRuleChecker;
|
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\Calculator\DefaultCalculators;
|
||||||
use Sylius\Component\Shipping\Checker\Rule\TotalWeightGreaterThanOrEqualRuleChecker;
|
use Sylius\Component\Shipping\Checker\Rule\TotalWeightGreaterThanOrEqualRuleChecker;
|
||||||
use Sylius\Component\Shipping\Checker\Rule\TotalWeightLessThanOrEqualRuleChecker;
|
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\ShippingMethodRuleInterface;
|
||||||
use Sylius\Component\Shipping\Model\ShippingMethodTranslationInterface;
|
use Sylius\Component\Shipping\Model\ShippingMethodTranslationInterface;
|
||||||
use Sylius\Component\Taxation\Model\TaxCategoryInterface;
|
use Sylius\Component\Taxation\Model\TaxCategoryInterface;
|
||||||
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
|
use Sylius\Resource\Factory\FactoryInterface;
|
||||||
|
|
||||||
final class ShippingContext implements Context
|
final class ShippingContext implements Context
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -19,10 +19,10 @@ use Sylius\Behat\Service\SharedStorageInterface;
|
||||||
use Sylius\Component\Addressing\Model\ZoneInterface;
|
use Sylius\Component\Addressing\Model\ZoneInterface;
|
||||||
use Sylius\Component\Core\Formatter\StringInflector;
|
use Sylius\Component\Core\Formatter\StringInflector;
|
||||||
use Sylius\Component\Core\Model\TaxRateInterface;
|
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\Model\TaxCategoryInterface;
|
||||||
use Sylius\Component\Taxation\Repository\TaxCategoryRepositoryInterface;
|
use Sylius\Component\Taxation\Repository\TaxCategoryRepositoryInterface;
|
||||||
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
|
use Sylius\Resource\Factory\FactoryInterface;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
|
||||||
final class TaxationContext implements Context
|
final class TaxationContext implements Context
|
||||||
|
|
|
||||||
|
|
@ -19,10 +19,10 @@ use Sylius\Component\Core\Formatter\StringInflector;
|
||||||
use Sylius\Component\Core\Model\ImageInterface;
|
use Sylius\Component\Core\Model\ImageInterface;
|
||||||
use Sylius\Component\Core\Model\TaxonInterface;
|
use Sylius\Component\Core\Model\TaxonInterface;
|
||||||
use Sylius\Component\Core\Uploader\ImageUploaderInterface;
|
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\Generator\TaxonSlugGeneratorInterface;
|
||||||
use Sylius\Component\Taxonomy\Model\TaxonTranslationInterface;
|
use Sylius\Component\Taxonomy\Model\TaxonTranslationInterface;
|
||||||
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
|
use Sylius\Resource\Factory\FactoryInterface;
|
||||||
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
||||||
|
|
||||||
final class TaxonomyContext implements Context
|
final class TaxonomyContext implements Context
|
||||||
|
|
|
||||||
|
|
@ -24,9 +24,9 @@ use Sylius\Component\Addressing\Model\ZoneInterface;
|
||||||
use Sylius\Component\Addressing\Model\ZoneMemberInterface;
|
use Sylius\Component\Addressing\Model\ZoneMemberInterface;
|
||||||
use Sylius\Component\Core\Formatter\StringInflector;
|
use Sylius\Component\Core\Formatter\StringInflector;
|
||||||
use Sylius\Component\Core\Model\ChannelInterface;
|
use Sylius\Component\Core\Model\ChannelInterface;
|
||||||
use Sylius\Component\Resource\Factory\FactoryInterface;
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
use Sylius\Component\Resource\Model\CodeAwareInterface;
|
use Sylius\Resource\Factory\FactoryInterface;
|
||||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
use Sylius\Resource\Model\CodeAwareInterface;
|
||||||
use Symfony\Component\Intl\Countries;
|
use Symfony\Component\Intl\Countries;
|
||||||
|
|
||||||
final class ZoneContext implements Context
|
final class ZoneContext implements Context
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ use Sylius\Bundle\CoreBundle\Fixture\Factory\ExampleFactoryInterface;
|
||||||
use Sylius\Component\Addressing\Converter\CountryNameConverterInterface;
|
use Sylius\Component\Addressing\Converter\CountryNameConverterInterface;
|
||||||
use Sylius\Component\Core\Model\AddressInterface;
|
use Sylius\Component\Core\Model\AddressInterface;
|
||||||
use Sylius\Component\Core\Repository\AddressRepositoryInterface;
|
use Sylius\Component\Core\Repository\AddressRepositoryInterface;
|
||||||
use Sylius\Component\Resource\Factory\FactoryInterface;
|
use Sylius\Resource\Factory\FactoryInterface;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
|
||||||
final class AddressContext implements Context
|
final class AddressContext implements Context
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ namespace Sylius\Behat\Context\Transform;
|
||||||
use Behat\Behat\Context\Context;
|
use Behat\Behat\Context\Context;
|
||||||
use Sylius\Behat\Service\SharedStorageInterface;
|
use Sylius\Behat\Service\SharedStorageInterface;
|
||||||
use Sylius\Component\Core\Model\AdminUserInterface;
|
use Sylius\Component\Core\Model\AdminUserInterface;
|
||||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
|
||||||
final class AdminUserContext implements Context
|
final class AdminUserContext implements Context
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ namespace Sylius\Behat\Context\Transform;
|
||||||
|
|
||||||
use Behat\Behat\Context\Context;
|
use Behat\Behat\Context\Context;
|
||||||
use Sylius\Component\Core\Model\CatalogPromotionInterface;
|
use Sylius\Component\Core\Model\CatalogPromotionInterface;
|
||||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
|
||||||
final class CatalogPromotionContext implements Context
|
final class CatalogPromotionContext implements Context
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ namespace Sylius\Behat\Context\Transform;
|
||||||
|
|
||||||
use Behat\Behat\Context\Context;
|
use Behat\Behat\Context\Context;
|
||||||
use Sylius\Component\Addressing\Converter\CountryNameConverterInterface;
|
use Sylius\Component\Addressing\Converter\CountryNameConverterInterface;
|
||||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
|
||||||
final class CountryContext implements Context
|
final class CountryContext implements Context
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ declare(strict_types=1);
|
||||||
namespace Sylius\Behat\Context\Transform;
|
namespace Sylius\Behat\Context\Transform;
|
||||||
|
|
||||||
use Behat\Behat\Context\Context;
|
use Behat\Behat\Context\Context;
|
||||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
|
||||||
final class CouponContext implements Context
|
final class CouponContext implements Context
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ namespace Sylius\Behat\Context\Transform;
|
||||||
|
|
||||||
use Behat\Behat\Context\Context;
|
use Behat\Behat\Context\Context;
|
||||||
use Sylius\Component\Currency\Converter\CurrencyNameConverterInterface;
|
use Sylius\Component\Currency\Converter\CurrencyNameConverterInterface;
|
||||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
|
||||||
final class CurrencyContext implements Context
|
final class CurrencyContext implements Context
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ use Behat\Behat\Context\Context;
|
||||||
use Sylius\Behat\Service\SharedStorageInterface;
|
use Sylius\Behat\Service\SharedStorageInterface;
|
||||||
use Sylius\Component\Core\Model\CustomerInterface;
|
use Sylius\Component\Core\Model\CustomerInterface;
|
||||||
use Sylius\Component\Core\Repository\CustomerRepositoryInterface;
|
use Sylius\Component\Core\Repository\CustomerRepositoryInterface;
|
||||||
use Sylius\Component\Resource\Factory\FactoryInterface;
|
use Sylius\Resource\Factory\FactoryInterface;
|
||||||
|
|
||||||
final class CustomerContext implements Context
|
final class CustomerContext implements Context
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ declare(strict_types=1);
|
||||||
namespace Sylius\Behat\Context\Transform;
|
namespace Sylius\Behat\Context\Transform;
|
||||||
|
|
||||||
use Behat\Behat\Context\Context;
|
use Behat\Behat\Context\Context;
|
||||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
|
||||||
final class CustomerGroupContext implements Context
|
final class CustomerGroupContext implements Context
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ use Behat\Behat\Context\Context;
|
||||||
use Sylius\Component\Currency\Converter\CurrencyNameConverterInterface;
|
use Sylius\Component\Currency\Converter\CurrencyNameConverterInterface;
|
||||||
use Sylius\Component\Currency\Model\ExchangeRateInterface;
|
use Sylius\Component\Currency\Model\ExchangeRateInterface;
|
||||||
use Sylius\Component\Currency\Repository\ExchangeRateRepositoryInterface;
|
use Sylius\Component\Currency\Repository\ExchangeRateRepositoryInterface;
|
||||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
|
||||||
final class ExchangeRateContext implements Context
|
final class ExchangeRateContext implements Context
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ use Behat\Behat\Context\Context;
|
||||||
use Sylius\Behat\Service\SharedStorageInterface;
|
use Sylius\Behat\Service\SharedStorageInterface;
|
||||||
use Sylius\Component\Locale\Converter\LocaleConverterInterface;
|
use Sylius\Component\Locale\Converter\LocaleConverterInterface;
|
||||||
use Sylius\Component\Locale\Model\LocaleInterface;
|
use Sylius\Component\Locale\Model\LocaleInterface;
|
||||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
|
||||||
final readonly class LocaleContext implements Context
|
final readonly class LocaleContext implements Context
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ namespace Sylius\Behat\Context\Transform;
|
||||||
use Behat\Behat\Context\Context;
|
use Behat\Behat\Context\Context;
|
||||||
use Sylius\Component\Product\Model\ProductAttributeInterface;
|
use Sylius\Component\Product\Model\ProductAttributeInterface;
|
||||||
use Sylius\Component\Product\Model\ProductAttributeTranslationInterface;
|
use Sylius\Component\Product\Model\ProductAttributeTranslationInterface;
|
||||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
|
||||||
final class ProductAttributeContext implements Context
|
final class ProductAttributeContext implements Context
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ namespace Sylius\Behat\Context\Transform;
|
||||||
|
|
||||||
use Behat\Behat\Context\Context;
|
use Behat\Behat\Context\Context;
|
||||||
use Sylius\Component\Product\Model\ProductOptionValueInterface;
|
use Sylius\Component\Product\Model\ProductOptionValueInterface;
|
||||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
|
||||||
final class ProductOptionValueContext implements Context
|
final class ProductOptionValueContext implements Context
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,8 @@ declare(strict_types=1);
|
||||||
namespace Sylius\Behat\Context\Transform;
|
namespace Sylius\Behat\Context\Transform;
|
||||||
|
|
||||||
use Behat\Behat\Context\Context;
|
use Behat\Behat\Context\Context;
|
||||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
|
||||||
use Sylius\Component\Review\Model\ReviewInterface;
|
use Sylius\Component\Review\Model\ReviewInterface;
|
||||||
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
|
||||||
final class ProductReviewContext implements Context
|
final class ProductReviewContext implements Context
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ namespace Sylius\Behat\Context\Transform;
|
||||||
|
|
||||||
use Behat\Behat\Context\Context;
|
use Behat\Behat\Context\Context;
|
||||||
use Sylius\Component\Addressing\Model\ProvinceInterface;
|
use Sylius\Component\Addressing\Model\ProvinceInterface;
|
||||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
|
||||||
final class ProvinceContext implements Context
|
final class ProvinceContext implements Context
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ declare(strict_types=1);
|
||||||
namespace Sylius\Behat\Context\Transform;
|
namespace Sylius\Behat\Context\Transform;
|
||||||
|
|
||||||
use Behat\Behat\Context\Context;
|
use Behat\Behat\Context\Context;
|
||||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
|
||||||
class ShippingCategoryContext implements Context
|
class ShippingCategoryContext implements Context
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ declare(strict_types=1);
|
||||||
namespace Sylius\Behat\Context\Transform;
|
namespace Sylius\Behat\Context\Transform;
|
||||||
|
|
||||||
use Behat\Behat\Context\Context;
|
use Behat\Behat\Context\Context;
|
||||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
|
||||||
final class TaxRateContext implements Context
|
final class TaxRateContext implements Context
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ namespace Sylius\Behat\Context\Transform;
|
||||||
|
|
||||||
use Behat\Behat\Context\Context;
|
use Behat\Behat\Context\Context;
|
||||||
use Sylius\Component\Addressing\Model\ZoneInterface;
|
use Sylius\Component\Addressing\Model\ZoneInterface;
|
||||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
|
||||||
final class ZoneContext implements Context
|
final class ZoneContext implements Context
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ use Sylius\Component\Addressing\Converter\CountryNameConverterInterface;
|
||||||
use Sylius\Component\Addressing\Model\ProvinceInterface;
|
use Sylius\Component\Addressing\Model\ProvinceInterface;
|
||||||
use Sylius\Component\Addressing\Model\ZoneInterface;
|
use Sylius\Component\Addressing\Model\ZoneInterface;
|
||||||
use Sylius\Component\Addressing\Model\ZoneMemberInterface;
|
use Sylius\Component\Addressing\Model\ZoneMemberInterface;
|
||||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
|
||||||
final class ZoneMemberContext implements Context
|
final class ZoneMemberContext implements Context
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ use Sylius\Behat\Page\Admin\Crud\IndexPageInterface;
|
||||||
use Sylius\Behat\Service\NotificationCheckerInterface;
|
use Sylius\Behat\Service\NotificationCheckerInterface;
|
||||||
use Sylius\Behat\Service\SharedStorageInterface;
|
use Sylius\Behat\Service\SharedStorageInterface;
|
||||||
use Sylius\Component\Core\Model\AdminUserInterface;
|
use Sylius\Component\Core\Model\AdminUserInterface;
|
||||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
|
||||||
final class ManagingAdministratorsContext implements Context
|
final class ManagingAdministratorsContext implements Context
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ use Sylius\Behat\Service\NotificationCheckerInterface;
|
||||||
use Sylius\Behat\Service\Resolver\CurrentPageResolverInterface;
|
use Sylius\Behat\Service\Resolver\CurrentPageResolverInterface;
|
||||||
use Sylius\Behat\Service\SharedStorageInterface;
|
use Sylius\Behat\Service\SharedStorageInterface;
|
||||||
use Sylius\Component\Core\Model\AddressInterface;
|
use Sylius\Component\Core\Model\AddressInterface;
|
||||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
|
||||||
final class AddressBookContext implements Context
|
final class AddressBookContext implements Context
|
||||||
|
|
|
||||||
|
|
@ -512,7 +512,7 @@ final readonly class CartContext implements Context
|
||||||
{
|
{
|
||||||
Assert::true(
|
Assert::true(
|
||||||
$this->summaryPage->hasItemNamed($productName),
|
$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),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ use Sylius\Behat\Service\SharedStorageInterface;
|
||||||
use Sylius\Component\Addressing\Comparator\AddressComparatorInterface;
|
use Sylius\Component\Addressing\Comparator\AddressComparatorInterface;
|
||||||
use Sylius\Component\Addressing\Model\CountryInterface;
|
use Sylius\Component\Addressing\Model\CountryInterface;
|
||||||
use Sylius\Component\Core\Model\AddressInterface;
|
use Sylius\Component\Core\Model\AddressInterface;
|
||||||
use Sylius\Component\Resource\Factory\FactoryInterface;
|
use Sylius\Resource\Factory\FactoryInterface;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
|
||||||
final readonly class CheckoutAddressingContext implements Context
|
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 customer specify the billing (address as "([^"]+)", "([^"]+)", "([^"]+)", "([^"]+)" for "([^"]+)")$/
|
||||||
* @Given /^the visitor 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 visitor has specified (address as "([^"]+)", "([^"]+)", "([^"]+)", "([^"]+)" for "([^"]+)")$/
|
||||||
* @Given /^the customer 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$/
|
* @When /^I (do not specify any billing address) information$/
|
||||||
*/
|
*/
|
||||||
public function iSpecifyTheBillingAddressAs(AddressInterface $address): void
|
public function iSpecifyTheBillingAddressAs(AddressInterface $address): void
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ namespace Sylius\Behat\Page\Admin\ShippingMethod;
|
||||||
use Behat\Mink\Element\NodeElement;
|
use Behat\Mink\Element\NodeElement;
|
||||||
use Sylius\Behat\Page\Admin\Crud\IndexPage as BaseIndexPage;
|
use Sylius\Behat\Page\Admin\Crud\IndexPage as BaseIndexPage;
|
||||||
use Sylius\Component\Core\Model\ShippingMethodInterface;
|
use Sylius\Component\Core\Model\ShippingMethodInterface;
|
||||||
use Sylius\Component\Resource\Model\ResourceInterface;
|
use Sylius\Resource\Model\ResourceInterface;
|
||||||
|
|
||||||
class IndexPage extends BaseIndexPage implements IndexPageInterface
|
class IndexPage extends BaseIndexPage implements IndexPageInterface
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ use Behat\Mink\Session;
|
||||||
use FriendsOfBehat\PageObjectExtension\Page\Page;
|
use FriendsOfBehat\PageObjectExtension\Page\Page;
|
||||||
use FriendsOfBehat\PageObjectExtension\Page\UnexpectedPageException;
|
use FriendsOfBehat\PageObjectExtension\Page\UnexpectedPageException;
|
||||||
use Payum\Core\Security\TokenInterface;
|
use Payum\Core\Security\TokenInterface;
|
||||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
|
|
||||||
class PaypalExpressCheckoutPage extends Page implements PaypalExpressCheckoutPageInterface
|
class PaypalExpressCheckoutPage extends Page implements PaypalExpressCheckoutPageInterface
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,7 @@
|
||||||
<argument type="service" id="sylius.order_item_quantity_modifier" />
|
<argument type="service" id="sylius.order_item_quantity_modifier" />
|
||||||
<argument type="service" id="doctrine.orm.entity_manager" />
|
<argument type="service" id="doctrine.orm.entity_manager" />
|
||||||
<argument type="service" id="sylius.behat.clock" />
|
<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>
|
||||||
|
|
||||||
<service id="sylius.behat.context.setup.payment" class="Sylius\Behat\Context\Setup\PaymentContext">
|
<service id="sylius.behat.context.setup.payment" class="Sylius\Behat\Context\Setup\PaymentContext">
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ use Sylius\Component\Addressing\Model\Zone;
|
||||||
use Sylius\Component\Addressing\Model\ZoneInterface;
|
use Sylius\Component\Addressing\Model\ZoneInterface;
|
||||||
use Sylius\Component\Addressing\Model\ZoneMember;
|
use Sylius\Component\Addressing\Model\ZoneMember;
|
||||||
use Sylius\Component\Addressing\Model\ZoneMemberInterface;
|
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\ArrayNodeDefinition;
|
||||||
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
|
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
|
||||||
use Symfony\Component\Config\Definition\ConfigurationInterface;
|
use Symfony\Component\Config\Definition\ConfigurationInterface;
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ declare(strict_types=1);
|
||||||
namespace Sylius\Bundle\AddressingBundle\Form\Type;
|
namespace Sylius\Bundle\AddressingBundle\Form\Type;
|
||||||
|
|
||||||
use Sylius\Component\Addressing\Model\CountryInterface;
|
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\Bridge\Doctrine\Form\DataTransformer\CollectionToArrayTransformer;
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||||
|
|
@ -24,6 +24,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
|
|
||||||
final class CountryChoiceType extends AbstractType
|
final class CountryChoiceType extends AbstractType
|
||||||
{
|
{
|
||||||
|
/** @param RepositoryInterface<CountryInterface> $countryRepository */
|
||||||
public function __construct(private RepositoryInterface $countryRepository)
|
public function __construct(private RepositoryInterface $countryRepository)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,13 +14,15 @@ declare(strict_types=1);
|
||||||
namespace Sylius\Bundle\AddressingBundle\Form\Type;
|
namespace Sylius\Bundle\AddressingBundle\Form\Type;
|
||||||
|
|
||||||
use Sylius\Bundle\ResourceBundle\Form\DataTransformer\ResourceToIdentifierTransformer;
|
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\AbstractType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\Form\ReversedTransformer;
|
use Symfony\Component\Form\ReversedTransformer;
|
||||||
|
|
||||||
final class CountryCodeChoiceType extends AbstractType
|
final class CountryCodeChoiceType extends AbstractType
|
||||||
{
|
{
|
||||||
|
/** @param RepositoryInterface<CountryInterface> $countryRepository */
|
||||||
public function __construct(private RepositoryInterface $countryRepository)
|
public function __construct(private RepositoryInterface $countryRepository)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,8 @@ declare(strict_types=1);
|
||||||
namespace Sylius\Bundle\AddressingBundle\Form\Type;
|
namespace Sylius\Bundle\AddressingBundle\Form\Type;
|
||||||
|
|
||||||
use Sylius\Component\Addressing\Model\CountryInterface;
|
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\AbstractType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||||
use Symfony\Component\OptionsResolver\Options;
|
use Symfony\Component\OptionsResolver\Options;
|
||||||
|
|
@ -22,6 +23,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
|
|
||||||
final class ProvinceChoiceType extends AbstractType
|
final class ProvinceChoiceType extends AbstractType
|
||||||
{
|
{
|
||||||
|
/** @param RepositoryInterface<ProvinceInterface> $provinceRepository */
|
||||||
public function __construct(private RepositoryInterface $provinceRepository)
|
public function __construct(private RepositoryInterface $provinceRepository)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,13 +14,15 @@ declare(strict_types=1);
|
||||||
namespace Sylius\Bundle\AddressingBundle\Form\Type;
|
namespace Sylius\Bundle\AddressingBundle\Form\Type;
|
||||||
|
|
||||||
use Sylius\Bundle\ResourceBundle\Form\DataTransformer\ResourceToIdentifierTransformer;
|
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\AbstractType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\Form\ReversedTransformer;
|
use Symfony\Component\Form\ReversedTransformer;
|
||||||
|
|
||||||
final class ProvinceCodeChoiceType extends AbstractType
|
final class ProvinceCodeChoiceType extends AbstractType
|
||||||
{
|
{
|
||||||
|
/** @param RepositoryInterface<ProvinceInterface> $provinceRepository */
|
||||||
public function __construct(private RepositoryInterface $provinceRepository)
|
public function __construct(private RepositoryInterface $provinceRepository)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,8 @@ declare(strict_types=1);
|
||||||
namespace Sylius\Bundle\AddressingBundle\Form\Type;
|
namespace Sylius\Bundle\AddressingBundle\Form\Type;
|
||||||
|
|
||||||
use Sylius\Component\Addressing\Model\Scope as AddressingScope;
|
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\AbstractType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||||
use Symfony\Component\OptionsResolver\Options;
|
use Symfony\Component\OptionsResolver\Options;
|
||||||
|
|
@ -23,7 +24,10 @@ use Webmozart\Assert\Assert;
|
||||||
|
|
||||||
final class ZoneChoiceType extends AbstractType
|
final class ZoneChoiceType extends AbstractType
|
||||||
{
|
{
|
||||||
/** @param string[] $scopeTypes */
|
/**
|
||||||
|
* @param RepositoryInterface<ZoneInterface> $zoneRepository
|
||||||
|
* @param array<string, mixed> $scopeTypes
|
||||||
|
*/
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly RepositoryInterface $zoneRepository,
|
private readonly RepositoryInterface $zoneRepository,
|
||||||
private readonly array $scopeTypes,
|
private readonly array $scopeTypes,
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,8 @@ declare(strict_types=1);
|
||||||
namespace Sylius\Bundle\AddressingBundle\Form\Type;
|
namespace Sylius\Bundle\AddressingBundle\Form\Type;
|
||||||
|
|
||||||
use Sylius\Bundle\ResourceBundle\Form\DataTransformer\ResourceToIdentifierTransformer;
|
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\AbstractType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
|
@ -24,6 +25,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
|
|
||||||
final class ZoneCodeChoiceType extends AbstractType
|
final class ZoneCodeChoiceType extends AbstractType
|
||||||
{
|
{
|
||||||
|
/** @param RepositoryInterface<ZoneInterface> $zoneRepository */
|
||||||
public function __construct(private RepositoryInterface $zoneRepository)
|
public function __construct(private RepositoryInterface $zoneRepository)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ use Prophecy\Prophecy\ObjectProphecy;
|
||||||
use Prophecy\Prophecy\ProphecyInterface;
|
use Prophecy\Prophecy\ProphecyInterface;
|
||||||
use Sylius\Bundle\AddressingBundle\Form\Type\CountryChoiceType;
|
use Sylius\Bundle\AddressingBundle\Form\Type\CountryChoiceType;
|
||||||
use Sylius\Component\Addressing\Model\CountryInterface;
|
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\ChoiceList\View\ChoiceView;
|
||||||
use Symfony\Component\Form\PreloadedExtension;
|
use Symfony\Component\Form\PreloadedExtension;
|
||||||
use Symfony\Component\Form\Test\TypeTestCase;
|
use Symfony\Component\Form\Test\TypeTestCase;
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ use Prophecy\Prophecy\ProphecyInterface;
|
||||||
use Sylius\Bundle\AddressingBundle\Form\Type\ZoneChoiceType;
|
use Sylius\Bundle\AddressingBundle\Form\Type\ZoneChoiceType;
|
||||||
use Sylius\Component\Addressing\Model\Scope as AddressingScope;
|
use Sylius\Component\Addressing\Model\Scope as AddressingScope;
|
||||||
use Sylius\Component\Addressing\Model\ZoneInterface;
|
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\ChoiceList\View\ChoiceView;
|
||||||
use Symfony\Component\Form\PreloadedExtension;
|
use Symfony\Component\Form\PreloadedExtension;
|
||||||
use Symfony\Component\Form\Test\TypeTestCase;
|
use Symfony\Component\Form\Test\TypeTestCase;
|
||||||
|
|
|
||||||
|
|
@ -16,13 +16,17 @@ namespace Sylius\Bundle\AddressingBundle\Validator\Constraints;
|
||||||
use Sylius\Component\Addressing\Model\AddressInterface;
|
use Sylius\Component\Addressing\Model\AddressInterface;
|
||||||
use Sylius\Component\Addressing\Model\CountryInterface;
|
use Sylius\Component\Addressing\Model\CountryInterface;
|
||||||
use Sylius\Component\Addressing\Model\ProvinceInterface;
|
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\Constraint;
|
||||||
use Symfony\Component\Validator\ConstraintValidator;
|
use Symfony\Component\Validator\ConstraintValidator;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
|
||||||
class ProvinceAddressConstraintValidator extends ConstraintValidator
|
class ProvinceAddressConstraintValidator extends ConstraintValidator
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param RepositoryInterface<CountryInterface> $countryRepository
|
||||||
|
* @param RepositoryInterface<ProvinceInterface> $provinceRepository
|
||||||
|
*/
|
||||||
public function __construct(private RepositoryInterface $countryRepository, private RepositoryInterface $provinceRepository)
|
public function __construct(private RepositoryInterface $countryRepository, private RepositoryInterface $provinceRepository)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
"php": "^8.2",
|
"php": "^8.2",
|
||||||
"stof/doctrine-extensions-bundle": "^1.4",
|
"stof/doctrine-extensions-bundle": "^1.4",
|
||||||
"sylius/addressing": "^2.0",
|
"sylius/addressing": "^2.0",
|
||||||
"sylius/resource-bundle": "^1.10",
|
"sylius/resource-bundle": "^1.11",
|
||||||
"symfony/framework-bundle": "^6.4.1",
|
"symfony/framework-bundle": "^6.4.1",
|
||||||
"symfony/intl": "^6.4.0"
|
"symfony/intl": "^6.4.0"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ use Sylius\Bundle\AddressingBundle\Form\EventListener\BuildAddressFormSubscriber
|
||||||
use Sylius\Bundle\AddressingBundle\Form\Type\ProvinceCodeChoiceType;
|
use Sylius\Bundle\AddressingBundle\Form\Type\ProvinceCodeChoiceType;
|
||||||
use Sylius\Component\Addressing\Model\AddressInterface;
|
use Sylius\Component\Addressing\Model\AddressInterface;
|
||||||
use Sylius\Component\Addressing\Model\CountryInterface;
|
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\EventDispatcher\EventSubscriberInterface;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||||
use Symfony\Component\Form\FormEvent;
|
use Symfony\Component\Form\FormEvent;
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ use Sylius\Bundle\AddressingBundle\Validator\Constraints\ProvinceAddressConstrai
|
||||||
use Sylius\Component\Addressing\Model\AddressInterface;
|
use Sylius\Component\Addressing\Model\AddressInterface;
|
||||||
use Sylius\Component\Addressing\Model\Country;
|
use Sylius\Component\Addressing\Model\Country;
|
||||||
use Sylius\Component\Addressing\Model\Province;
|
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\Constraint;
|
||||||
use Symfony\Component\Validator\ConstraintViolation;
|
use Symfony\Component\Validator\ConstraintViolation;
|
||||||
use Symfony\Component\Validator\ConstraintViolationList;
|
use Symfony\Component\Validator\ConstraintViolationList;
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,9 @@ namespace Sylius\Bundle\AdminBundle\CommandHandler;
|
||||||
use Sylius\Bundle\AdminBundle\Command\CreateAdminUser;
|
use Sylius\Bundle\AdminBundle\Command\CreateAdminUser;
|
||||||
use Sylius\Bundle\AdminBundle\Exception\CreateAdminUserFailedException;
|
use Sylius\Bundle\AdminBundle\Exception\CreateAdminUserFailedException;
|
||||||
use Sylius\Component\Core\Model\AdminUserInterface;
|
use Sylius\Component\Core\Model\AdminUserInterface;
|
||||||
use Sylius\Component\Resource\Factory\FactoryInterface;
|
|
||||||
use Sylius\Component\User\Canonicalizer\CanonicalizerInterface;
|
use Sylius\Component\User\Canonicalizer\CanonicalizerInterface;
|
||||||
use Sylius\Component\User\Repository\UserRepositoryInterface;
|
use Sylius\Component\User\Repository\UserRepositoryInterface;
|
||||||
|
use Sylius\Resource\Factory\FactoryInterface;
|
||||||
use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
|
use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
|
||||||
use Symfony\Component\Validator\ConstraintViolationListInterface;
|
use Symfony\Component\Validator\ConstraintViolationListInterface;
|
||||||
use Symfony\Component\Validator\Validator\ValidatorInterface;
|
use Symfony\Component\Validator\Validator\ValidatorInterface;
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ namespace Sylius\Bundle\AdminBundle\Controller;
|
||||||
|
|
||||||
use Sylius\Component\Core\Customer\Statistics\CustomerStatisticsProviderInterface;
|
use Sylius\Component\Core\Customer\Statistics\CustomerStatisticsProviderInterface;
|
||||||
use Sylius\Component\Core\Model\CustomerInterface;
|
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\Request;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Symfony\Component\HttpKernel\Exception\HttpException;
|
use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||||
|
|
@ -23,6 +23,7 @@ use Twig\Environment;
|
||||||
|
|
||||||
final class CustomerStatisticsController
|
final class CustomerStatisticsController
|
||||||
{
|
{
|
||||||
|
/** @param RepositoryInterface<CustomerInterface> $customerRepository */
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private CustomerStatisticsProviderInterface $statisticsProvider,
|
private CustomerStatisticsProviderInterface $statisticsProvider,
|
||||||
private RepositoryInterface $customerRepository,
|
private RepositoryInterface $customerRepository,
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ namespace Sylius\Bundle\AdminBundle\Controller;
|
||||||
use Sylius\Bundle\ResourceBundle\Controller\RedirectHandlerInterface;
|
use Sylius\Bundle\ResourceBundle\Controller\RedirectHandlerInterface;
|
||||||
use Sylius\Bundle\ResourceBundle\Controller\RequestConfiguration;
|
use Sylius\Bundle\ResourceBundle\Controller\RequestConfiguration;
|
||||||
use Sylius\Bundle\UiBundle\Storage\FilterStorageInterface;
|
use Sylius\Bundle\UiBundle\Storage\FilterStorageInterface;
|
||||||
use Sylius\Component\Resource\Model\ResourceInterface;
|
use Sylius\Resource\Model\ResourceInterface;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
|
|
||||||
final class RedirectHandler implements RedirectHandlerInterface
|
final class RedirectHandler implements RedirectHandlerInterface
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,8 @@ declare(strict_types=1);
|
||||||
namespace Sylius\Bundle\AdminBundle\EventListener;
|
namespace Sylius\Bundle\AdminBundle\EventListener;
|
||||||
|
|
||||||
use Sylius\Bundle\LocaleBundle\Checker\LocaleUsageCheckerInterface;
|
use Sylius\Bundle\LocaleBundle\Checker\LocaleUsageCheckerInterface;
|
||||||
use Sylius\Bundle\ResourceBundle\Event\ResourceControllerEvent;
|
|
||||||
use Sylius\Component\Locale\Model\LocaleInterface;
|
use Sylius\Component\Locale\Model\LocaleInterface;
|
||||||
|
use Sylius\Resource\Symfony\EventDispatcher\GenericEvent;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
|
|
||||||
final class LocaleListener
|
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 */
|
/** @var LocaleInterface $locale */
|
||||||
$locale = $event->getSubject();
|
$locale = $event->getSubject();
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ namespace Sylius\Bundle\AdminBundle\EventListener;
|
||||||
|
|
||||||
use Doctrine\DBAL\Exception\ForeignKeyConstraintViolationException;
|
use Doctrine\DBAL\Exception\ForeignKeyConstraintViolationException;
|
||||||
use Sylius\Bundle\CoreBundle\Provider\FlashBagProvider;
|
use Sylius\Bundle\CoreBundle\Provider\FlashBagProvider;
|
||||||
use Sylius\Component\Resource\ResourceActions;
|
use Sylius\Resource\ResourceActions;
|
||||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||||
use Symfony\Component\HttpFoundation\RedirectResponse;
|
use Symfony\Component\HttpFoundation\RedirectResponse;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,8 @@ use Doctrine\Common\Collections\Collection;
|
||||||
use Sylius\Component\Product\Model\ProductAssociationInterface;
|
use Sylius\Component\Product\Model\ProductAssociationInterface;
|
||||||
use Sylius\Component\Product\Model\ProductAssociationTypeInterface;
|
use Sylius\Component\Product\Model\ProductAssociationTypeInterface;
|
||||||
use Sylius\Component\Product\Model\ProductInterface;
|
use Sylius\Component\Product\Model\ProductInterface;
|
||||||
use Sylius\Component\Resource\Factory\FactoryInterface;
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
use Sylius\Resource\Factory\FactoryInterface;
|
||||||
use Symfony\Component\Form\DataTransformerInterface;
|
use Symfony\Component\Form\DataTransformerInterface;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,8 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace Sylius\Bundle\AdminBundle\Form\DataTransformer;
|
namespace Sylius\Bundle\AdminBundle\Form\DataTransformer;
|
||||||
|
|
||||||
use Sylius\Component\Resource\Model\ResourceInterface;
|
use Sylius\Resource\Model\ResourceInterface;
|
||||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
|
||||||
use Symfony\Component\Form\DataTransformerInterface;
|
use Symfony\Component\Form\DataTransformerInterface;
|
||||||
use Symfony\Component\Form\Exception\TransformationFailedException;
|
use Symfony\Component\Form\Exception\TransformationFailedException;
|
||||||
use Symfony\Component\PropertyAccess\PropertyAccess;
|
use Symfony\Component\PropertyAccess\PropertyAccess;
|
||||||
|
|
|
||||||
|
|
@ -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\CountryType as BaseCountryType;
|
||||||
use Sylius\Bundle\AddressingBundle\Form\Type\ProvinceType;
|
use Sylius\Bundle\AddressingBundle\Form\Type\ProvinceType;
|
||||||
use Sylius\Component\Addressing\Model\CountryInterface;
|
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\AbstractType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\CountryType as SymfonyCountryType;
|
use Symfony\Component\Form\Extension\Core\Type\CountryType as SymfonyCountryType;
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ namespace Sylius\Bundle\AdminBundle\Form\Type;
|
||||||
|
|
||||||
use Sylius\Bundle\LocaleBundle\Form\Type\LocaleType as BaseLocaleType;
|
use Sylius\Bundle\LocaleBundle\Form\Type\LocaleType as BaseLocaleType;
|
||||||
use Sylius\Component\Locale\Model\LocaleInterface;
|
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\AbstractType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\LocaleType as SymfonyLocaleType;
|
use Symfony\Component\Form\Extension\Core\Type\LocaleType as SymfonyLocaleType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue