Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Sylius 1.11 and drop for 1.8 #8

Merged
merged 4 commits into from
Apr 27, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 10 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,20 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [7.4, 7.3, 8.0]
php: [7.4, 8.0]
symfony: [^4.4, ^5.2]
sylius: [~1.8.0, ~1.9.0, ~1.10.0]
sylius: [~1.9, ~1.10, ~1.11]
node: [14.x]
mysql: [5.7]
mysql: [8.0]

exclude:
-
sylius: ~1.8.0
symfony: ^5.2
-
- sylius: ~1.9
php: 8.0
sylius: ~1.8.0
-
php: 8.0
sylius: ~1.9.0
-
php: 7.3
sylius: ~1.10.0
- sylius: ~1.10
symfony: 4.4
- sylius: ~1.11
php: 7.4


env:
APP_ENV: test
Expand Down Expand Up @@ -116,7 +111,7 @@ jobs:

-
name: Install PHP dependencies
run: composer install --no-interaction
run: composer install --no-interaction --no-scripts

-
name: Get Yarn cache directory
Expand Down
1 change: 1 addition & 0 deletions behat.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ default:
symfony: ~
chrome_headless:
chrome:
socket_timeout: 60
api_url: http://127.0.0.1:9222
validate_certificate: false
chrome:
Expand Down
6 changes: 4 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
"description": "MultiSafepay payment plugin for Sylius applications.",
"license": "MIT",
"require": {
"php": "^7.3 || ^8.0",
"php": "^7.4 || ^8.0",
"multisafepay/api": "^2.0",
"sylius/sylius": "~1.8.0 || ~1.9.0 || ~1.10.0"
"sylius/sylius": "~1.9.0 || ~1.10.0 || ~1.11.0"
},
"require-dev": {
"babdev/pagerfanta-bundle": "^2.5",
"behat/behat": "^3.6.1",
"behat/mink-selenium2-driver": "^1.4",
"dmore/behat-chrome-extension": "^1.3",
Expand All @@ -30,6 +31,7 @@
"phpstan/phpstan-strict-rules": "^0.12.0",
"phpstan/phpstan-webmozart-assert": "0.12.12",
"phpunit/phpunit": "^9.5",
"polishsymfonycommunity/symfony-mocker-container": "^1.0",
"sensiolabs/security-checker": "^6.0",
"sylius-labs/coding-standard": "^4.0",
"symfony/browser-kit": "^4.4 || ^5.2",
Expand Down
8 changes: 8 additions & 0 deletions tests/Application/.env
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,11 @@ JWT_PASSPHRASE=acme_plugin_development
# Delivery is disabled by default via "null://localhost"
MAILER_URL=smtp://localhost
###< symfony/swiftmailer-bundle ###

###> symfony/messenger ###
# Choose one of the transports below
# MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages
# MESSENGER_TRANSPORT_DSN=doctrine://default
# MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages
MESSENGER_TRANSPORT_DSN=sync://
###< symfony/messenger ###
2 changes: 1 addition & 1 deletion tests/Application/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ protected function configureRoutes(RouteCollectionBuilder $routes): void

protected function getContainerBaseClass(): string
{
if ($this->isTestEnvironment()) {
if ($this->isTestEnvironment() && class_exists(MockerContainer::class)) {
return MockerContainer::class;
}

Expand Down
Empty file.
1 change: 1 addition & 0 deletions tests/Application/config/bundles.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,5 @@
Sylius\Bundle\ApiBundle\SyliusApiBundle::class => ['all' => true],
SyliusLabs\DoctrineMigrationsExtraBundle\SyliusLabsDoctrineMigrationsExtraBundle::class => ['all' => true],
Symplify\ConsoleColorDiff\ConsoleColorDiffBundle::class => ['dev' => true, 'test' => true],
BabDev\PagerfantaBundle\BabDevPagerfantaBundle::class => ['all' => true],
];
1 change: 0 additions & 1 deletion tests/Application/config/sylius/1.10/bundles.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php

return [
BabDev\PagerfantaBundle\BabDevPagerfantaBundle::class => ['all' => true],
SyliusLabs\Polyfill\Symfony\Security\Bundle\SyliusLabsPolyfillSymfonySecurityBundle::class => ['all' => true],
];
8 changes: 8 additions & 0 deletions tests/Application/config/sylius/1.11/bundles.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

declare(strict_types=1);

return [
SyliusLabs\Polyfill\Symfony\Security\Bundle\SyliusLabsPolyfillSymfonySecurityBundle::class => ['all' => true],
senghe marked this conversation as resolved.
Show resolved Hide resolved
Sylius\Calendar\SyliusCalendarBundle::class => ['all' => true],
];
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
jms_serializer:
visitors:
json_serialization:
options:
- JSON_PRETTY_PRINT
- JSON_UNESCAPED_SLASHES
- JSON_PRESERVE_ZERO_FRACTION
json_deserialization:
options:
- JSON_PRETTY_PRINT
- JSON_UNESCAPED_SLASHES
- JSON_PRESERVE_ZERO_FRACTION
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
jms_serializer:
visitors:
xml_serialization:
format_output: '%kernel.debug%'
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
jms_serializer:
visitors:
json_serialization:
options:
- JSON_UNESCAPED_SLASHES
- JSON_PRESERVE_ZERO_FRACTION
json_deserialization:
options:
- JSON_UNESCAPED_SLASHES
- JSON_PRESERVE_ZERO_FRACTION
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ security:
target: sylius_admin_login
anonymous: true

oauth_token:
pattern: "%sylius.security.api_regex%/oauth/v2/token"
security: false

new_api_admin_user:
pattern: "%sylius.security.new_api_route%/admin-user-authentication-token"
provider: sylius_admin_user_provider
Expand Down Expand Up @@ -97,13 +93,6 @@ security:
authenticators:
- lexik_jwt_authentication.jwt_token_authenticator

api:
pattern: "%sylius.security.api_regex%/.*"
provider: sylius_admin_user_provider
fos_oauth: true
stateless: true
anonymous: true

shop:
switch_user: { role: ROLE_ALLOWED_TO_SWITCH }
context: shop
Expand Down
8 changes: 0 additions & 8 deletions tests/Application/config/sylius/1.8/bundles.php

This file was deleted.

2 changes: 0 additions & 2 deletions tests/Application/config/sylius/1.8/packages/_sylius.yaml

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion tests/Application/config/sylius/1.9/bundles.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php

return [
BabDev\PagerfantaBundle\BabDevPagerfantaBundle::class => ['all' => true],
SyliusLabs\Polyfill\Symfony\Security\Bundle\SyliusLabsPolyfillSymfonySecurityBundle::class => ['all' => true],
FOS\OAuthServerBundle\FOSOAuthServerBundle::class => ['all' => true],
Sylius\Bundle\AdminApiBundle\SyliusAdminApiBundle::class => ['all' => true],
Expand Down