diff --git a/behat.yml.dist b/behat.yml.dist
index 27609b6..47caeb1 100644
--- a/behat.yml.dist
+++ b/behat.yml.dist
@@ -6,7 +6,7 @@ default:
extensions:
DMore\ChromeExtension\Behat\ServiceContainer\ChromeExtension: ~
- Lakion\Behat\MinkDebugExtension:
+ FriendsOfBehat\MinkDebugExtension:
directory: etc/build
clean_start: false
screenshot: true
@@ -46,7 +46,7 @@ default:
FriendsOfBehat\SymfonyExtension:
bootstrap: tests/Application/config/bootstrap.php
kernel:
- class: Tests\Acme\SyliusExamplePlugin\Application\Kernel
+ class: Tests\BitBag\SyliusShippingSubscriptionPlugin\Application\Kernel
FriendsOfBehat\VariadicExtension: ~
diff --git a/composer.json b/composer.json
index b3280b1..5566686 100644
--- a/composer.json
+++ b/composer.json
@@ -9,17 +9,17 @@
"license": "MIT",
"require": {
"php": "^8.0",
- "sylius/sylius": "~1.11.0 || ~1.12.0"
+ "sylius/sylius": "~1.12.0 || ~1.13.0"
},
"require-dev": {
- "behat/behat": "^3.6.1",
- "behat/mink-selenium2-driver": "^1.4",
- "bitbag/coding-standard": "^1.0.1",
+ "behat/behat": "^3.7",
+ "behat/mink-selenium2-driver": "~1.6.0",
+ "bitbag/coding-standard": "^3.0",
"dmore/behat-chrome-extension": "^1.3",
"dmore/chrome-mink-driver": "^2.7",
"friends-of-behat/mink": "^1.8",
"friends-of-behat/mink-browserkit-driver": "^1.4",
- "friends-of-behat/mink-debug-extension": "^2.0.0",
+ "friends-of-behat/mink-debug-extension": "^2.0",
"friends-of-behat/mink-extension": "^2.4",
"friends-of-behat/page-object-extension": "^0.3",
"friends-of-behat/suite-settings-extension": "^1.0",
@@ -27,10 +27,10 @@
"friends-of-behat/variadic-extension": "^1.3",
"phpspec/phpspec": "^7.0",
"phpstan/extension-installer": "^1.0",
- "phpstan/phpstan": "0.12.85",
- "phpstan/phpstan-doctrine": "0.12.33",
- "phpstan/phpstan-strict-rules": "^0.12.0",
- "phpstan/phpstan-webmozart-assert": "0.12.12",
+ "phpstan/phpstan": "^1.8",
+ "phpstan/phpstan-doctrine": "^1.3",
+ "phpstan/phpstan-strict-rules": "^1.3",
+ "phpstan/phpstan-webmozart-assert": "^1.2",
"phpunit/phpunit": "^9.5",
"polishsymfonycommunity/symfony-mocker-container": "^1.0",
"symfony/browser-kit": "^5.4 || ^6.0",
@@ -48,6 +48,9 @@
"phpstan/extension-installer": true
}
},
+ "conflict": {
+ "doctrine/persistence": "<3.0"
+ },
"autoload": {
"psr-4": {
"BitBag\\SyliusShippingSubscriptionPlugin\\": "src/",
diff --git a/doc/attributes_mapping.md b/doc/attributes_mapping.md
new file mode 100644
index 0000000..96c5ec2
--- /dev/null
+++ b/doc/attributes_mapping.md
@@ -0,0 +1,217 @@
+## Attribute mapping settings
+
+### Remember to mark attribute mapping appropriately in the config/doctrine.yaml configuration file.
+```
+// config/packages/doctrine.yaml
+
+doctrine:
+ ...
+ orm:
+ ...
+ mappings:
+ App:
+ ...
+ type: attribute
+
+```
+Extend Customer:
+```php
+|null */
+ public function getSubscriptions(): ?Collection
+ {
+ return $this->shippingSubscriptions;
+ }
+}
+```
+
+Extend Product:
+```php
+ 0])]
+ protected bool $shippingSubscription;
+
+ public function isShippingSubscription(): bool
+ {
+ return $this->shippingSubscription;
+ }
+
+ public function setShippingSubscription(bool $shippingSubscription): void
+ {
+ $this->shippingSubscription = $shippingSubscription;
+ }
+
+ protected function createTranslation(): ProductTranslationInterface
+ {
+ return new ProductTranslation();
+ }
+}
+```
+
+Extend ProductVariant:
+```php
+ 0])]
+ protected ?int $subscriptionLength;
+
+ public function getSubscriptionLength(): ?int
+ {
+ return $this->subscriptionLength;
+ }
+
+ public function setSubscriptionLength(?int $subscriptionLength): void
+ {
+ $this->subscriptionLength = $subscriptionLength;
+ }
+
+ protected function createTranslation(): ProductVariantTranslationInterface
+ {
+ return new ProductVariantTranslation();
+ }
+}
+```
+
+Extend ShippingMethod:
+```php
+ 0])]
+ protected ?bool $shippingSubscription;
+
+ #[ORM\Column(type: 'integer', nullable: true)]
+ protected ?int $availableFromTotal;
+
+ public function getAvailableFromTotal(): ?int
+ {
+ return $this->availableFromTotal;
+ }
+
+ public function setAvailableFromTotal(?int $availableFromTotal): void
+ {
+ $this->availableFromTotal = $availableFromTotal;
+ }
+
+ public function isShippingSubscription(): ?bool
+ {
+ return $this->shippingSubscription;
+ }
+
+ public function setShippingSubscription(?bool $shippingSubscription): void
+ {
+ $this->shippingSubscription = $shippingSubscription;
+ }
+ protected function createTranslation(): ShippingMethodTranslationInterface
+ {
+ return new ShippingMethodTranslation();
+ }
+}
+
+```
+
+Extend `OrderItemUnitRepository` (in src/Repository folder):
+
+```php
+import('vendor/bitbag/coding-standard/ecs.php');
- $services = $containerConfigurator->services();
- $services->set(ArraySyntaxFixer::class)
- ->call('configure', [[
- 'syntax' => 'short',
- ]]);
+return static function (ECSConfig $config): void {
- $parameters = $containerConfigurator->parameters();
- $parameters->set(Option::PATHS, [
- __DIR__ . '/src',
- __DIR__ . '/tests',
- ]);
+ putenv('ALLOW_BITBAG_OS_HEADER=1');
+
+ $config->import('vendor/bitbag/coding-standard/ecs.php');
+ $config->paths(['src', 'tests']);
};
diff --git a/phpstan.neon b/phpstan.neon
index 734c5d5..aeb9621 100644
--- a/phpstan.neon
+++ b/phpstan.neon
@@ -1,10 +1,11 @@
-includes:
- - vendor/phpstan/phpstan-doctrine/extension.neon
- - vendor/phpstan/phpstan-webmozart-assert/extension.neon
-
parameters:
+ level: 8
+
+ paths:
+ - src
+
reportUnmatchedIgnoredErrors: false
- checkMissingIterableValueType: false
+ treatPhpDocTypesAsCertain: false
excludes_analyse:
# Makes PHPStan crash
@@ -15,4 +16,5 @@ parameters:
- 'tests/Application/src/**.php'
ignoreErrors:
- - '/Parameter #1 $configuration of method Symfony\Component\DependencyInjection\Extension\Extension::processConfiguration() expects Symfony\Component\Config\Definition\ConfigurationInterface, Symfony\Component\Config\Definition\ConfigurationInterface|null given./'
+ - identifier: missingType.iterableValue
+ - identifier: missingType.generics
diff --git a/src/BitBagSyliusShippingSubscriptionPlugin.php b/src/BitBagSyliusShippingSubscriptionPlugin.php
index c52a2d1..319954e 100644
--- a/src/BitBagSyliusShippingSubscriptionPlugin.php
+++ b/src/BitBagSyliusShippingSubscriptionPlugin.php
@@ -1,10 +1,11 @@
supports($shippingSubject)) {
return false;
@@ -77,6 +78,6 @@ private function supports(ShippingSubjectInterface $subject): bool
{
return $subject instanceof ShipmentInterface &&
null !== $subject->getOrder()
- ;
+ ;
}
}
diff --git a/src/Checker/Subscription/SubscriptionExpirationChecker.php b/src/Checker/Subscription/SubscriptionExpirationChecker.php
index be4bc4a..76b07cf 100644
--- a/src/Checker/Subscription/SubscriptionExpirationChecker.php
+++ b/src/Checker/Subscription/SubscriptionExpirationChecker.php
@@ -1,10 +1,11 @@
false,
'label' => 'bitbag_sylius_shipping_subscription.form.product.shipping_subscription',
- ]
+ ],
);
}
diff --git a/src/Form/Extension/ProductVariantTypeExtension.php b/src/Form/Extension/ProductVariantTypeExtension.php
index 8432600..4ad29dd 100644
--- a/src/Form/Extension/ProductVariantTypeExtension.php
+++ b/src/Form/Extension/ProductVariantTypeExtension.php
@@ -1,10 +1,11 @@
'bitbag_sylius_shipping_subscription.form.shipping.length',
'required' => false,
'attr' => ['is-subscription' => $isSubscription],
- ]
+ ],
);
}
diff --git a/src/Form/Extension/ShippingMethodTypeExtension.php b/src/Form/Extension/ShippingMethodTypeExtension.php
index 74095e9..24d91e4 100644
--- a/src/Form/Extension/ShippingMethodTypeExtension.php
+++ b/src/Form/Extension/ShippingMethodTypeExtension.php
@@ -1,10 +1,11 @@
shippingSubscriptionFactory = $shippingSubscriptionFactory;
$this->shippingSubscriptionRepository = $shippingSubscriptionRepository;
diff --git a/src/Repository/ShippingSubscriptionOrderRepositoryAwareInterface.php b/src/Repository/ShippingSubscriptionOrderRepositoryAwareInterface.php
index f199725..befbcf9 100644
--- a/src/Repository/ShippingSubscriptionOrderRepositoryAwareInterface.php
+++ b/src/Repository/ShippingSubscriptionOrderRepositoryAwareInterface.php
@@ -1,10 +1,11 @@
=1.2)
diff --git a/tests/Application/config/bundles.php b/tests/Application/config/bundles.php
index db8e122..d5df5ac 100644
--- a/tests/Application/config/bundles.php
+++ b/tests/Application/config/bundles.php
@@ -1,10 +1,13 @@
['all' => true],
@@ -59,4 +62,9 @@
Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle::class => ['all' => true],
Sylius\Bundle\ApiBundle\SyliusApiBundle::class => ['all' => true],
SyliusLabs\DoctrineMigrationsExtraBundle\SyliusLabsDoctrineMigrationsExtraBundle::class => ['all' => true],
+ League\FlysystemBundle\FlysystemBundle::class => ['all' => true],
+ Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
+ Sylius\Calendar\SyliusCalendarBundle::class => ['all' => true],
+ BabDev\PagerfantaBundle\BabDevPagerfantaBundle::class => ['all' => true],
+ SyliusLabs\Polyfill\Symfony\Security\Bundle\SyliusLabsPolyfillSymfonySecurityBundle::class => ['all' => true],
];
diff --git a/tests/Application/config/sylius/1.12/packages/mailer.yaml b/tests/Application/config/packages/mailer.yaml
similarity index 100%
rename from tests/Application/config/sylius/1.12/packages/mailer.yaml
rename to tests/Application/config/packages/mailer.yaml
diff --git a/tests/Application/config/sylius/1.12/packages/security.yaml b/tests/Application/config/packages/security.yaml
similarity index 97%
rename from tests/Application/config/sylius/1.12/packages/security.yaml
rename to tests/Application/config/packages/security.yaml
index 842b093..2f4eb25 100644
--- a/tests/Application/config/sylius/1.12/packages/security.yaml
+++ b/tests/Application/config/packages/security.yaml
@@ -9,7 +9,7 @@ security:
id: sylius.shop_user_provider.email_or_name_based
sylius_api_shop_user_provider:
id: sylius.shop_user_provider.email_or_name_based
-
+
password_hashers:
Sylius\Component\User\Model\UserInterface: argon2i
firewalls:
@@ -38,7 +38,7 @@ security:
logout:
path: sylius_admin_logout
target: sylius_admin_login
-
+
new_api_admin_user:
pattern: "%sylius.security.new_api_admin_regex%/.*"
provider: sylius_api_admin_user_provider
@@ -51,7 +51,7 @@ security:
success_handler: lexik_jwt_authentication.handler.authentication_success
failure_handler: lexik_jwt_authentication.handler.authentication_failure
jwt: true
-
+
new_api_shop_user:
pattern: "%sylius.security.new_api_shop_regex%/.*"
provider: sylius_api_shop_user_provider
@@ -64,7 +64,7 @@ security:
success_handler: lexik_jwt_authentication.handler.authentication_success
failure_handler: lexik_jwt_authentication.handler.authentication_failure
jwt: true
-
+
shop:
switch_user: { role: ROLE_ALLOWED_TO_SWITCH }
context: shop
@@ -92,30 +92,32 @@ security:
path: sylius_shop_logout
target: sylius_shop_homepage
invalidate_session: false
-
+
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
-
+
image_resolver:
pattern: ^/media/cache/resolve
security: false
-
+
access_control:
- { path: "%sylius.security.admin_regex%/_partial", role: PUBLIC_ACCESS, ips: [127.0.0.1, ::1] }
- { path: "%sylius.security.admin_regex%/_partial", role: ROLE_NO_ACCESS }
- { path: "%sylius.security.shop_regex%/_partial", role: PUBLIC_ACCESS, ips: [127.0.0.1, ::1] }
- { path: "%sylius.security.shop_regex%/_partial", role: ROLE_NO_ACCESS }
-
+
+ - { path: "%sylius.security.admin_regex%/forgotten-password", role: PUBLIC_ACCESS }
+
- { path: "%sylius.security.admin_regex%/login", role: PUBLIC_ACCESS }
- { path: "%sylius.security.shop_regex%/login", role: PUBLIC_ACCESS }
-
+
- { path: "%sylius.security.shop_regex%/register", role: PUBLIC_ACCESS }
- { path: "%sylius.security.shop_regex%/verify", role: PUBLIC_ACCESS }
-
+
- { path: "%sylius.security.admin_regex%", role: ROLE_ADMINISTRATION_ACCESS }
- { path: "%sylius.security.shop_regex%/account", role: ROLE_USER }
-
+
- { path: "%sylius.security.new_api_admin_route%/reset-password-requests", role: PUBLIC_ACCESS }
- { path: "%sylius.security.new_api_admin_regex%/.*", role: ROLE_API_ACCESS }
- { path: "%sylius.security.new_api_admin_route%/authentication-token", role: PUBLIC_ACCESS }
diff --git a/tests/Application/config/sylius/1.11/bundles.php b/tests/Application/config/sylius/1.11/bundles.php
deleted file mode 100644
index 952ea3b..0000000
--- a/tests/Application/config/sylius/1.11/bundles.php
+++ /dev/null
@@ -1,15 +0,0 @@
- ['all' => true],
- Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle::class => ['all' => true],
- SyliusLabs\Polyfill\Symfony\Security\Bundle\SyliusLabsPolyfillSymfonySecurityBundle::class => ['all' => true],
- Sylius\Calendar\SyliusCalendarBundle::class => ['all' => true],
- Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
-];
diff --git a/tests/Application/config/sylius/1.11/packages/dev/swiftmailer.yaml b/tests/Application/config/sylius/1.11/packages/dev/swiftmailer.yaml
deleted file mode 100644
index f438078..0000000
--- a/tests/Application/config/sylius/1.11/packages/dev/swiftmailer.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-swiftmailer:
- disable_delivery: true
diff --git a/tests/Application/config/sylius/1.11/packages/jms_serializer.yaml b/tests/Application/config/sylius/1.11/packages/jms_serializer.yaml
deleted file mode 100644
index ed7bc61..0000000
--- a/tests/Application/config/sylius/1.11/packages/jms_serializer.yaml
+++ /dev/null
@@ -1,4 +0,0 @@
-jms_serializer:
- visitors:
- xml_serialization:
- format_output: '%kernel.debug%'
diff --git a/tests/Application/config/sylius/1.11/packages/security.yaml b/tests/Application/config/sylius/1.11/packages/security.yaml
deleted file mode 100644
index 1062810..0000000
--- a/tests/Application/config/sylius/1.11/packages/security.yaml
+++ /dev/null
@@ -1,148 +0,0 @@
-parameters:
- sylius.security.admin_regex: "^/%sylius_admin.path_name%"
- sylius.security.api_regex: "^/api"
- sylius.security.shop_regex: "^/(?!%sylius_admin.path_name%|new-api|api/.*|api$|media/.*)[^/]++"
- sylius.security.new_api_route: "/new-api"
- sylius.security.new_api_regex: "^%sylius.security.new_api_route%"
- sylius.security.new_api_admin_route: "%sylius.security.new_api_route%/admin"
- sylius.security.new_api_admin_regex: "^%sylius.security.new_api_admin_route%"
- sylius.security.new_api_shop_route: "%sylius.security.new_api_route%/shop"
- sylius.security.new_api_shop_regex: "^%sylius.security.new_api_shop_route%"
-
-security:
- always_authenticate_before_granting: true
- providers:
- sylius_admin_user_provider:
- id: sylius.admin_user_provider.email_or_name_based
- sylius_api_admin_user_provider:
- id: sylius.admin_user_provider.email_or_name_based
- sylius_shop_user_provider:
- id: sylius.shop_user_provider.email_or_name_based
- sylius_api_shop_user_provider:
- id: sylius.shop_user_provider.email_or_name_based
- sylius_api_chain_provider:
- chain:
- providers: [sylius_api_shop_user_provider, sylius_api_admin_user_provider]
-
- encoders:
- Sylius\Component\User\Model\UserInterface: argon2i
- firewalls:
- admin:
- switch_user: true
- context: admin
- pattern: "%sylius.security.admin_regex%"
- provider: sylius_admin_user_provider
- form_login:
- provider: sylius_admin_user_provider
- login_path: sylius_admin_login
- check_path: sylius_admin_login_check
- failure_path: sylius_admin_login
- default_target_path: sylius_admin_dashboard
- use_forward: false
- use_referer: true
- csrf_token_generator: security.csrf.token_manager
- csrf_parameter: _csrf_admin_security_token
- csrf_token_id: admin_authenticate
- remember_me:
- secret: "%env(APP_SECRET)%"
- path: "/%sylius_admin.path_name%"
- name: APP_ADMIN_REMEMBER_ME
- lifetime: 31536000
- remember_me_parameter: _remember_me
- logout:
- path: sylius_admin_logout
- target: sylius_admin_login
- anonymous: true
-
- new_api_admin_user:
- pattern: "%sylius.security.new_api_route%/admin-user-authentication-token"
- provider: sylius_admin_user_provider
- stateless: true
- anonymous: true
- json_login:
- check_path: "%sylius.security.new_api_route%/admin-user-authentication-token"
- username_path: email
- password_path: password
- success_handler: lexik_jwt_authentication.handler.authentication_success
- failure_handler: lexik_jwt_authentication.handler.authentication_failure
- guard:
- authenticators:
- - lexik_jwt_authentication.jwt_token_authenticator
-
- new_api_shop_user:
- pattern: "%sylius.security.new_api_route%/shop-user-authentication-token"
- provider: sylius_shop_user_provider
- stateless: true
- anonymous: true
- json_login:
- check_path: "%sylius.security.new_api_route%/shop-user-authentication-token"
- username_path: email
- password_path: password
- success_handler: lexik_jwt_authentication.handler.authentication_success
- failure_handler: lexik_jwt_authentication.handler.authentication_failure
- guard:
- authenticators:
- - lexik_jwt_authentication.jwt_token_authenticator
-
- new_api:
- pattern: "%sylius.security.new_api_regex%/*"
- provider: sylius_api_chain_provider
- stateless: true
- anonymous: lazy
- guard:
- authenticators:
- - lexik_jwt_authentication.jwt_token_authenticator
-
- shop:
- switch_user: { role: ROLE_ALLOWED_TO_SWITCH }
- context: shop
- pattern: "%sylius.security.shop_regex%"
- provider: sylius_shop_user_provider
- form_login:
- success_handler: sylius.authentication.success_handler
- failure_handler: sylius.authentication.failure_handler
- provider: sylius_shop_user_provider
- login_path: sylius_shop_login
- check_path: sylius_shop_login_check
- failure_path: sylius_shop_login
- default_target_path: sylius_shop_homepage
- use_forward: false
- use_referer: true
- csrf_token_generator: security.csrf.token_manager
- csrf_parameter: _csrf_shop_security_token
- csrf_token_id: shop_authenticate
- remember_me:
- secret: "%env(APP_SECRET)%"
- name: APP_SHOP_REMEMBER_ME
- lifetime: 31536000
- remember_me_parameter: _remember_me
- logout:
- path: sylius_shop_logout
- target: sylius_shop_login
- invalidate_session: false
- success_handler: sylius.handler.shop_user_logout
- anonymous: true
-
- dev:
- pattern: ^/(_(profiler|wdt)|css|images|js)/
- security: false
-
- access_control:
- - { path: "%sylius.security.admin_regex%/_partial", role: IS_AUTHENTICATED_ANONYMOUSLY, ips: [127.0.0.1, ::1] }
- - { path: "%sylius.security.admin_regex%/_partial", role: ROLE_NO_ACCESS }
- - { path: "%sylius.security.shop_regex%/_partial", role: IS_AUTHENTICATED_ANONYMOUSLY, ips: [127.0.0.1, ::1] }
- - { path: "%sylius.security.shop_regex%/_partial", role: ROLE_NO_ACCESS }
-
- - { path: "%sylius.security.admin_regex%/login", role: IS_AUTHENTICATED_ANONYMOUSLY }
- - { path: "%sylius.security.api_regex%/login", role: IS_AUTHENTICATED_ANONYMOUSLY }
- - { path: "%sylius.security.shop_regex%/login", role: IS_AUTHENTICATED_ANONYMOUSLY }
-
- - { path: "%sylius.security.shop_regex%/register", role: IS_AUTHENTICATED_ANONYMOUSLY }
- - { path: "%sylius.security.shop_regex%/verify", role: IS_AUTHENTICATED_ANONYMOUSLY }
-
- - { path: "%sylius.security.admin_regex%", role: ROLE_ADMINISTRATION_ACCESS }
- - { path: "%sylius.security.api_regex%/.*", role: ROLE_API_ACCESS }
- - { path: "%sylius.security.shop_regex%/account", role: ROLE_USER }
-
- - { path: "%sylius.security.new_api_admin_regex%/.*", role: ROLE_API_ACCESS }
- - { path: "%sylius.security.new_api_shop_regex%/.*", role: IS_AUTHENTICATED_ANONYMOUSLY }
diff --git a/tests/Application/config/sylius/1.11/packages/swiftmailer.yaml b/tests/Application/config/sylius/1.11/packages/swiftmailer.yaml
deleted file mode 100644
index 73bba27..0000000
--- a/tests/Application/config/sylius/1.11/packages/swiftmailer.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-swiftmailer:
- url: '%env(MAILER_URL)%'
diff --git a/tests/Application/config/sylius/1.11/packages/test/security.yaml b/tests/Application/config/sylius/1.11/packages/test/security.yaml
deleted file mode 100644
index 21cc377..0000000
--- a/tests/Application/config/sylius/1.11/packages/test/security.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
-security:
- encoders:
- sha512: sha512
diff --git a/tests/Application/config/sylius/1.11/packages/test/swiftmailer.yaml b/tests/Application/config/sylius/1.11/packages/test/swiftmailer.yaml
deleted file mode 100644
index aaac242..0000000
--- a/tests/Application/config/sylius/1.11/packages/test/swiftmailer.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-swiftmailer:
- disable_delivery: true
- logging: true
- spool:
- type: file
- path: "%kernel.cache_dir%/spool"
diff --git a/tests/Application/config/sylius/1.11/packages/test_cached/security.yaml b/tests/Application/config/sylius/1.11/packages/test_cached/security.yaml
deleted file mode 100644
index 21cc377..0000000
--- a/tests/Application/config/sylius/1.11/packages/test_cached/security.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
-security:
- encoders:
- sha512: sha512
diff --git a/tests/Application/config/sylius/1.11/packages/test_cached/swiftmailer.yaml b/tests/Application/config/sylius/1.11/packages/test_cached/swiftmailer.yaml
deleted file mode 100644
index aaac242..0000000
--- a/tests/Application/config/sylius/1.11/packages/test_cached/swiftmailer.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-swiftmailer:
- disable_delivery: true
- logging: true
- spool:
- type: file
- path: "%kernel.cache_dir%/spool"
diff --git a/tests/Application/config/sylius/1.12/bundles.php b/tests/Application/config/sylius/1.12/bundles.php
deleted file mode 100644
index f66e062..0000000
--- a/tests/Application/config/sylius/1.12/bundles.php
+++ /dev/null
@@ -1,17 +0,0 @@
- ['all' => true],
- Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
- Sylius\Calendar\SyliusCalendarBundle::class => ['all' => true],
- BabDev\PagerfantaBundle\BabDevPagerfantaBundle::class => ['all' => true],
- SyliusLabs\Polyfill\Symfony\Security\Bundle\SyliusLabsPolyfillSymfonySecurityBundle::class => ['all' => true],
-];
diff --git a/tests/Application/config/sylius/1.13/bundles.php b/tests/Application/config/sylius/1.13/bundles.php
new file mode 100644
index 0000000..e615f85
--- /dev/null
+++ b/tests/Application/config/sylius/1.13/bundles.php
@@ -0,0 +1,14 @@
+ ['all' => true],
+];
diff --git a/tests/Application/config/sylius/1.13/packages/test/mailer.yaml b/tests/Application/config/sylius/1.13/packages/test/mailer.yaml
new file mode 100644
index 0000000..56cc28f
--- /dev/null
+++ b/tests/Application/config/sylius/1.13/packages/test/mailer.yaml
@@ -0,0 +1,7 @@
+framework:
+ mailer:
+ dsn: 'null://null'
+ cache:
+ pools:
+ test.mailer_pool:
+ adapter: cache.adapter.filesystem
diff --git a/tests/Application/config/symfony/4.4/packages/framework.yaml b/tests/Application/config/symfony/4.4/packages/framework.yaml
deleted file mode 100644
index 62f82d3..0000000
--- a/tests/Application/config/symfony/4.4/packages/framework.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-framework:
- templating: { engines: ["twig"] }
diff --git a/tests/Application/gulpfile.babel.js b/tests/Application/gulpfile.babel.js
deleted file mode 100644
index 5920316..0000000
--- a/tests/Application/gulpfile.babel.js
+++ /dev/null
@@ -1,60 +0,0 @@
-import chug from 'gulp-chug';
-import gulp from 'gulp';
-import yargs from 'yargs';
-
-const { argv } = yargs
- .options({
- rootPath: {
- description: '
path to public assets directory',
- type: 'string',
- requiresArg: true,
- required: false,
- },
- nodeModulesPath: {
- description: ' path to node_modules directory',
- type: 'string',
- requiresArg: true,
- required: false,
- },
- });
-
-const config = [
- '--rootPath',
- argv.rootPath || '../../../../../../../tests/Application/public/assets',
- '--nodeModulesPath',
- argv.nodeModulesPath || '../../../../../../../tests/Application/node_modules',
-];
-
-export const buildAdmin = function buildAdmin() {
- return gulp.src('../../vendor/sylius/sylius/src/Sylius/Bundle/AdminBundle/gulpfile.babel.js', { read: false })
- .pipe(chug({ args: config, tasks: 'build' }));
-};
-buildAdmin.description = 'Build admin assets.';
-
-export const watchAdmin = function watchAdmin() {
- return gulp.src('../../vendor/sylius/sylius/src/Sylius/Bundle/AdminBundle/gulpfile.babel.js', { read: false })
- .pipe(chug({ args: config, tasks: 'watch' }));
-};
-watchAdmin.description = 'Watch admin asset sources and rebuild on changes.';
-
-export const buildShop = function buildShop() {
- return gulp.src('../../vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle/gulpfile.babel.js', { read: false })
- .pipe(chug({ args: config, tasks: 'build' }));
-};
-buildShop.description = 'Build shop assets.';
-
-export const watchShop = function watchShop() {
- return gulp.src('../../vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle/gulpfile.babel.js', { read: false })
- .pipe(chug({ args: config, tasks: 'watch' }));
-};
-watchShop.description = 'Watch shop asset sources and rebuild on changes.';
-
-export const build = gulp.parallel(buildAdmin, buildShop);
-build.description = 'Build assets.';
-
-gulp.task('admin', buildAdmin);
-gulp.task('admin-watch', watchAdmin);
-gulp.task('shop', buildShop);
-gulp.task('shop-watch', watchShop);
-
-export default build;
diff --git a/tests/Application/package.json b/tests/Application/package.json
index b213436..54135f8 100644
--- a/tests/Application/package.json
+++ b/tests/Application/package.json
@@ -22,16 +22,6 @@
"eslint-import-resolver-babel-module": "^4.0.0",
"eslint-plugin-import": "^2.11.0",
"fast-async": "^6.3.7",
- "gulp": "^4.0.0",
- "gulp-chug": "^0.5",
- "gulp-concat": "^2.6.0",
- "gulp-debug": "^2.1.2",
- "gulp-if": "^2.0.0",
- "gulp-livereload": "^4.0.1",
- "gulp-order": "^1.1.1",
- "gulp-sass": "^4.0.1",
- "gulp-sourcemaps": "^1.6.0",
- "gulp-uglifycss": "^1.0.5",
"merge-stream": "^1.0.0",
"rollup": "^0.60.2",
"rollup-plugin-babel": "^3.0.4",
@@ -39,7 +29,8 @@
"rollup-plugin-inject": "^2.0.0",
"rollup-plugin-node-resolve": "^3.3.0",
"rollup-plugin-uglify": "^4.0.0",
- "sass-loader": "^7.0.1",
+ "sass": "^1.39.2",
+ "sass-loader": "^10.0.0",
"upath": "^1.1.0",
"yargs": "^6.4.0"
},
diff --git a/tests/Application/public/index.php b/tests/Application/public/index.php
index eed9ce7..16eb1b2 100644
--- a/tests/Application/public/index.php
+++ b/tests/Application/public/index.php
@@ -1,10 +1,17 @@
shippingSubscriptions;
}
}
-
diff --git a/tests/Application/src/Entity/Product/Product.php b/tests/Application/src/Entity/Product/Product.php
index de94e66..83bb8a1 100644
--- a/tests/Application/src/Entity/Product/Product.php
+++ b/tests/Application/src/Entity/Product/Product.php
@@ -1,5 +1,12 @@
staticWelcomePage = $staticWelcomePage;
diff --git a/tests/Behat/Page/Shop/DynamicWelcomePage.php b/tests/Behat/Page/Shop/DynamicWelcomePage.php
index 596d4f0..0b55e77 100644
--- a/tests/Behat/Page/Shop/DynamicWelcomePage.php
+++ b/tests/Behat/Page/Shop/DynamicWelcomePage.php
@@ -1,21 +1,22 @@
-
-
-
+
+
+
-
-
+
+
diff --git a/tests/Behat/Resources/suites.yml b/tests/Behat/Resources/suites.yml
index 6cfe415..867a3f4 100644
--- a/tests/Behat/Resources/suites.yml
+++ b/tests/Behat/Resources/suites.yml
@@ -4,7 +4,7 @@ default:
suites:
greeting_customer:
contexts:
- - acme_sylius_example.context.ui.shop.welcome
+ - bitbag_sylius_shipping_subscription_plugin.context.ui.shop.welcome
filters:
tags: "@greeting_customer"