Skip to content

Commit

Permalink
feature #170 Upgrade to Sylius 1.10 and Symfony >5.2 (Roshyo, Zales0123)
Browse files Browse the repository at this point in the history
This PR was merged into the 1.1-dev branch.

Discussion
----------

Provide support for Sylius 1.10 and Symfony 5.2 or later

Commits
-------

4cec413 Upgrade to Sylius 1.10 and Symfony >5.2
e49c0f6 Build application with Sylius 1.10 and PHP 8.0 in test env
90f8410 Update dev dependencies
3cf7e93 PR review fixes
  • Loading branch information
pamil authored Jul 29, 2021
2 parents 1aa5712 + 3cf7e93 commit da331b2
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 51 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [7.3, 7.4]
php: [7.4, 8.0]
symfony: [^4.4, ^5.2]
sylius: [~1.9.0]
sylius: [1.9.*, 1.10.*]
node: [10.x]
mysql: [5.7, 8.0]

exclude:
- # PHP 7.3 does not support "caching_sha2_password" authentication plugin which is a default one in MySQL 8.0
php: 7.3
mysql: 8.0
-
php: 8.0
sylius: 1.9.*

env:
APP_ENV: test
Expand Down
2 changes: 1 addition & 1 deletion behat.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ default:
extensions:
DMore\ChromeExtension\Behat\ServiceContainer\ChromeExtension: ~

Lakion\Behat\MinkDebugExtension:
FriendsOfBehat\MinkDebugExtension\ServiceContainer\MinkDebugExtension:
directory: etc/build
clean_start: false
screenshot: true
Expand Down
26 changes: 13 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,29 @@
}
],
"require": {
"php": "^7.3",
"php": "^7.4 || ^8.0",

"sylius/sylius": "~1.9.0",
"friendsofsymfony/jsrouting-bundle": "^2.2",
"friendsofsymfony/oauth-server-bundle": ">2.0.0-alpha.0 ^2.0@dev"
"sylius/sylius": "1.9.*",
"friendsofsymfony/jsrouting-bundle": "^2.2"
},
"require-dev": {
"behat/behat": "^3.4",
"behat/mink-selenium2-driver": "^1.3",
"behat/behat": "^3.6",
"behat/mink-selenium2-driver": "^1.4",
"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.3",
"friends-of-behat/mink-extension": "^2.3",
"friends-of-behat/mink-extension": "^2.5",
"friends-of-behat/page-object-extension": "^0.3",
"friends-of-behat/suite-settings-extension": "^1.0",
"friends-of-behat/symfony-extension": "^2.0",
"friends-of-behat/variadic-extension": "^1.1",
"lakion/mink-debug-extension": "^1.2.3",
"friends-of-behat/symfony-extension": "^2.1",
"friends-of-behat/variadic-extension": "^1.3",
"friends-of-behat/mink-debug-extension": "^2.0",
"friendsofsymfony/oauth-server-bundle": "^1.6 || >2.0.0-alpha.0 ^2.0@dev",
"phpspec/phpspec": "^7.0",
"phpstan/phpstan": "0.12.29",
"phpstan/phpstan-webmozart-assert": "0.12.6",
"phpunit/phpunit": "^6.5",
"phpstan/phpstan": "0.12.84",
"phpstan/phpstan-webmozart-assert": "0.12.12",
"phpunit/phpunit": "^9.5",
"se/selenium-server-standalone": "^2.52",
"sylius-labs/coding-standard": "^3.0",
"symfony/debug-bundle": "^4.4 || ^5.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ protected function getNamespacesOfMigrationsExecutedBefore(): array
{
return [
'Sylius\Bundle\CoreBundle\Migrations',
'Sylius\Bundle\AdminApiBundle\Migrations',
];
}
}
2 changes: 0 additions & 2 deletions tests/Application/config/bundles.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@
Symfony\Bundle\WebServerBundle\WebServerBundle::class => ['all' => true],
Sylius\Bundle\AdminBundle\SyliusAdminBundle::class => ['all' => true],
Sylius\Bundle\ShopBundle\SyliusShopBundle::class => ['all' => true],
FOS\OAuthServerBundle\FOSOAuthServerBundle::class => ['all' => true],
Sylius\Bundle\AdminApiBundle\SyliusAdminApiBundle::class => ['all' => true],
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true, 'test_cached' => true],
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true, 'test_cached' => true],
Sylius\AdminOrderCreationPlugin\SyliusAdminOrderCreationPlugin::class => ['all' => true],
Expand Down
1 change: 0 additions & 1 deletion tests/Application/config/packages/_sylius.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ imports:
- { resource: "@SyliusCoreBundle/Resources/config/app/config.yml" }

- { resource: "@SyliusAdminBundle/Resources/config/app/config.yml" }
- { resource: "@SyliusAdminApiBundle/Resources/config/app/config.yml" }

- { resource: "@SyliusShopBundle/Resources/config/app/config.yml" }

Expand Down
16 changes: 0 additions & 16 deletions tests/Application/config/packages/security.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
parameters:
sylius.security.api_regex: "^/api"

security:
providers:
sylius_admin_user_provider:
Expand Down Expand Up @@ -43,17 +40,6 @@ security:
target: sylius_admin_login
anonymous: true

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

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

new_api_admin_user:
pattern: "%sylius.security.new_api_admin_regex%/.*"
provider: sylius_api_admin_user_provider
Expand Down Expand Up @@ -125,14 +111,12 @@ security:
- { 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 }
Expand Down
9 changes: 0 additions & 9 deletions tests/Application/config/packages/security_checker.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions tests/Application/config/routes/sylius_admin_api.yaml

This file was deleted.

0 comments on commit da331b2

Please sign in to comment.