diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cec60cf..47b617c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,19 +16,16 @@ jobs: tests: runs-on: ubuntu-18.04 - name: "PHP ${{ matrix.php }}, MySQL ${{ matrix.mysql }}" + name: "Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}" strategy: fail-fast: false matrix: - php: [8.0, 7.4] - 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"] + symfony: ["5.4.*"] + sylius: ["^1.11.2"] + node: ["14.x"] + mysql: ["8.0"] env: APP_ENV: test @@ -94,6 +91,18 @@ jobs: restore-keys: | ${{ runner.os }}-php-${{ matrix.php }}-composer- + - + name: Restrict Symfony version + if: matrix.symfony != '' + run: | + composer global require --no-progress --no-scripts --no-plugins "symfony/flex:^1.10" + composer config extra.symfony.require "${{ matrix.symfony }}" + + - + name: Restrict Sylius version + if: matrix.sylius != '' + run: composer require "sylius/sylius:${{ matrix.sylius }}" --no-update --no-scripts --no-interaction + - name: Install PHP dependencies run: composer install --no-interaction diff --git a/.gitignore b/.gitignore index f486a1f..29046b9 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,7 @@ /behat.yml /phpspec.yml /phpunit.xml + +# Symfony CLI https://symfony.com/doc/current/setup/symfony_server.html#different-php-settings-per-project +/.php-version +/php.ini diff --git a/composer.json b/composer.json index 6766efc..bee9255 100644 --- a/composer.json +++ b/composer.json @@ -1,12 +1,15 @@ { "name": "webgriffe/sylius-table-rate-shipping-plugin", "type": "sylius-plugin", - "keywords": ["sylius", "sylius-plugin"], "description": "Provides table rate shipping calculator.", + "keywords": [ + "sylius", + "sylius-plugin" + ], "license": "MIT", "require": { - "php": "^7.4 || ^8.0", - "sylius/sylius": "~1.9.0 || ~1.10.0@beta" + "php": "^8.0", + "sylius/sylius": "^1.11" }, "require-dev": { "behat/behat": "^3.6.1", @@ -24,19 +27,33 @@ "friendsofsymfony/oauth-server-bundle": "^1.6 || >2.0.0-alpha.0 ^2.0@dev", "phpspec/phpspec": "^7.0", "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "0.12.85", + "phpstan/phpstan": "0.12.99", "phpstan/phpstan-doctrine": "0.12.33", "phpstan/phpstan-strict-rules": "^0.12.0", "phpstan/phpstan-webmozart-assert": "0.12.12", "phpunit/phpunit": "^9.5", "sensiolabs/security-checker": "^6.0", "sylius-labs/coding-standard": "^4.0", - "symfony/browser-kit": "^4.4 || ^5.2", - "symfony/debug-bundle": "^4.4 || ^5.2", - "symfony/dotenv": "^4.4 || ^5.2", - "symfony/intl": "^4.4 || ^5.2", - "symfony/web-profiler-bundle": "^4.4 || ^5.2", - "vimeo/psalm": "4.7.1" + "symfony/browser-kit": "^5.4", + "symfony/debug-bundle": "^5.4", + "symfony/dotenv": "^5.4", + "symfony/intl": "^5.4", + "symfony/web-profiler-bundle": "^5.4", + "vimeo/psalm": "4.7.1", + "polishsymfonycommunity/symfony-mocker-container": "^1.0" + }, + "config": { + "sort-packages": true, + "allow-plugins": { + "symfony/thanks": true, + "dealerdirect/phpcodesniffer-composer-installer": true, + "phpstan/extension-installer": true + } + }, + "extra": { + "branch-alias": { + "dev-master": "1.11-dev" + } }, "autoload": { "psr-4": { @@ -45,15 +62,9 @@ } }, "autoload-dev": { - "classmap": ["tests/Application/Kernel.php"] - }, - "extra": { - "branch-alias": { - "dev-master": "0.x-dev" - } - }, - "config": { - "sort-packages": true + "classmap": [ + "tests/Application/Kernel.php" + ] }, "scripts": { "post-install-cmd": [ diff --git a/ecs.php b/ecs.php new file mode 100644 index 0000000..bf40cc9 --- /dev/null +++ b/ecs.php @@ -0,0 +1,14 @@ +import('vendor/sylius-labs/coding-standard/ecs.php'); + + $containerConfigurator->parameters()->set(Option::SKIP, [ + VisibilityRequiredFixer::class => ['*Spec.php'], + ]); +}; diff --git a/src/Calculator/TableRateShippingCalculator.php b/src/Calculator/TableRateShippingCalculator.php index 74560a4..08603b4 100644 --- a/src/Calculator/TableRateShippingCalculator.php +++ b/src/Calculator/TableRateShippingCalculator.php @@ -15,12 +15,8 @@ final class TableRateShippingCalculator implements CalculatorInterface { public const TYPE = 'table_rate'; - /** @var TableRateResolverInterface */ - private $tableRateResolver; - - public function __construct(TableRateResolverInterface $tableRateResolver) + public function __construct(private TableRateResolverInterface $tableRateResolver) { - $this->tableRateResolver = $tableRateResolver; } public function calculate(BaseShipmentInterface $shipment, array $configuration): int diff --git a/src/Checker/TableRateShippingMethodEligibilityChecker.php b/src/Checker/TableRateShippingMethodEligibilityChecker.php index 0cdc50d..79c5964 100644 --- a/src/Checker/TableRateShippingMethodEligibilityChecker.php +++ b/src/Checker/TableRateShippingMethodEligibilityChecker.php @@ -15,18 +15,10 @@ final class TableRateShippingMethodEligibilityChecker implements ShippingMethodEligibilityCheckerInterface { - /** @var ShippingMethodEligibilityCheckerInterface */ - private $eligibilityChecker; - - /** @var TableRateResolverInterface */ - private $tableRateResolver; - public function __construct( - ShippingMethodEligibilityCheckerInterface $eligibilityChecker, - TableRateResolverInterface $tableRateResolver + private ShippingMethodEligibilityCheckerInterface $eligibilityChecker, + private TableRateResolverInterface $tableRateResolver ) { - $this->eligibilityChecker = $eligibilityChecker; - $this->tableRateResolver = $tableRateResolver; } public function isEligible( diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index 7233c9e..dc369a0 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -11,7 +11,7 @@ final class Configuration implements ConfigurationInterface { public function getConfigTreeBuilder(): TreeBuilder { - $treeBuilder = new TreeBuilder('acme_sylius_example_plugin'); + $treeBuilder = new TreeBuilder('webgriffe_sylius_table_rate_shipping_plugin'); return $treeBuilder; } diff --git a/src/DependencyInjection/WebgriffeSyliusTableRateShippingExtension.php b/src/DependencyInjection/WebgriffeSyliusTableRateShippingExtension.php index 11df776..5e34556 100644 --- a/src/DependencyInjection/WebgriffeSyliusTableRateShippingExtension.php +++ b/src/DependencyInjection/WebgriffeSyliusTableRateShippingExtension.php @@ -11,9 +11,6 @@ final class WebgriffeSyliusTableRateShippingExtension extends Extension { - /** - * {@inheritdoc} - */ public function load(array $config, ContainerBuilder $container): void { $this->processConfiguration($this->getConfiguration([], $container), $config); diff --git a/src/EventSubscriber/TableRateDeleteSubscriber.php b/src/EventSubscriber/TableRateDeleteSubscriber.php index fa0a11e..9c72fe9 100644 --- a/src/EventSubscriber/TableRateDeleteSubscriber.php +++ b/src/EventSubscriber/TableRateDeleteSubscriber.php @@ -14,17 +14,10 @@ class TableRateDeleteSubscriber implements EventSubscriberInterface { - /** @var ShippingMethodRepositoryInterface */ - private $shippingMethodRepository; - - public function __construct(ShippingMethodRepositoryInterface $shippingMethodRepository) + public function __construct(private ShippingMethodRepositoryInterface $shippingMethodRepository) { - $this->shippingMethodRepository = $shippingMethodRepository; } - /** - * {@inheritdoc} - */ public static function getSubscribedEvents(): array { return ['webgriffe.shipping_table_rate.pre_delete' => 'onTableRatePreDelete']; diff --git a/src/Form/EventSubscriber/AddCurrencySubscriber.php b/src/Form/EventSubscriber/AddCurrencySubscriber.php index c484745..fe9be17 100644 --- a/src/Form/EventSubscriber/AddCurrencySubscriber.php +++ b/src/Form/EventSubscriber/AddCurrencySubscriber.php @@ -12,9 +12,6 @@ class AddCurrencySubscriber implements EventSubscriberInterface { - /** - * {@inheritdoc} - */ public static function getSubscribedEvents(): array { return [FormEvents::PRE_SET_DATA => 'preSetData']; diff --git a/src/Resolver/TableRateResolver.php b/src/Resolver/TableRateResolver.php index e9455f3..ac719e9 100644 --- a/src/Resolver/TableRateResolver.php +++ b/src/Resolver/TableRateResolver.php @@ -13,12 +13,8 @@ final class TableRateResolver implements TableRateResolverInterface { - /** @var RepositoryInterface */ - private $tableRateRepository; - - public function __construct(RepositoryInterface $tableRateRepository) + public function __construct(private RepositoryInterface $tableRateRepository) { - $this->tableRateRepository = $tableRateRepository; } public function resolve(ShipmentInterface $shipment, array $calculatorConfig): ShippingTableRate diff --git a/tests/Application/.env b/tests/Application/.env index 904e3a8..bdb3c6a 100644 --- a/tests/Application/.env +++ b/tests/Application/.env @@ -27,3 +27,10 @@ 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 +###< symfony/messenger ### diff --git a/tests/Application/.env.test b/tests/Application/.env.test index 4a4cebe..f6bd1d2 100644 --- a/tests/Application/.env.test +++ b/tests/Application/.env.test @@ -1,5 +1,3 @@ APP_SECRET='ch4mb3r0f5ecr3ts' KERNEL_CLASS='Tests\Webgriffe\SyliusTableRateShippingPlugin\Application\Kernel' -APP_ENV=test -DATABASE_URL=sqlite:///%kernel.project_dir%/var/%kernel.environment%_db.sql diff --git a/tests/Application/.eslintrc.js b/tests/Application/.eslintrc.js index d379571..92c4cee 100644 --- a/tests/Application/.eslintrc.js +++ b/tests/Application/.eslintrc.js @@ -1,15 +1,4 @@ module.exports = { - extends: 'airbnb-base', - rules: { - 'function-paren-newline': ['error', 'consistent'], - 'max-len': ['warn', 120, 2, { - ignoreUrls: true, - ignoreComments: false, - ignoreRegExpLiterals: true, - ignoreStrings: true, - ignoreTemplateLiterals: true, - }], - }, extends: 'airbnb-base', env: { node: true, diff --git a/tests/Application/Kernel.php b/tests/Application/Kernel.php index 9f3cace..bfc1b08 100644 --- a/tests/Application/Kernel.php +++ b/tests/Application/Kernel.php @@ -67,7 +67,7 @@ protected function configureRoutes(RouteCollectionBuilder $routes): void protected function getContainerBaseClass(): string { - if ($this->isTestEnvironment()) { + if ($this->isTestEnvironment() && class_exists(MockerContainer::class)) { return MockerContainer::class; } diff --git a/tests/Application/var/.gitignore b/tests/Application/config/api_platform/.gitignore similarity index 100% rename from tests/Application/var/.gitignore rename to tests/Application/config/api_platform/.gitignore diff --git a/tests/Application/config/bundles.php b/tests/Application/config/bundles.php old mode 100755 new mode 100644 index 35ecbda..5a05b41 --- a/tests/Application/config/bundles.php +++ b/tests/Application/config/bundles.php @@ -45,6 +45,7 @@ Sylius\Bundle\ThemeBundle\SyliusThemeBundle::class => ['all' => true], Sylius\Bundle\AdminBundle\SyliusAdminBundle::class => ['all' => true], Sylius\Bundle\ShopBundle\SyliusShopBundle::class => ['all' => true], + Webgriffe\SyliusTableRateShippingPlugin\WebgriffeSyliusTableRateShippingPlugin::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], FriendsOfBehat\SymfonyExtension\Bundle\FriendsOfBehatSymfonyExtensionBundle::class => ['test' => true, 'test_cached' => true], @@ -53,6 +54,7 @@ Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle::class => ['all' => true], Sylius\Bundle\ApiBundle\SyliusApiBundle::class => ['all' => true], SyliusLabs\DoctrineMigrationsExtraBundle\SyliusLabsDoctrineMigrationsExtraBundle::class => ['all' => true], - - Webgriffe\SyliusTableRateShippingPlugin\WebgriffeSyliusTableRateShippingPlugin::class => ['all' => true], + BabDev\PagerfantaBundle\BabDevPagerfantaBundle::class => ['all' => true], + SyliusLabs\Polyfill\Symfony\Security\Bundle\SyliusLabsPolyfillSymfonySecurityBundle::class => ['all' => true], + Sylius\Calendar\SyliusCalendarBundle::class => ['all' => true], ]; diff --git a/tests/Application/config/packages/_sylius.yaml b/tests/Application/config/packages/_sylius.yaml old mode 100755 new mode 100644 index 7532b01..18acdd4 --- a/tests/Application/config/packages/_sylius.yaml +++ b/tests/Application/config/packages/_sylius.yaml @@ -13,3 +13,6 @@ parameters: sylius_shop: product_grid: include_all_descendants: true + +sylius_api: + enabled: true diff --git a/tests/Application/config/packages/api_platform.yaml b/tests/Application/config/packages/api_platform.yaml new file mode 100644 index 0000000..b428304 --- /dev/null +++ b/tests/Application/config/packages/api_platform.yaml @@ -0,0 +1,10 @@ +api_platform: + mapping: + paths: + - '%kernel.project_dir%/../../vendor/sylius/sylius/src/Sylius/Bundle/ApiBundle/Resources/config/api_resources' + - '%kernel.project_dir%/config/api_platform' + - '%kernel.project_dir%/src/Entity' + patch_formats: + json: ['application/merge-patch+json'] + swagger: + versions: [3] diff --git a/tests/Application/config/packages/dev/framework.yaml b/tests/Application/config/packages/dev/framework.yaml old mode 100755 new mode 100644 diff --git a/tests/Application/config/sylius/1.10/packages/dev/jms_serializer.yaml b/tests/Application/config/packages/dev/jms_serializer.yaml similarity index 100% rename from tests/Application/config/sylius/1.10/packages/dev/jms_serializer.yaml rename to tests/Application/config/packages/dev/jms_serializer.yaml diff --git a/tests/Application/config/packages/dev/monolog.yaml b/tests/Application/config/packages/dev/monolog.yaml old mode 100755 new mode 100644 diff --git a/tests/Application/config/packages/dev/routing.yaml b/tests/Application/config/packages/dev/routing.yaml old mode 100755 new mode 100644 diff --git a/tests/Application/config/packages/dev/swiftmailer.yaml b/tests/Application/config/packages/dev/swiftmailer.yaml old mode 100755 new mode 100644 diff --git a/tests/Application/config/packages/dev/web_profiler.yaml b/tests/Application/config/packages/dev/web_profiler.yaml old mode 100755 new mode 100644 diff --git a/tests/Application/config/packages/doctrine.yaml b/tests/Application/config/packages/doctrine.yaml old mode 100755 new mode 100644 diff --git a/tests/Application/config/packages/doctrine_migrations.yaml b/tests/Application/config/packages/doctrine_migrations.yaml old mode 100755 new mode 100644 diff --git a/tests/Application/config/packages/fos_rest.yaml b/tests/Application/config/packages/fos_rest.yaml old mode 100755 new mode 100644 index a72eef7..eaebb27 --- a/tests/Application/config/packages/fos_rest.yaml +++ b/tests/Application/config/packages/fos_rest.yaml @@ -7,5 +7,5 @@ fos_rest: empty_content: 204 format_listener: rules: - - { path: '^/api/.*', priorities: ['json', 'xml'], fallback_format: json, prefer_extension: true } + - { path: '^/api/v1/.*', priorities: ['json', 'xml'], fallback_format: json, prefer_extension: true } - { path: '^/', stop: true } diff --git a/tests/Application/config/packages/framework.yaml b/tests/Application/config/packages/framework.yaml index 9b44501..8be076b 100644 --- a/tests/Application/config/packages/framework.yaml +++ b/tests/Application/config/packages/framework.yaml @@ -4,3 +4,6 @@ framework: csrf_protection: true session: handler_id: ~ + serializer: + mapping: + paths: [ '%kernel.project_dir%/config/serialization' ] diff --git a/tests/Application/config/sylius/1.10/packages/jms_serializer.yaml b/tests/Application/config/packages/jms_serializer.yaml similarity index 100% rename from tests/Application/config/sylius/1.10/packages/jms_serializer.yaml rename to tests/Application/config/packages/jms_serializer.yaml diff --git a/tests/Application/config/packages/liip_imagine.yaml b/tests/Application/config/packages/liip_imagine.yaml old mode 100755 new mode 100644 diff --git a/tests/Application/config/packages/prod/doctrine.yaml b/tests/Application/config/packages/prod/doctrine.yaml old mode 100755 new mode 100644 diff --git a/tests/Application/config/sylius/1.10/packages/prod/jms_serializer.yaml b/tests/Application/config/packages/prod/jms_serializer.yaml similarity index 100% rename from tests/Application/config/sylius/1.10/packages/prod/jms_serializer.yaml rename to tests/Application/config/packages/prod/jms_serializer.yaml diff --git a/tests/Application/config/packages/prod/monolog.yaml b/tests/Application/config/packages/prod/monolog.yaml old mode 100755 new mode 100644 diff --git a/tests/Application/config/packages/routing.yaml b/tests/Application/config/packages/routing.yaml old mode 100755 new mode 100644 diff --git a/tests/Application/config/sylius/1.10/packages/security.yaml b/tests/Application/config/packages/security.yaml similarity index 74% rename from tests/Application/config/sylius/1.10/packages/security.yaml rename to tests/Application/config/packages/security.yaml index 1062810..5101dde 100644 --- a/tests/Application/config/sylius/1.10/packages/security.yaml +++ b/tests/Application/config/packages/security.yaml @@ -1,14 +1,3 @@ -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: @@ -20,9 +9,6 @@ security: 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 @@ -55,12 +41,12 @@ security: anonymous: true new_api_admin_user: - pattern: "%sylius.security.new_api_route%/admin-user-authentication-token" - provider: sylius_admin_user_provider + pattern: "%sylius.security.new_api_admin_regex%/.*" + provider: sylius_api_admin_user_provider stateless: true anonymous: true json_login: - check_path: "%sylius.security.new_api_route%/admin-user-authentication-token" + check_path: "%sylius.security.new_api_admin_route%/authentication-token" username_path: email password_path: password success_handler: lexik_jwt_authentication.handler.authentication_success @@ -70,12 +56,12 @@ security: - 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 + pattern: "%sylius.security.new_api_shop_regex%/.*" + provider: sylius_api_shop_user_provider stateless: true anonymous: true json_login: - check_path: "%sylius.security.new_api_route%/shop-user-authentication-token" + check_path: "%sylius.security.new_api_shop_route%/authentication-token" username_path: email password_path: password success_handler: lexik_jwt_authentication.handler.authentication_success @@ -84,15 +70,6 @@ security: 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 @@ -124,7 +101,11 @@ security: anonymous: true dev: - pattern: ^/(_(profiler|wdt)|css|images|js)/ + pattern: ^/(_(profiler|wdt)|css|images|js)/ + security: false + + image_resolver: + pattern: ^/media/cache/resolve security: false access_control: @@ -134,15 +115,16 @@ 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 } + - { path: "%sylius.security.new_api_admin_route%/authentication-token", role: IS_AUTHENTICATED_ANONYMOUSLY } + - { path: "%sylius.security.new_api_user_account_regex%/.*", role: ROLE_USER } + - { path: "%sylius.security.new_api_shop_route%/authentication-token", role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: "%sylius.security.new_api_shop_regex%/.*", role: IS_AUTHENTICATED_ANONYMOUSLY } diff --git a/tests/Application/config/packages/security_checker.yaml b/tests/Application/config/packages/security_checker.yaml old mode 100755 new mode 100644 diff --git a/tests/Application/config/packages/staging/monolog.yaml b/tests/Application/config/packages/staging/monolog.yaml old mode 100755 new mode 100644 diff --git a/tests/Application/config/packages/staging/swiftmailer.yaml b/tests/Application/config/packages/staging/swiftmailer.yaml old mode 100755 new mode 100644 diff --git a/tests/Application/config/packages/stof_doctrine_extensions.yaml b/tests/Application/config/packages/stof_doctrine_extensions.yaml old mode 100755 new mode 100644 diff --git a/tests/Application/config/packages/swiftmailer.yaml b/tests/Application/config/packages/swiftmailer.yaml old mode 100755 new mode 100644 diff --git a/tests/Application/config/packages/test/framework.yaml b/tests/Application/config/packages/test/framework.yaml old mode 100755 new mode 100644 diff --git a/tests/Application/config/packages/test/monolog.yaml b/tests/Application/config/packages/test/monolog.yaml old mode 100755 new mode 100644 diff --git a/tests/Application/config/packages/test/swiftmailer.yaml b/tests/Application/config/packages/test/swiftmailer.yaml old mode 100755 new mode 100644 diff --git a/tests/Application/config/packages/test/sylius_theme.yaml b/tests/Application/config/packages/test/sylius_theme.yaml old mode 100755 new mode 100644 diff --git a/tests/Application/config/packages/test/web_profiler.yaml b/tests/Application/config/packages/test/web_profiler.yaml old mode 100755 new mode 100644 diff --git a/tests/Application/config/packages/test_cached/doctrine.yaml b/tests/Application/config/packages/test_cached/doctrine.yaml old mode 100755 new mode 100644 diff --git a/tests/Application/config/packages/test_cached/fos_rest.yaml b/tests/Application/config/packages/test_cached/fos_rest.yaml old mode 100755 new mode 100644 diff --git a/tests/Application/config/packages/test_cached/framework.yaml b/tests/Application/config/packages/test_cached/framework.yaml old mode 100755 new mode 100644 diff --git a/tests/Application/config/packages/test_cached/monolog.yaml b/tests/Application/config/packages/test_cached/monolog.yaml old mode 100755 new mode 100644 diff --git a/tests/Application/config/packages/test_cached/swiftmailer.yaml b/tests/Application/config/packages/test_cached/swiftmailer.yaml old mode 100755 new mode 100644 diff --git a/tests/Application/config/packages/test_cached/sylius_channel.yaml b/tests/Application/config/packages/test_cached/sylius_channel.yaml old mode 100755 new mode 100644 diff --git a/tests/Application/config/packages/test_cached/sylius_theme.yaml b/tests/Application/config/packages/test_cached/sylius_theme.yaml old mode 100755 new mode 100644 diff --git a/tests/Application/config/packages/test_cached/twig.yaml b/tests/Application/config/packages/test_cached/twig.yaml old mode 100755 new mode 100644 diff --git a/tests/Application/config/packages/translation.yaml b/tests/Application/config/packages/translation.yaml old mode 100755 new mode 100644 diff --git a/tests/Application/config/packages/twig.yaml b/tests/Application/config/packages/twig.yaml old mode 100755 new mode 100644 diff --git a/tests/Application/config/packages/validator.yaml b/tests/Application/config/packages/validator.yaml old mode 100755 new mode 100644 diff --git a/tests/Application/config/routes.yaml b/tests/Application/config/routes.yaml old mode 100755 new mode 100644 diff --git a/tests/Application/config/routes/dev/web_profiler.yaml b/tests/Application/config/routes/dev/web_profiler.yaml old mode 100755 new mode 100644 diff --git a/tests/Application/config/routes/liip_imagine.yaml b/tests/Application/config/routes/liip_imagine.yaml old mode 100755 new mode 100644 diff --git a/tests/Application/config/routes/sylius_admin.yaml b/tests/Application/config/routes/sylius_admin.yaml old mode 100755 new mode 100644 diff --git a/tests/Application/config/routes/sylius_shop.yaml b/tests/Application/config/routes/sylius_shop.yaml old mode 100755 new mode 100644 diff --git a/tests/Application/config/.bundles.php.swp b/tests/Application/config/serialization/.gitignore similarity index 100% rename from tests/Application/config/.bundles.php.swp rename to tests/Application/config/serialization/.gitignore diff --git a/tests/Application/config/services.yaml b/tests/Application/config/services.yaml old mode 100755 new mode 100644 diff --git a/tests/Application/config/services_test.yaml b/tests/Application/config/services_test.yaml index f90fe42..9edf553 100644 --- a/tests/Application/config/services_test.yaml +++ b/tests/Application/config/services_test.yaml @@ -1,8 +1,8 @@ imports: - - { resource: "../../Behat/Resources/services.yml" } - - { resource: "../../../vendor/sylius/sylius/src/Sylius/Behat/Resources/config/services.xml" } + - { resource: "../../Behat/Resources/services.yml" } + - { resource: "../../../vendor/sylius/sylius/src/Sylius/Behat/Resources/config/services.xml" } # workaround needed for strange "test.client.history" problem # see https://github.com/FriendsOfBehat/SymfonyExtension/issues/88 services: - Symfony\Component\BrowserKit\AbstractBrowser: '@test.client' + Symfony\Component\BrowserKit\AbstractBrowser: '@test.client' diff --git a/tests/Application/config/sylius/1.10/bundles.php b/tests/Application/config/sylius/1.10/bundles.php deleted file mode 100644 index bd33f4a..0000000 --- a/tests/Application/config/sylius/1.10/bundles.php +++ /dev/null @@ -1,6 +0,0 @@ - ['all' => true], - SyliusLabs\Polyfill\Symfony\Security\Bundle\SyliusLabsPolyfillSymfonySecurityBundle::class => ['all' => true], -]; diff --git a/tests/Application/config/sylius/1.8/bundles.php b/tests/Application/config/sylius/1.8/bundles.php deleted file mode 100644 index c3c8ea4..0000000 --- a/tests/Application/config/sylius/1.8/bundles.php +++ /dev/null @@ -1,8 +0,0 @@ - ['all' => true], - WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle::class => ['all' => true], - FOS\OAuthServerBundle\FOSOAuthServerBundle::class => ['all' => true], - Sylius\Bundle\AdminApiBundle\SyliusAdminApiBundle::class => ['all' => true], -]; diff --git a/tests/Application/config/sylius/1.8/packages/_sylius.yaml b/tests/Application/config/sylius/1.8/packages/_sylius.yaml deleted file mode 100644 index 1674a97..0000000 --- a/tests/Application/config/sylius/1.8/packages/_sylius.yaml +++ /dev/null @@ -1,2 +0,0 @@ -imports: - - { resource: "@SyliusAdminApiBundle/Resources/config/app/config.yml" } diff --git a/tests/Application/config/sylius/1.8/packages/dev/jms_serializer.yaml b/tests/Application/config/sylius/1.8/packages/dev/jms_serializer.yaml deleted file mode 100644 index 353e460..0000000 --- a/tests/Application/config/sylius/1.8/packages/dev/jms_serializer.yaml +++ /dev/null @@ -1,7 +0,0 @@ -jms_serializer: - visitors: - json: - options: - - JSON_PRETTY_PRINT - - JSON_UNESCAPED_SLASHES - - JSON_PRESERVE_ZERO_FRACTION diff --git a/tests/Application/config/sylius/1.8/packages/jms_serializer.yaml b/tests/Application/config/sylius/1.8/packages/jms_serializer.yaml deleted file mode 100644 index 64dd8d1..0000000 --- a/tests/Application/config/sylius/1.8/packages/jms_serializer.yaml +++ /dev/null @@ -1,4 +0,0 @@ -jms_serializer: - visitors: - xml: - format_output: '%kernel.debug%' diff --git a/tests/Application/config/sylius/1.8/packages/prod/jms_serializer.yaml b/tests/Application/config/sylius/1.8/packages/prod/jms_serializer.yaml deleted file mode 100644 index bc97faf..0000000 --- a/tests/Application/config/sylius/1.8/packages/prod/jms_serializer.yaml +++ /dev/null @@ -1,6 +0,0 @@ -jms_serializer: - visitors: - json: - options: - - JSON_UNESCAPED_SLASHES - - JSON_PRESERVE_ZERO_FRACTION diff --git a/tests/Application/config/sylius/1.8/packages/security.yaml b/tests/Application/config/sylius/1.8/packages/security.yaml deleted file mode 100644 index 8161bda..0000000 --- a/tests/Application/config/sylius/1.8/packages/security.yaml +++ /dev/null @@ -1,159 +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 - - 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 - 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 - - 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 - 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.8/routes/dev/twig.yaml b/tests/Application/config/sylius/1.8/routes/dev/twig.yaml deleted file mode 100644 index f4ee839..0000000 --- a/tests/Application/config/sylius/1.8/routes/dev/twig.yaml +++ /dev/null @@ -1,3 +0,0 @@ -_errors: - resource: '@TwigBundle/Resources/config/routing/errors.xml' - prefix: /_error diff --git a/tests/Application/config/sylius/1.8/routes/sylius_admin_api.yaml b/tests/Application/config/sylius/1.8/routes/sylius_admin_api.yaml deleted file mode 100644 index 80aed45..0000000 --- a/tests/Application/config/sylius/1.8/routes/sylius_admin_api.yaml +++ /dev/null @@ -1,3 +0,0 @@ -sylius_admin_api: - resource: "@SyliusAdminApiBundle/Resources/config/routing.yml" - prefix: /api diff --git a/tests/Application/config/sylius/1.9/bundles.php b/tests/Application/config/sylius/1.9/bundles.php deleted file mode 100644 index 66f523d..0000000 --- a/tests/Application/config/sylius/1.9/bundles.php +++ /dev/null @@ -1,8 +0,0 @@ - ['all' => true], - SyliusLabs\Polyfill\Symfony\Security\Bundle\SyliusLabsPolyfillSymfonySecurityBundle::class => ['all' => true], - FOS\OAuthServerBundle\FOSOAuthServerBundle::class => ['all' => true], - Sylius\Bundle\AdminApiBundle\SyliusAdminApiBundle::class => ['all' => true], -]; diff --git a/tests/Application/config/sylius/1.9/packages/_sylius.yaml b/tests/Application/config/sylius/1.9/packages/_sylius.yaml deleted file mode 100644 index 1674a97..0000000 --- a/tests/Application/config/sylius/1.9/packages/_sylius.yaml +++ /dev/null @@ -1,2 +0,0 @@ -imports: - - { resource: "@SyliusAdminApiBundle/Resources/config/app/config.yml" } diff --git a/tests/Application/config/sylius/1.9/packages/dev/jms_serializer.yaml b/tests/Application/config/sylius/1.9/packages/dev/jms_serializer.yaml deleted file mode 100644 index 2f32a9b..0000000 --- a/tests/Application/config/sylius/1.9/packages/dev/jms_serializer.yaml +++ /dev/null @@ -1,12 +0,0 @@ -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 diff --git a/tests/Application/config/sylius/1.9/packages/jms_serializer.yaml b/tests/Application/config/sylius/1.9/packages/jms_serializer.yaml deleted file mode 100644 index ed7bc61..0000000 --- a/tests/Application/config/sylius/1.9/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.9/packages/prod/jms_serializer.yaml b/tests/Application/config/sylius/1.9/packages/prod/jms_serializer.yaml deleted file mode 100644 index c288182..0000000 --- a/tests/Application/config/sylius/1.9/packages/prod/jms_serializer.yaml +++ /dev/null @@ -1,10 +0,0 @@ -jms_serializer: - visitors: - json_serialization: - options: - - JSON_UNESCAPED_SLASHES - - JSON_PRESERVE_ZERO_FRACTION - json_deserialization: - options: - - JSON_UNESCAPED_SLASHES - - JSON_PRESERVE_ZERO_FRACTION diff --git a/tests/Application/config/sylius/1.9/packages/security.yaml b/tests/Application/config/sylius/1.9/packages/security.yaml deleted file mode 100644 index 8161bda..0000000 --- a/tests/Application/config/sylius/1.9/packages/security.yaml +++ /dev/null @@ -1,159 +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 - - 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 - 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 - - 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 - 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.9/routes/sylius_admin_api.yaml b/tests/Application/config/sylius/1.9/routes/sylius_admin_api.yaml deleted file mode 100644 index 80aed45..0000000 --- a/tests/Application/config/sylius/1.9/routes/sylius_admin_api.yaml +++ /dev/null @@ -1,3 +0,0 @@ -sylius_admin_api: - resource: "@SyliusAdminApiBundle/Resources/config/routing.yml" - prefix: /api 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 index b59cf85..5920316 100644 --- a/tests/Application/gulpfile.babel.js +++ b/tests/Application/gulpfile.babel.js @@ -39,7 +39,7 @@ 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 })); + .pipe(chug({ args: config, tasks: 'build' })); }; buildShop.description = 'Build shop assets.'; diff --git a/tests/Application/package.json b/tests/Application/package.json index ab109d3..b27949d 100644 --- a/tests/Application/package.json +++ b/tests/Application/package.json @@ -5,7 +5,6 @@ "jquery": "^3.4.0", "jquery.dirtyforms": "^2.0.0", "lightbox2": "^2.9.0", - "npm": "^6.1.0", "semantic-ui-css": "^2.2.0", "slick-carousel": "^1.8.1" }, diff --git a/tests/Application/public/.htaccess b/tests/Application/public/.htaccess old mode 100755 new mode 100644 diff --git a/tests/Application/public/build/admin/entrypoints.json b/tests/Application/public/build/admin/entrypoints.json deleted file mode 100644 index 76d6083..0000000 --- a/tests/Application/public/build/admin/entrypoints.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "entrypoints": {} -} \ No newline at end of file diff --git a/tests/Application/public/build/admin/manifest.json b/tests/Application/public/build/admin/manifest.json deleted file mode 100644 index 9e26dfe..0000000 --- a/tests/Application/public/build/admin/manifest.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/tests/Application/public/build/shop/entrypoints.json b/tests/Application/public/build/shop/entrypoints.json deleted file mode 100644 index 76d6083..0000000 --- a/tests/Application/public/build/shop/entrypoints.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "entrypoints": {} -} \ No newline at end of file diff --git a/tests/Application/public/build/shop/manifest.json b/tests/Application/public/build/shop/manifest.json deleted file mode 100644 index 9e26dfe..0000000 --- a/tests/Application/public/build/shop/manifest.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/tests/Application/public/favicon.ico b/tests/Application/public/favicon.ico old mode 100755 new mode 100644 diff --git a/tests/Application/public/index.php b/tests/Application/public/index.php old mode 100755 new mode 100644 diff --git a/tests/Application/public/robots.txt b/tests/Application/public/robots.txt old mode 100755 new mode 100644 diff --git a/tests/Application/src/Entity/.gitignore b/tests/Application/src/Entity/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/tests/Behat/Context/Setup/ProductContext.php b/tests/Behat/Context/Setup/ProductContext.php index d14751a..d7cfd15 100644 --- a/tests/Behat/Context/Setup/ProductContext.php +++ b/tests/Behat/Context/Setup/ProductContext.php @@ -12,18 +12,10 @@ final class ProductContext implements Context { - /** @var ExampleFactoryInterface */ - private $productExampleFactory; - - /** @var RepositoryInterface */ - private $productRepository; - public function __construct( - ExampleFactoryInterface $productExampleFactory, - RepositoryInterface $productRepository + private ExampleFactoryInterface $productExampleFactory, + private RepositoryInterface $productRepository ) { - $this->productExampleFactory = $productExampleFactory; - $this->productRepository = $productRepository; } /** diff --git a/tests/Behat/Context/Setup/ShippingTableRateContext.php b/tests/Behat/Context/Setup/ShippingTableRateContext.php index 6138b4d..e51873f 100644 --- a/tests/Behat/Context/Setup/ShippingTableRateContext.php +++ b/tests/Behat/Context/Setup/ShippingTableRateContext.php @@ -21,38 +21,14 @@ final class ShippingTableRateContext implements Context { - /** @var FactoryInterface */ - private $shippingTableRateFactory; - - /** @var RepositoryInterface */ - private $shippingTableRateRepository; - - /** @var ObjectManager */ - private $shippingTableRateManager; - - /** @var SharedStorageInterface */ - private $sharedStorage; - - /** @var ExampleFactoryInterface */ - private $shippingMethodExampleFactory; - - /** @var RepositoryInterface */ - private $shippingMethodRepository; - public function __construct( - FactoryInterface $shippingTableRateFactory, - RepositoryInterface $shippingTableRateRepository, - ObjectManager $shippingTableRateManager, - SharedStorageInterface $sharedStorage, - ExampleFactoryInterface $shippingMethodExampleFactory, - RepositoryInterface $shippingMethodRepository + private FactoryInterface $shippingTableRateFactory, + private RepositoryInterface $shippingTableRateRepository, + private ObjectManager $shippingTableRateManager, + private SharedStorageInterface $sharedStorage, + private ExampleFactoryInterface $shippingMethodExampleFactory, + private RepositoryInterface $shippingMethodRepository ) { - $this->shippingTableRateFactory = $shippingTableRateFactory; - $this->shippingTableRateRepository = $shippingTableRateRepository; - $this->shippingTableRateManager = $shippingTableRateManager; - $this->sharedStorage = $sharedStorage; - $this->shippingMethodExampleFactory = $shippingMethodExampleFactory; - $this->shippingMethodRepository = $shippingMethodRepository; } /** diff --git a/tests/Behat/Context/Ui/ManagingShippingMethodsWithTableRateContext.php b/tests/Behat/Context/Ui/ManagingShippingMethodsWithTableRateContext.php index a0ea4c0..4a059d1 100644 --- a/tests/Behat/Context/Ui/ManagingShippingMethodsWithTableRateContext.php +++ b/tests/Behat/Context/Ui/ManagingShippingMethodsWithTableRateContext.php @@ -13,12 +13,8 @@ final class ManagingShippingMethodsWithTableRateContext implements Context { - /** @var UpdatePageInterface */ - private $updatePage; - - public function __construct(UpdatePageInterface $updatePage) + public function __construct(private UpdatePageInterface $updatePage) { - $this->updatePage = $updatePage; } /** diff --git a/tests/Behat/Context/Ui/ManagingTableRatesContext.php b/tests/Behat/Context/Ui/ManagingTableRatesContext.php index c48e3aa..fc5fda8 100644 --- a/tests/Behat/Context/Ui/ManagingTableRatesContext.php +++ b/tests/Behat/Context/Ui/ManagingTableRatesContext.php @@ -5,6 +5,7 @@ namespace Tests\Webgriffe\SyliusTableRateShippingPlugin\Behat\Context\Ui; use Behat\Behat\Context\Context; +use FriendsOfBehat\PageObjectExtension\Page\UnexpectedPageException; use Sylius\Component\Core\Formatter\StringInflector; use Sylius\Component\Core\Model\ShippingMethod; use Sylius\Component\Currency\Model\CurrencyInterface; @@ -16,29 +17,17 @@ class ManagingTableRatesContext implements Context { - /** @var IndexPageInterface */ - private $indexPage; - - /** @var CreatePageInterface */ - private $createPage; - - /** @var UpdatePageInterface */ - private $updatePage; - public function __construct( - IndexPageInterface $indexPage, - CreatePageInterface $createPage, - UpdatePageInterface $updatePage + private IndexPageInterface $indexPage, + private CreatePageInterface $createPage, + private UpdatePageInterface $updatePage ) { - $this->indexPage = $indexPage; - $this->createPage = $createPage; - $this->updatePage = $updatePage; } /** * @When I am browsing the list of table rates * - * @throws \Sylius\Behat\Page\UnexpectedPageException + * @throws UnexpectedPageException */ public function iAmBrowsingTheListOfTableRates(): void { diff --git a/tests/Behat/Context/Ui/ShippingTableRateContext.php b/tests/Behat/Context/Ui/ShippingTableRateContext.php index b453d75..ee1d67e 100644 --- a/tests/Behat/Context/Ui/ShippingTableRateContext.php +++ b/tests/Behat/Context/Ui/ShippingTableRateContext.php @@ -13,23 +13,11 @@ final class ShippingTableRateContext implements Context { - /** @var AddressFactoryInterface */ - private $addressFactory; - - /** @var AddressPageInterface */ - private $addressPage; - - /** @var SelectShippingPageInterface */ - private $selectShippingPage; - public function __construct( - AddressFactoryInterface $addressFactory, - AddressPageInterface $addressPage, - SelectShippingPageInterface $selectShippingPage + private AddressFactoryInterface $addressFactory, + private AddressPageInterface $addressPage, + private SelectShippingPageInterface $selectShippingPage ) { - $this->addressFactory = $addressFactory; - $this->addressPage = $addressPage; - $this->selectShippingPage = $selectShippingPage; } /** diff --git a/tests/Behat/Resources/services.xml b/tests/Behat/Resources/services.xml deleted file mode 100644 index fdc78c4..0000000 --- a/tests/Behat/Resources/services.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - -