Skip to content

Commit

Permalink
feature #224 Add support for Sylius 1.10 + require PHP ^7.4 || ^8.0 (…
Browse files Browse the repository at this point in the history
…GSadee)

This PR was merged into the 1.0-dev branch.

Discussion
----------



Commits
-------

ffcade3 Drop support for PHP 7.3
6c84521 Add support for Sylius 1.10 without AdminApiBundle
e1164af Add support for PHP 8.0
d5f8c28 [Composer] Fix PHPStan dependencies
1a87a7c [Composer] Fix sylius/sylius dependency
a790506 Remove problematic ignored error from PHPStan
  • Loading branch information
AdamKasp authored Jun 2, 2021
2 parents 921609e + a790506 commit ef6ba98
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 45 deletions.
8 changes: 4 additions & 4 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.0, ~1.10.0@beta]
node: [10.x]
mysql: [5.7, 8.0]

exclude:
-
php: 7.3
mysql: 8.0
php: 8.0
sylius: ~1.9.0

env:
APP_ENV: test
Expand Down
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
"description": "Invoicing plugin for Sylius.",
"license": "MIT",
"require": {
"php": "^7.3",
"php": "^7.4 || ^8.0",
"knplabs/knp-snappy-bundle": "^1.8",
"ramsey/uuid": "^3.9",
"sylius/grid-bundle": "^1.7",
"sylius/resource-bundle": "^1.6",
"sylius/sylius": "^1.9",
"sylius/sylius": "^1.9.1 || ~1.10.0@beta",
"symfony/config": "^4.4 || ^5.2",
"symfony/dependency-injection": "^4.4 || ^5.2",
"symfony/form": "^4.4 || ^5.2",
Expand All @@ -32,15 +32,15 @@
"friends-of-behat/suite-settings-extension": "^1.0",
"friends-of-behat/symfony-extension": "^2.1",
"friends-of-behat/variadic-extension": "^1.3",
"friendsofsymfony/oauth-server-bundle": "^1.6 || >2.0.0-alpha.0 ^2.0@dev",
"friendsofsymfony/oauth-server-bundle": ">2.0.0-alpha.0 ^2.0@dev",
"matthiasnoback/symfony-config-test": "^4.0",
"matthiasnoback/symfony-dependency-injection-test": "^4.1",
"phpspec/phpspec": "^7.0",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "0.12.29",
"phpstan/phpstan-doctrine": "^0.12",
"phpstan/phpstan-symfony": "^0.12",
"phpstan/phpstan-webmozart-assert": "^0.12",
"phpstan/phpstan": "0.12.85",
"phpstan/phpstan-doctrine": "0.12.38",
"phpstan/phpstan-symfony": "0.12.32",
"phpstan/phpstan-webmozart-assert": "0.12.12",
"phpunit/phpunit": "^8.5",
"sylius-labs/coding-standard": "^3.2",
"symfony/browser-kit": "^4.4 || ^5.2",
Expand Down
1 change: 0 additions & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ parameters:

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\./'
- '/Cannot call method scalarNode\(\) on Symfony\\Component\\Config\\Definition\\Builder\\NodeParentInterface\|null\./'
- '/expects string, string\|null given\.$/'
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],
ApiPlatform\Core\Bridge\Symfony\Bundle\ApiPlatformBundle::class => ['all' => true],
Sylius\Bundle\ApiBundle\SyliusApiBundle::class => ['all' => true],
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true, 'test_cached' => 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
11 changes: 0 additions & 11 deletions tests/Application/config/packages/fos_rest.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions tests/Application/config/packages/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,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_admin_regex%/.*"
provider: sylius_api_admin_user_provider
Expand Down Expand Up @@ -74,13 +70,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 Expand Up @@ -122,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
3 changes: 0 additions & 3 deletions tests/Application/config/packages/test_cached/fos_rest.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 ef6ba98

Please sign in to comment.