From 884414dbfc71c880978a050ee8ed5b6ceb22add8 Mon Sep 17 00:00:00 2001 From: PiotrSzymanski2000 Date: Thu, 26 Jun 2025 12:28:43 +0200 Subject: [PATCH 01/10] [Maintenance] Add TestApplication --- .github/workflows/build.yml | 18 +-- assets/admin/controllers.json | 4 + assets/shop/controllers.json | 4 + bin/create_node_symlink.php | 45 ------ composer.json | 28 +--- src/AcmeSyliusExamplePlugin.php | 6 + tests/Application/.env | 35 ----- tests/Application/.env.test | 13 -- tests/Application/.eslintrc.js | 20 --- tests/Application/.gitignore | 30 ---- tests/Application/Kernel.php | 13 -- tests/Application/assets/admin/entrypoint.js | 0 tests/Application/assets/shop/entrypoint.js | 1 - tests/Application/bin/console | 38 ----- tests/Application/composer.json | 5 - tests/Application/config/bootstrap.php | 27 ---- tests/Application/config/bundles.php | 67 --------- tests/Application/config/jwt/private.pem | 54 -------- tests/Application/config/jwt/public.pem | 14 -- .../Application/config/packages/_sylius.yaml | 18 --- .../config/packages/api_platform.yaml | 10 -- tests/Application/config/packages/assets.yaml | 11 -- .../config/packages/dev/framework.yaml | 2 - .../config/packages/dev/monolog.yaml | 9 -- .../config/packages/dev/routing.yaml | 3 - .../config/packages/dev/web_profiler.yaml | 3 - .../Application/config/packages/doctrine.yaml | 14 -- .../config/packages/doctrine_migrations.yaml | 6 - .../config/packages/framework.yaml | 6 - .../config/packages/http_discovery.yaml | 10 -- .../packages/lexik_jwt_authentication.yaml | 4 - .../config/packages/liip_imagine.yaml | 6 - tests/Application/config/packages/mailer.yaml | 3 - .../config/packages/prod/doctrine.yaml | 31 ----- .../config/packages/prod/monolog.yaml | 10 -- .../Application/config/packages/routing.yaml | 3 - .../Application/config/packages/security.yaml | 130 ------------------ .../config/packages/staging/monolog.yaml | 10 -- .../packages/stof_doctrine_extensions.yaml | 4 - .../sylius_state_machine_abstraction.yaml | 6 - .../config/packages/test/framework.yaml | 11 -- .../config/packages/test/monolog.yaml | 6 - .../config/packages/test/sylius_theme.yaml | 3 - .../config/packages/test/web_profiler.yaml | 6 - .../config/packages/test_cached/doctrine.yaml | 16 --- .../packages/test_cached/framework.yaml | 2 - .../config/packages/test_cached/monolog.yaml | 6 - .../packages/test_cached/sylius_channel.yaml | 2 - .../packages/test_cached/sylius_theme.yaml | 3 - .../config/packages/test_cached/twig.yaml | 2 - .../config/packages/translation.yaml | 8 -- tests/Application/config/packages/twig.yaml | 12 -- .../config/packages/validator.yaml | 3 - .../config/packages/webpack_encore.yaml | 7 - .../Application/config/packages/workflow.yaml | 2 - tests/Application/config/routes.yaml | 9 -- .../config/routes/dev/web_profiler.yaml | 7 - .../config/routes/liip_imagine.yaml | 2 - .../config/routes/sylius_admin.yaml | 3 - .../Application/config/routes/sylius_api.yaml | 3 - .../config/routes/sylius_shop.yaml | 26 ---- .../Application/config/secrets/dev/.gitignore | 0 .../config/secrets/prod/.gitignore | 0 .../config/secrets/test/.gitignore | 0 .../config/secrets/test_cached/.gitignore | 0 .../config/serialization/.gitignore | 0 tests/Application/config/services.yaml | 4 - tests/Application/config/services_test.yaml | 8 -- .../config/services_test_cached.yaml | 2 - tests/Application/package.json | 20 --- tests/Application/public/.htaccess | 25 ---- tests/Application/public/favicon.ico | Bin 32038 -> 0 bytes tests/Application/public/index.php | 29 ---- tests/Application/public/robots.txt | 4 - tests/Application/src/Entity/.gitignore | 0 tests/Application/templates/.gitignore | 0 tests/Application/translations/.gitignore | 0 tests/Application/var/.gitignore | 0 tests/Application/webpack.config.js | 48 ------- tests/TestApplication/.env | 5 + tests/TestApplication/config/bundles.php | 4 + tests/TestApplication/config/config.yaml | 6 + .../templates}/.gitignore | 0 83 files changed, 44 insertions(+), 971 deletions(-) create mode 100644 assets/admin/controllers.json create mode 100644 assets/shop/controllers.json delete mode 100644 bin/create_node_symlink.php delete mode 100644 tests/Application/.env delete mode 100644 tests/Application/.env.test delete mode 100644 tests/Application/.eslintrc.js delete mode 100644 tests/Application/.gitignore delete mode 100644 tests/Application/Kernel.php delete mode 100644 tests/Application/assets/admin/entrypoint.js delete mode 100644 tests/Application/assets/shop/entrypoint.js delete mode 100755 tests/Application/bin/console delete mode 100644 tests/Application/composer.json delete mode 100644 tests/Application/config/bootstrap.php delete mode 100644 tests/Application/config/bundles.php delete mode 100644 tests/Application/config/jwt/private.pem delete mode 100644 tests/Application/config/jwt/public.pem delete mode 100644 tests/Application/config/packages/_sylius.yaml delete mode 100644 tests/Application/config/packages/api_platform.yaml delete mode 100644 tests/Application/config/packages/assets.yaml delete mode 100644 tests/Application/config/packages/dev/framework.yaml delete mode 100644 tests/Application/config/packages/dev/monolog.yaml delete mode 100644 tests/Application/config/packages/dev/routing.yaml delete mode 100644 tests/Application/config/packages/dev/web_profiler.yaml delete mode 100644 tests/Application/config/packages/doctrine.yaml delete mode 100644 tests/Application/config/packages/doctrine_migrations.yaml delete mode 100644 tests/Application/config/packages/framework.yaml delete mode 100644 tests/Application/config/packages/http_discovery.yaml delete mode 100644 tests/Application/config/packages/lexik_jwt_authentication.yaml delete mode 100644 tests/Application/config/packages/liip_imagine.yaml delete mode 100644 tests/Application/config/packages/mailer.yaml delete mode 100644 tests/Application/config/packages/prod/doctrine.yaml delete mode 100644 tests/Application/config/packages/prod/monolog.yaml delete mode 100644 tests/Application/config/packages/routing.yaml delete mode 100644 tests/Application/config/packages/security.yaml delete mode 100644 tests/Application/config/packages/staging/monolog.yaml delete mode 100644 tests/Application/config/packages/stof_doctrine_extensions.yaml delete mode 100644 tests/Application/config/packages/sylius_state_machine_abstraction.yaml delete mode 100644 tests/Application/config/packages/test/framework.yaml delete mode 100644 tests/Application/config/packages/test/monolog.yaml delete mode 100644 tests/Application/config/packages/test/sylius_theme.yaml delete mode 100644 tests/Application/config/packages/test/web_profiler.yaml delete mode 100644 tests/Application/config/packages/test_cached/doctrine.yaml delete mode 100644 tests/Application/config/packages/test_cached/framework.yaml delete mode 100644 tests/Application/config/packages/test_cached/monolog.yaml delete mode 100644 tests/Application/config/packages/test_cached/sylius_channel.yaml delete mode 100644 tests/Application/config/packages/test_cached/sylius_theme.yaml delete mode 100644 tests/Application/config/packages/test_cached/twig.yaml delete mode 100644 tests/Application/config/packages/translation.yaml delete mode 100644 tests/Application/config/packages/twig.yaml delete mode 100644 tests/Application/config/packages/validator.yaml delete mode 100644 tests/Application/config/packages/webpack_encore.yaml delete mode 100644 tests/Application/config/packages/workflow.yaml delete mode 100644 tests/Application/config/routes.yaml delete mode 100644 tests/Application/config/routes/dev/web_profiler.yaml delete mode 100644 tests/Application/config/routes/liip_imagine.yaml delete mode 100644 tests/Application/config/routes/sylius_admin.yaml delete mode 100644 tests/Application/config/routes/sylius_api.yaml delete mode 100644 tests/Application/config/routes/sylius_shop.yaml delete mode 100644 tests/Application/config/secrets/dev/.gitignore delete mode 100644 tests/Application/config/secrets/prod/.gitignore delete mode 100644 tests/Application/config/secrets/test/.gitignore delete mode 100644 tests/Application/config/secrets/test_cached/.gitignore delete mode 100644 tests/Application/config/serialization/.gitignore delete mode 100644 tests/Application/config/services.yaml delete mode 100644 tests/Application/config/services_test.yaml delete mode 100644 tests/Application/config/services_test_cached.yaml delete mode 100644 tests/Application/package.json delete mode 100644 tests/Application/public/.htaccess delete mode 100644 tests/Application/public/favicon.ico delete mode 100644 tests/Application/public/index.php delete mode 100644 tests/Application/public/robots.txt delete mode 100644 tests/Application/src/Entity/.gitignore delete mode 100644 tests/Application/templates/.gitignore delete mode 100644 tests/Application/translations/.gitignore delete mode 100644 tests/Application/var/.gitignore delete mode 100644 tests/Application/webpack.config.js create mode 100644 tests/TestApplication/.env create mode 100644 tests/TestApplication/config/bundles.php create mode 100644 tests/TestApplication/config/config.yaml rename tests/{Application/config/api_platform => TestApplication/templates}/.gitignore (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index aae3468e..4a24464d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -74,7 +74,7 @@ jobs: - name: Run webserver - run: (cd tests/Application && symfony server:start --port=8080 --dir=public --daemon) + run: (symfony server:start --port=8080 --dir=public --daemon) - name: Get Composer cache directory @@ -129,27 +129,27 @@ jobs: - name: Install JS dependencies - run: (cd tests/Application && yarn install) + run: (cd vendor/sylius/test-application && yarn install) - name: Prepare test application database run: | - (cd tests/Application && bin/console doctrine:database:create -vvv) - (cd tests/Application && bin/console doctrine:schema:create -vvv) + (vendor/bin/console doctrine:database:create -vvv) + (vendor/bin/console doctrine:schema:create -vvv) - name: Prepare test application assets run: | - (cd tests/Application && bin/console assets:install public -vvv) - (cd tests/Application && yarn build:prod) + (cd vendor/bin/console assets:install public -vvv) + (cd vendor/sylius/test-application && yarn build:prod) - name: Prepare test application cache - run: (cd tests/Application && bin/console cache:warmup -vvv) + run: (cd vendor/bin/console cache:warmup -vvv) - name: Load fixtures in test application - run: (cd tests/Application && bin/console sylius:fixtures:load -n) + run: (cd vendor/bin/console sylius:fixtures:load -n) - name: Validate composer.json @@ -157,7 +157,7 @@ jobs: - name: Validate database schema - run: (cd tests/Application && bin/console doctrine:schema:validate) + run: (cd vendor/bin/console doctrine:schema:validate) - name: Run PHPStan diff --git a/assets/admin/controllers.json b/assets/admin/controllers.json new file mode 100644 index 00000000..e2ce9b5c --- /dev/null +++ b/assets/admin/controllers.json @@ -0,0 +1,4 @@ +{ + "controllers": [], + "entrypoints": [] +} diff --git a/assets/shop/controllers.json b/assets/shop/controllers.json new file mode 100644 index 00000000..e2ce9b5c --- /dev/null +++ b/assets/shop/controllers.json @@ -0,0 +1,4 @@ +{ + "controllers": [], + "entrypoints": [] +} diff --git a/bin/create_node_symlink.php b/bin/create_node_symlink.php deleted file mode 100644 index 10d69b45..00000000 --- a/bin/create_node_symlink.php +++ /dev/null @@ -1,45 +0,0 @@ - `' . NODE_MODULES_FOLDER_NAME . '` already exists as a link or folder, keeping existing as may be intentional.' . PHP_EOL; - exit(0); - } else { - echo '> Invalid symlink `' . NODE_MODULES_FOLDER_NAME . '` detected, recreating...' . PHP_EOL; - if (!@unlink(NODE_MODULES_FOLDER_NAME)) { - echo '> Could not delete file `' . NODE_MODULES_FOLDER_NAME . '`.' . PHP_EOL; - exit(1); - } - } -} - -/* try to create the symlink using PHP internals... */ -$success = @symlink(PATH_TO_NODE_MODULES, NODE_MODULES_FOLDER_NAME); - -/* if case it has failed, but OS is Windows... */ -if (!$success && strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { - /* ...then try a different approach which does not require elevated permissions and folder to exist */ - echo '> This system is running Windows, creation of links requires elevated privileges,' . PHP_EOL; - echo '> and target path to exist. Fallback to NTFS Junction:' . PHP_EOL; - exec(sprintf('mklink /J %s %s 2> NUL', NODE_MODULES_FOLDER_NAME, PATH_TO_NODE_MODULES), $output, $returnCode); - $success = $returnCode === 0; - if (!$success) { - echo '> Failed o create the required symlink' . PHP_EOL; - exit(2); - } -} - -$path = @readlink(NODE_MODULES_FOLDER_NAME); -/* check if link points to the intended directory */ -if ($path && realpath($path) === realpath(PATH_TO_NODE_MODULES)) { - echo '> Successfully created the symlink.' . PHP_EOL; - exit(0); -} - -echo '> Failed to create the symlink to `' . NODE_MODULES_FOLDER_NAME . '`.' . PHP_EOL; -exit(3); diff --git a/composer.json b/composer.json index c6f5a6f6..54fba0ef 100644 --- a/composer.json +++ b/composer.json @@ -33,6 +33,7 @@ "sylius-labs/coding-standard": "^4.4", "sylius-labs/suite-tags-extension": "~0.2", "sylius/sylius-rector": "^2.0", + "sylius/test-application": "~2.0.0", "symfony/browser-kit": "^6.4 || ^7.1", "symfony/debug-bundle": "^6.4 || ^7.1", "symfony/dotenv": "^6.4 || ^7.1", @@ -57,7 +58,9 @@ }, "symfony": { "require": "^6.4" - } + }, + "public-dir": "vendor/sylius/test-application/public" + }, "autoload": { "psr-4": { @@ -65,25 +68,6 @@ "Tests\\Acme\\SyliusExamplePlugin\\": "tests/" } }, - "autoload-dev": { - "classmap": [ - "tests/Application/Kernel.php" - ] - }, - "scripts": { - "post-install-cmd": [ - "php bin/create_node_symlink.php" - ], - "post-update-cmd": [ - "php bin/create_node_symlink.php" - ], - "post-create-project-cmd": [ - "php bin/create_node_symlink.php" - ], - "auto-scripts": { - "cache:clear": "symfony-cmd", - "assets:install %PUBLIC_DIR%": "symfony-cmd", - "COMPOSER_AUDIT_ABANDONED=ignore composer audit": "script" - } - } + "minimum-stability": "dev", + "prefer-stable": true } diff --git a/src/AcmeSyliusExamplePlugin.php b/src/AcmeSyliusExamplePlugin.php index 7b076f6d..0713f20a 100644 --- a/src/AcmeSyliusExamplePlugin.php +++ b/src/AcmeSyliusExamplePlugin.php @@ -5,12 +5,18 @@ namespace Acme\SyliusExamplePlugin; use Sylius\Bundle\CoreBundle\Application\SyliusPluginTrait; +use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\HttpKernel\Bundle\Bundle; final class AcmeSyliusExamplePlugin extends Bundle { use SyliusPluginTrait; + public function build(ContainerBuilder $container): void + { + parent::build($container); + } + public function getPath(): string { return \dirname(__DIR__); diff --git a/tests/Application/.env b/tests/Application/.env deleted file mode 100644 index 0a154d73..00000000 --- a/tests/Application/.env +++ /dev/null @@ -1,35 +0,0 @@ -# This file is a "template" of which env vars needs to be defined in your configuration or in an .env file -# Set variables here that may be different on each deployment target of the app, e.g. development, staging, production. -# https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration - -###> symfony/framework-bundle ### -APP_ENV=dev -APP_DEBUG=1 -APP_SECRET=EDITME -###< symfony/framework-bundle ### - -###> doctrine/doctrine-bundle ### -# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url -# For a sqlite database, use: "sqlite:///%kernel.project_dir%/var/data.db" -# Set "serverVersion" to your server version to avoid edge-case exceptions and extra database calls -DATABASE_URL=mysql://root@127.0.0.1/acme_sylius_example_plugin_%kernel.environment%?serverVersion=5.7 -###< doctrine/doctrine-bundle ### - -###> lexik/jwt-authentication-bundle ### -JWT_SECRET_KEY=%kernel.project_dir%/config/jwt/private.pem -JWT_PUBLIC_KEY=%kernel.project_dir%/config/jwt/public.pem -JWT_PASSPHRASE=acme_plugin_development -###< lexik/jwt-authentication-bundle ### - -###> symfony/mailer ### -MAILER_DSN=null://null -###< symfony/mailer ### - -###> symfony/messenger ### -SYLIUS_MESSENGER_TRANSPORT_MAIN_DSN=doctrine://default -SYLIUS_MESSENGER_TRANSPORT_MAIN_FAILED_DSN=doctrine://default?queue_name=main_failed -SYLIUS_MESSENGER_TRANSPORT_CATALOG_PROMOTION_REMOVAL_DSN=doctrine://default?queue_name=catalog_promotion_removal -SYLIUS_MESSENGER_TRANSPORT_CATALOG_PROMOTION_REMOVAL_FAILED_DSN=doctrine://default?queue_name=catalog_promotion_removal_failed -SYLIUS_MESSENGER_TRANSPORT_PAYMENT_REQUEST_DSN=doctrine://default?queue_name=payment_request -SYLIUS_MESSENGER_TRANSPORT_PAYMENT_REQUEST_FAILED_DSN=doctrine://default?queue_name=payment_request_failed -###< symfony/messenger ### diff --git a/tests/Application/.env.test b/tests/Application/.env.test deleted file mode 100644 index 125ba1c3..00000000 --- a/tests/Application/.env.test +++ /dev/null @@ -1,13 +0,0 @@ -APP_SECRET='ch4mb3r0f5ecr3ts' - -KERNEL_CLASS='Tests\Acme\SyliusExamplePlugin\Application\Kernel' - -###> symfony/messenger ### -# Sync transport turned for testing env for the ease of testing -SYLIUS_MESSENGER_TRANSPORT_MAIN_DSN=sync:// -SYLIUS_MESSENGER_TRANSPORT_MAIN_FAILED_DSN=sync:// -SYLIUS_MESSENGER_TRANSPORT_CATALOG_PROMOTION_REMOVAL_DSN=sync:// -SYLIUS_MESSENGER_TRANSPORT_CATALOG_PROMOTION_REMOVAL_FAILED_DSN=sync:// -SYLIUS_MESSENGER_TRANSPORT_PAYMENT_REQUEST_DSN=sync:// -SYLIUS_MESSENGER_TRANSPORT_PAYMENT_REQUEST_FAILED_DSN=sync:// -###< symfony/messenger ### diff --git a/tests/Application/.eslintrc.js b/tests/Application/.eslintrc.js deleted file mode 100644 index 92c4cee3..00000000 --- a/tests/Application/.eslintrc.js +++ /dev/null @@ -1,20 +0,0 @@ -module.exports = { - extends: 'airbnb-base', - env: { - node: true, - }, - rules: { - 'object-shorthand': ['error', 'always', { - avoidQuotes: true, - avoidExplicitReturnArrows: true, - }], - 'function-paren-newline': ['error', 'consistent'], - 'max-len': ['warn', 120, 2, { - ignoreUrls: true, - ignoreComments: false, - ignoreRegExpLiterals: true, - ignoreStrings: true, - ignoreTemplateLiterals: true, - }], - }, -}; diff --git a/tests/Application/.gitignore b/tests/Application/.gitignore deleted file mode 100644 index 8f00a8c6..00000000 --- a/tests/Application/.gitignore +++ /dev/null @@ -1,30 +0,0 @@ -/public/assets -/public/build -/public/css -/public/js -/public/media/* -!/public/media/image/ -/public/media/image/* -!/public/media/image/.gitignore - -/node_modules -/yarn.lock -/package-lock.json - -###> symfony/framework-bundle ### -/.env.*.local -/.env.local -/.env.local.php -/public/bundles -/var/ -/vendor/ -###< symfony/framework-bundle ### - -###> symfony/web-server-bundle ### -/.web-server-pid -###< symfony/web-server-bundle ### - -###> lexik/jwt-authentication-bundle ### -/config/jwt/*.pem -!/config/jwt/*-test.pem -###< lexik/jwt-authentication-bundle ### diff --git a/tests/Application/Kernel.php b/tests/Application/Kernel.php deleted file mode 100644 index 6067aa38..00000000 --- a/tests/Application/Kernel.php +++ /dev/null @@ -1,13 +0,0 @@ -getParameterOption(['--env', '-e'], null, true)) { - putenv('APP_ENV='.$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = $env); -} - -if ($input->hasParameterOption('--no-debug', true)) { - putenv('APP_DEBUG='.$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = '0'); -} - -require dirname(__DIR__).'/config/bootstrap.php'; - -if ($_SERVER['APP_DEBUG']) { - umask(0000); - - if (class_exists(Debug::class)) { - Debug::enable(); - } -} - -$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']); -$application = new Application($kernel); -$application->run($input); diff --git a/tests/Application/composer.json b/tests/Application/composer.json deleted file mode 100644 index 326735f5..00000000 --- a/tests/Application/composer.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "sylius/plugin-skeleton-test-application", - "description": "Sylius application for plugin testing purposes (composer.json needed for project dir resolving)", - "license": "MIT" -} diff --git a/tests/Application/config/bootstrap.php b/tests/Application/config/bootstrap.php deleted file mode 100644 index c9951a7c..00000000 --- a/tests/Application/config/bootstrap.php +++ /dev/null @@ -1,27 +0,0 @@ -=1.2) -if (is_array($env = @include dirname(__DIR__) . '/.env.local.php')) { - $_SERVER += $env; - $_ENV += $env; -} elseif (!class_exists(Dotenv::class)) { - throw new RuntimeException('Please run "composer require symfony/dotenv" to load the ".env" files configuring the application.'); -} elseif (method_exists(Dotenv::class, 'bootEnv')) { - (new Dotenv())->bootEnv(dirname(__DIR__) . '/.env'); - - return; -} else { - // load all the .env files - (new Dotenv(true))->loadEnv(dirname(__DIR__) . '/.env'); -} - -$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? null) ?: 'dev'; -$_SERVER['APP_DEBUG'] = $_SERVER['APP_DEBUG'] ?? $_ENV['APP_DEBUG'] ?? 'prod' !== $_SERVER['APP_ENV']; -$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = (int) $_SERVER['APP_DEBUG'] || filter_var($_SERVER['APP_DEBUG'], \FILTER_VALIDATE_BOOLEAN) ? '1' : '0'; diff --git a/tests/Application/config/bundles.php b/tests/Application/config/bundles.php deleted file mode 100644 index 38b2ee9c..00000000 --- a/tests/Application/config/bundles.php +++ /dev/null @@ -1,67 +0,0 @@ - ['all' => true], - Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true], - Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true], - Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true], - Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true], - Sylius\Bundle\OrderBundle\SyliusOrderBundle::class => ['all' => true], - Sylius\Bundle\MoneyBundle\SyliusMoneyBundle::class => ['all' => true], - Sylius\Bundle\CurrencyBundle\SyliusCurrencyBundle::class => ['all' => true], - Sylius\Bundle\LocaleBundle\SyliusLocaleBundle::class => ['all' => true], - Sylius\Bundle\ProductBundle\SyliusProductBundle::class => ['all' => true], - Sylius\Bundle\ChannelBundle\SyliusChannelBundle::class => ['all' => true], - Sylius\Bundle\AttributeBundle\SyliusAttributeBundle::class => ['all' => true], - Sylius\Bundle\TaxationBundle\SyliusTaxationBundle::class => ['all' => true], - Sylius\Bundle\ShippingBundle\SyliusShippingBundle::class => ['all' => true], - Sylius\Bundle\PaymentBundle\SyliusPaymentBundle::class => ['all' => true], - Sylius\Bundle\MailerBundle\SyliusMailerBundle::class => ['all' => true], - Sylius\Bundle\PromotionBundle\SyliusPromotionBundle::class => ['all' => true], - Sylius\Bundle\AddressingBundle\SyliusAddressingBundle::class => ['all' => true], - Sylius\Bundle\InventoryBundle\SyliusInventoryBundle::class => ['all' => true], - Sylius\Bundle\TaxonomyBundle\SyliusTaxonomyBundle::class => ['all' => true], - Sylius\Bundle\UserBundle\SyliusUserBundle::class => ['all' => true], - Sylius\Bundle\CustomerBundle\SyliusCustomerBundle::class => ['all' => true], - Sylius\Bundle\UiBundle\SyliusUiBundle::class => ['all' => true], - Sylius\Bundle\ReviewBundle\SyliusReviewBundle::class => ['all' => true], - Sylius\Bundle\CoreBundle\SyliusCoreBundle::class => ['all' => true], - Sylius\Bundle\ResourceBundle\SyliusResourceBundle::class => ['all' => true], - Sylius\Bundle\GridBundle\SyliusGridBundle::class => ['all' => true], - Knp\Bundle\GaufretteBundle\KnpGaufretteBundle::class => ['all' => true], - Knp\Bundle\MenuBundle\KnpMenuBundle::class => ['all' => true], - Liip\ImagineBundle\LiipImagineBundle::class => ['all' => true], - Payum\Bundle\PayumBundle\PayumBundle::class => ['all' => true], - Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle::class => ['all' => true], - Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true], - Sylius\Bundle\FixturesBundle\SyliusFixturesBundle::class => ['all' => true], - Sylius\Bundle\PayumBundle\SyliusPayumBundle::class => ['all' => true], - Sylius\Bundle\ThemeBundle\SyliusThemeBundle::class => ['all' => true], - Sylius\Bundle\AdminBundle\SyliusAdminBundle::class => ['all' => true], - Sylius\Bundle\ShopBundle\SyliusShopBundle::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], - ApiPlatform\Symfony\Bundle\ApiPlatformBundle::class => ['all' => true], - Sylius\Bundle\ApiBundle\SyliusApiBundle::class => ['all' => true], - Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle::class => ['all' => true], - SyliusLabs\DoctrineMigrationsExtraBundle\SyliusLabsDoctrineMigrationsExtraBundle::class => ['all' => true], - BabDev\PagerfantaBundle\BabDevPagerfantaBundle::class => ['all' => true], - Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true], - League\FlysystemBundle\FlysystemBundle::class => ['all' => true], - Sylius\TwigExtra\Symfony\SyliusTwigExtraBundle::class => ['all' => true], - Sylius\TwigHooks\SyliusTwigHooksBundle::class => ['all' => true], - Symfony\UX\Icons\UXIconsBundle::class => ['all' => true], - Symfony\UX\TwigComponent\TwigComponentBundle::class => ['all' => true], - Symfony\UX\LiveComponent\LiveComponentBundle::class => ['all' => true], - Symfony\UX\Autocomplete\AutocompleteBundle::class => ['all' => true], - Symfony\UX\StimulusBundle\StimulusBundle::class => ['all' => true], - Sylius\Abstraction\StateMachine\SyliusStateMachineAbstractionBundle::class => ['all' => true], - Acme\SyliusExamplePlugin\AcmeSyliusExamplePlugin::class => ['all' => true], -]; - -if (class_exists(winzou\Bundle\StateMachineBundle\winzouStateMachineBundle::class)) { - $bundles[winzou\Bundle\StateMachineBundle\winzouStateMachineBundle::class] = ['all' => true]; -} - -return $bundles; diff --git a/tests/Application/config/jwt/private.pem b/tests/Application/config/jwt/private.pem deleted file mode 100644 index 2bcf0230..00000000 --- a/tests/Application/config/jwt/private.pem +++ /dev/null @@ -1,54 +0,0 @@ ------BEGIN ENCRYPTED PRIVATE KEY----- -MIIJrTBXBgkqhkiG9w0BBQ0wSjApBgkqhkiG9w0BBQwwHAQIDbthk+aF5EACAggA -MAwGCCqGSIb3DQIJBQAwHQYJYIZIAWUDBAEqBBA3DYfh2mXByUxFNke/Wf5SBIIJ -UBckIgXeXBWPLQAAq07pN8uNFMUcUirFuEvbmxVe1PupCCAqriNxi1DqeSu/M7c1 -h66y0BqKZu/0G9SVTg63iCKDEiRAM3hLyD2CsjYg8h2LAaqQ9dFYGV0cHRhCXagZ -Sdt9YTfn2rarRbxauMSt0z9zwCaiUrBU4JwSM3g+tD7W0lxAm9TeaqBZek5DIX+j -3Gom5tPYQe8jvfGMGdMPuanoEwH4WbWzGcqypWriy4JwaggwKCQ4ituWfa9kqMMC -8HRmBBDg0gtafmQP910RZh18JL2ewF5Pl7GDsLtOj5gNLNuAiQxDCcYRnD4/Cdsl -bH91btmGX1nUVIFViUTW93eBsjBgdgqOMRVxUKkSSX6CmIZWlE3AazgwSbvOvNrN -JGa8X21UwfuS/JHLmfRmgdti0YxRjJkBYLPpcd3ILsi+MMhSHy0uycAM/dB80Q1B -vkW1UXGbCw/PzA5yHrzULzAl69E3Tt5nTVMIIcBGxw2rf+ej+AVjsuOl7etwecdC -gnA90ViNlGOACLVnhsjd4WVF9Oircosf0UYoblwcT6gw1GSVF9pWuu7k5hy/7Pt/ -o1BvonUgz/4VHG+K58qvtnlto+JE0XWzPvukNUyggtekTLyoQCI3ZKge6ui3qLax -N6whHpzFnFVF3GJAisTk5naHFawHNvH7t85pmc+UnjNUUmyl9RStl9LMYDSBKNlR -LzPlJK27E5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gFMNWQcMMtiqbei86yACdqe+jiW -HqHv8wfoBHR+eIARub2itOJ/cI+oKv96d4it4FqQ9Lml8RUFFZj7Hrd6EjDb6Nq4 -P9ti7eku/xZvS0saBNChvv44GhP6FZJS0i/gidVffLna7Wua98tPZEAXp57k+XUL -PzsRJ4a+hFuQjkyXFoz/v8YuUdyCFUSVVr9ArVu0v4+4euFWpQLav5sXv0Gh9X58 -Ek1KIf7Z/tZAJnSjTjFuSbDX/AoTMTxpRBKKnFW6zY0Nw2pjTVMtTVDkv9xkBpBK -wod7FPD5f0T7y9YOARVZnBxVRSkkcYpEJFy5pLNeadg9 ------END ENCRYPTED PRIVATE KEY----- diff --git a/tests/Application/config/jwt/public.pem b/tests/Application/config/jwt/public.pem deleted file mode 100644 index cb4e13da..00000000 --- a/tests/Application/config/jwt/public.pem +++ /dev/null @@ -1,14 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA6QkmF/Xi5nAYb8Kzr7qC -d63V2K+d/nCXbpDUKKDPJAqOtTlMoQSuJRLNnhhp7z1i/Cp4Bhifr20Pu2dq8JYg -6pRT4ctqvYb/MXxAaPZc3EcBC0S6AhgKO/fDvR3LcqYqGJmQQOXZvxTsgqongdvV -4XbqFBMMgngyayoBk0VKTaI/s+LQhIce+1QaxbAI0+/zbR0hZ1hWT73orJi3do+1 -TBzQol+V7WGa8LlJfmgM56qO3BmVkeTDMBc27pGp6g3+Oufk/l29jEGJlUT9yu7Q -BRhaQTWNVASa2aD+AKjVBzJh53O2zD8slAbjF1M9U7bbWN28Sv+xC/dUz0q9HnPu -RsY2tnwryqTyYn/Hf2xyP3/KvjJ6oslAwemu5JirdJkO7KVQAthWG42gLuhZg3ks -cSZhCLZH7nO2UDsf+2ZZgdbhpYZwR4gDRfNt7GKWXnWZOz9Uw1yVCPgylyZRZwg8 -l0y9aABdj3379I22icrwpMZbAgkyxNSV6UNJuxZksLUoP3i9OvXYgPYU9E4tU/Ul -Dm/T1rGSReGoPkU1YQnI50bq7p1byIoUu2scTflvpTVI5a7zULkS1tg60xk7vBRC -aBc7nr4UEtA235N6uLtcGxH11WBMwsKX69sSU0sQdC4Sk25zXM2gc8R1XV9K3qz2 -wQorQRlCwrkG44VRDgbFH+8CAwEAAQ== ------END PUBLIC KEY----- diff --git a/tests/Application/config/packages/_sylius.yaml b/tests/Application/config/packages/_sylius.yaml deleted file mode 100644 index 5a1d43bd..00000000 --- a/tests/Application/config/packages/_sylius.yaml +++ /dev/null @@ -1,18 +0,0 @@ -imports: - - { resource: "@SyliusCoreBundle/Resources/config/app/config.yml" } - - { resource: "@SyliusPayumBundle/Resources/config/app/config.yaml" } - - { resource: "@SyliusAdminBundle/Resources/config/app/config.yml" } - - { resource: "@SyliusShopBundle/Resources/config/app/config.yml" } - - { resource: "@SyliusApiBundle/Resources/config/app/config.yaml" } - - - { resource: '@AcmeSyliusExamplePlugin/config/config.yaml' } - -parameters: - sylius_core.public_dir: '%kernel.project_dir%/public' - -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 deleted file mode 100644 index ceb10e73..00000000 --- a/tests/Application/config/packages/api_platform.yaml +++ /dev/null @@ -1,10 +0,0 @@ -api_platform: - mapping: - paths: - - '%kernel.project_dir%/../../vendor/sylius/sylius/src/Sylius/Bundle/ApiBundle/Resources/config/api_platform' - - '%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/assets.yaml b/tests/Application/config/packages/assets.yaml deleted file mode 100644 index 73f9d566..00000000 --- a/tests/Application/config/packages/assets.yaml +++ /dev/null @@ -1,11 +0,0 @@ -framework: - assets: - packages: - shop: - json_manifest_path: '%kernel.project_dir%/public/build/shop/manifest.json' - admin: - json_manifest_path: '%kernel.project_dir%/public/build/admin/manifest.json' - app.admin: - json_manifest_path: '%kernel.project_dir%/public/build/app/admin/manifest.json' - app.shop: - json_manifest_path: '%kernel.project_dir%/public/build/app/shop/manifest.json' diff --git a/tests/Application/config/packages/dev/framework.yaml b/tests/Application/config/packages/dev/framework.yaml deleted file mode 100644 index 4b116def..00000000 --- a/tests/Application/config/packages/dev/framework.yaml +++ /dev/null @@ -1,2 +0,0 @@ -framework: - profiler: { only_exceptions: false } diff --git a/tests/Application/config/packages/dev/monolog.yaml b/tests/Application/config/packages/dev/monolog.yaml deleted file mode 100644 index da2b092d..00000000 --- a/tests/Application/config/packages/dev/monolog.yaml +++ /dev/null @@ -1,9 +0,0 @@ -monolog: - handlers: - main: - type: stream - path: "%kernel.logs_dir%/%kernel.environment%.log" - level: debug - firephp: - type: firephp - level: info diff --git a/tests/Application/config/packages/dev/routing.yaml b/tests/Application/config/packages/dev/routing.yaml deleted file mode 100644 index 4116679a..00000000 --- a/tests/Application/config/packages/dev/routing.yaml +++ /dev/null @@ -1,3 +0,0 @@ -framework: - router: - strict_requirements: true diff --git a/tests/Application/config/packages/dev/web_profiler.yaml b/tests/Application/config/packages/dev/web_profiler.yaml deleted file mode 100644 index 1f1cb2bb..00000000 --- a/tests/Application/config/packages/dev/web_profiler.yaml +++ /dev/null @@ -1,3 +0,0 @@ -web_profiler: - toolbar: true - intercept_redirects: false diff --git a/tests/Application/config/packages/doctrine.yaml b/tests/Application/config/packages/doctrine.yaml deleted file mode 100644 index f51ba5a2..00000000 --- a/tests/Application/config/packages/doctrine.yaml +++ /dev/null @@ -1,14 +0,0 @@ -parameters: - # Adds a fallback DATABASE_URL if the env var is not set. - # This allows you to run cache:warmup even if your - # environment variables are not available yet. - # You should not need to change this value. - env(DATABASE_URL): '' - -doctrine: - dbal: - driver: 'pdo_mysql' - server_version: '5.7' - charset: UTF8 - - url: '%env(resolve:DATABASE_URL)%' diff --git a/tests/Application/config/packages/doctrine_migrations.yaml b/tests/Application/config/packages/doctrine_migrations.yaml deleted file mode 100644 index ec356494..00000000 --- a/tests/Application/config/packages/doctrine_migrations.yaml +++ /dev/null @@ -1,6 +0,0 @@ -doctrine_migrations: - storage: - table_storage: - table_name: sylius_migrations - migrations_paths: - 'App\Migrations': '%kernel.project_dir%/../../src/Migrations/' diff --git a/tests/Application/config/packages/framework.yaml b/tests/Application/config/packages/framework.yaml deleted file mode 100644 index 9b445011..00000000 --- a/tests/Application/config/packages/framework.yaml +++ /dev/null @@ -1,6 +0,0 @@ -framework: - secret: '%env(APP_SECRET)%' - form: true - csrf_protection: true - session: - handler_id: ~ diff --git a/tests/Application/config/packages/http_discovery.yaml b/tests/Application/config/packages/http_discovery.yaml deleted file mode 100644 index 2a789e73..00000000 --- a/tests/Application/config/packages/http_discovery.yaml +++ /dev/null @@ -1,10 +0,0 @@ -services: - Psr\Http\Message\RequestFactoryInterface: '@http_discovery.psr17_factory' - Psr\Http\Message\ResponseFactoryInterface: '@http_discovery.psr17_factory' - Psr\Http\Message\ServerRequestFactoryInterface: '@http_discovery.psr17_factory' - Psr\Http\Message\StreamFactoryInterface: '@http_discovery.psr17_factory' - Psr\Http\Message\UploadedFileFactoryInterface: '@http_discovery.psr17_factory' - Psr\Http\Message\UriFactoryInterface: '@http_discovery.psr17_factory' - - http_discovery.psr17_factory: - class: Http\Discovery\Psr17Factory diff --git a/tests/Application/config/packages/lexik_jwt_authentication.yaml b/tests/Application/config/packages/lexik_jwt_authentication.yaml deleted file mode 100644 index edfb69dc..00000000 --- a/tests/Application/config/packages/lexik_jwt_authentication.yaml +++ /dev/null @@ -1,4 +0,0 @@ -lexik_jwt_authentication: - secret_key: '%env(resolve:JWT_SECRET_KEY)%' - public_key: '%env(resolve:JWT_PUBLIC_KEY)%' - pass_phrase: '%env(JWT_PASSPHRASE)%' diff --git a/tests/Application/config/packages/liip_imagine.yaml b/tests/Application/config/packages/liip_imagine.yaml deleted file mode 100644 index bb2e7ceb..00000000 --- a/tests/Application/config/packages/liip_imagine.yaml +++ /dev/null @@ -1,6 +0,0 @@ -liip_imagine: - resolvers: - default: - web_path: - web_root: "%kernel.project_dir%/public" - cache_prefix: "media/cache" diff --git a/tests/Application/config/packages/mailer.yaml b/tests/Application/config/packages/mailer.yaml deleted file mode 100644 index 56a650d8..00000000 --- a/tests/Application/config/packages/mailer.yaml +++ /dev/null @@ -1,3 +0,0 @@ -framework: - mailer: - dsn: '%env(MAILER_DSN)%' diff --git a/tests/Application/config/packages/prod/doctrine.yaml b/tests/Application/config/packages/prod/doctrine.yaml deleted file mode 100644 index 2f16f0fd..00000000 --- a/tests/Application/config/packages/prod/doctrine.yaml +++ /dev/null @@ -1,31 +0,0 @@ -doctrine: - orm: - metadata_cache_driver: - type: service - id: doctrine.system_cache_provider - query_cache_driver: - type: service - id: doctrine.system_cache_provider - result_cache_driver: - type: service - id: doctrine.result_cache_provider - -services: - doctrine.result_cache_provider: - class: Symfony\Component\Cache\DoctrineProvider - public: false - arguments: - - '@doctrine.result_cache_pool' - doctrine.system_cache_provider: - class: Symfony\Component\Cache\DoctrineProvider - public: false - arguments: - - '@doctrine.system_cache_pool' - -framework: - cache: - pools: - doctrine.result_cache_pool: - adapter: cache.app - doctrine.system_cache_pool: - adapter: cache.system diff --git a/tests/Application/config/packages/prod/monolog.yaml b/tests/Application/config/packages/prod/monolog.yaml deleted file mode 100644 index 64612114..00000000 --- a/tests/Application/config/packages/prod/monolog.yaml +++ /dev/null @@ -1,10 +0,0 @@ -monolog: - handlers: - main: - type: fingers_crossed - action_level: error - handler: nested - nested: - type: stream - path: "%kernel.logs_dir%/%kernel.environment%.log" - level: debug diff --git a/tests/Application/config/packages/routing.yaml b/tests/Application/config/packages/routing.yaml deleted file mode 100644 index 368bc7f4..00000000 --- a/tests/Application/config/packages/routing.yaml +++ /dev/null @@ -1,3 +0,0 @@ -framework: - router: - strict_requirements: ~ diff --git a/tests/Application/config/packages/security.yaml b/tests/Application/config/packages/security.yaml deleted file mode 100644 index af38e750..00000000 --- a/tests/Application/config/packages/security.yaml +++ /dev/null @@ -1,130 +0,0 @@ -security: - 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 - - password_hashers: - Sylius\Component\User\Model\UserInterface: argon2i - firewalls: - admin: - switch_user: true - context: admin - pattern: "%sylius.security.admin_regex%" - provider: sylius_admin_user_provider - user_checker: security.user_checker.chain.admin - 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 - enable_csrf: true - 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 - - api_admin: - pattern: "%sylius.security.api_admin_regex%/.*" - provider: sylius_api_admin_user_provider - user_checker: security.user_checker.chain.api_admin - stateless: true - entry_point: jwt - json_login: - check_path: "%sylius.security.api_admin_route%/administrators/token" - username_path: email - password_path: password - success_handler: lexik_jwt_authentication.handler.authentication_success - failure_handler: lexik_jwt_authentication.handler.authentication_failure - jwt: true - - api_shop: - pattern: "%sylius.security.api_shop_regex%/.*" - provider: sylius_api_shop_user_provider - user_checker: security.user_checker.chain.api_shop - stateless: true - entry_point: jwt - json_login: - check_path: "%sylius.security.api_shop_route%/customers/token" - username_path: email - password_path: password - 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 - pattern: "%sylius.security.shop_regex%" - provider: sylius_shop_user_provider - user_checker: security.user_checker.chain.shop - 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 - enable_csrf: true - csrf_parameter: _csrf_shop_security_token - csrf_token_id: shop_authenticate - json_login: - check_path: sylius_shop_json_login_check - username_path: _username - password_path: _password - success_handler: sylius.authentication.success_handler - failure_handler: sylius.authentication.failure_handler - 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_homepage - invalidate_session: false - - image_resolver: - pattern: ^/media/cache/resolve - security: false - - dev: - pattern: ^/(_(profiler|wdt)|css|images|js)/ - security: false - - access_control: - - { 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.api_admin_route%/administrators/reset-password", role: PUBLIC_ACCESS } - - { path: "%sylius.security.api_admin_regex%/.*", role: ROLE_API_ACCESS } - - { path: "%sylius.security.api_admin_route%/administrators/token", role: PUBLIC_ACCESS } - - { path: "%sylius.security.api_shop_account_regex%/.*", role: ROLE_USER } - - { path: "%sylius.security.api_shop_route%/customers/token", role: PUBLIC_ACCESS } - - { path: "%sylius.security.api_shop_regex%/.*", role: PUBLIC_ACCESS } diff --git a/tests/Application/config/packages/staging/monolog.yaml b/tests/Application/config/packages/staging/monolog.yaml deleted file mode 100644 index 64612114..00000000 --- a/tests/Application/config/packages/staging/monolog.yaml +++ /dev/null @@ -1,10 +0,0 @@ -monolog: - handlers: - main: - type: fingers_crossed - action_level: error - handler: nested - nested: - type: stream - path: "%kernel.logs_dir%/%kernel.environment%.log" - level: debug diff --git a/tests/Application/config/packages/stof_doctrine_extensions.yaml b/tests/Application/config/packages/stof_doctrine_extensions.yaml deleted file mode 100644 index 7770f74e..00000000 --- a/tests/Application/config/packages/stof_doctrine_extensions.yaml +++ /dev/null @@ -1,4 +0,0 @@ -# Read the documentation: https://symfony.com/doc/current/bundles/StofDoctrineExtensionsBundle/index.html -# See the official DoctrineExtensions documentation for more details: https://github.com/Atlantic18/DoctrineExtensions/tree/master/doc/ -stof_doctrine_extensions: - default_locale: '%locale%' diff --git a/tests/Application/config/packages/sylius_state_machine_abstraction.yaml b/tests/Application/config/packages/sylius_state_machine_abstraction.yaml deleted file mode 100644 index 7f43c0b2..00000000 --- a/tests/Application/config/packages/sylius_state_machine_abstraction.yaml +++ /dev/null @@ -1,6 +0,0 @@ -parameters: - test_default_state_machine_adapter: 'symfony_workflow' - test_sylius_state_machine_adapter: '%env(string:default:test_default_state_machine_adapter:TEST_SYLIUS_STATE_MACHINE_ADAPTER)%' - -sylius_state_machine_abstraction: - default_adapter: '%test_sylius_state_machine_adapter%' diff --git a/tests/Application/config/packages/test/framework.yaml b/tests/Application/config/packages/test/framework.yaml deleted file mode 100644 index e71603ca..00000000 --- a/tests/Application/config/packages/test/framework.yaml +++ /dev/null @@ -1,11 +0,0 @@ -framework: - test: ~ - session: - storage_factory_id: session.storage.factory.mock_file - - mailer: - dsn: '%env(MAILER_DSN)%' - cache: - pools: - test.mailer_pool: - adapter: cache.adapter.filesystem diff --git a/tests/Application/config/packages/test/monolog.yaml b/tests/Application/config/packages/test/monolog.yaml deleted file mode 100644 index 7e2b9e3a..00000000 --- a/tests/Application/config/packages/test/monolog.yaml +++ /dev/null @@ -1,6 +0,0 @@ -monolog: - handlers: - main: - type: stream - path: "%kernel.logs_dir%/%kernel.environment%.log" - level: error diff --git a/tests/Application/config/packages/test/sylius_theme.yaml b/tests/Application/config/packages/test/sylius_theme.yaml deleted file mode 100644 index 4d34199f..00000000 --- a/tests/Application/config/packages/test/sylius_theme.yaml +++ /dev/null @@ -1,3 +0,0 @@ -sylius_theme: - sources: - test: ~ diff --git a/tests/Application/config/packages/test/web_profiler.yaml b/tests/Application/config/packages/test/web_profiler.yaml deleted file mode 100644 index 03752de2..00000000 --- a/tests/Application/config/packages/test/web_profiler.yaml +++ /dev/null @@ -1,6 +0,0 @@ -web_profiler: - toolbar: false - intercept_redirects: false - -framework: - profiler: { collect: false } diff --git a/tests/Application/config/packages/test_cached/doctrine.yaml b/tests/Application/config/packages/test_cached/doctrine.yaml deleted file mode 100644 index 49528606..00000000 --- a/tests/Application/config/packages/test_cached/doctrine.yaml +++ /dev/null @@ -1,16 +0,0 @@ -doctrine: - orm: - entity_managers: - default: - result_cache_driver: - type: memcached - host: localhost - port: 11211 - query_cache_driver: - type: memcached - host: localhost - port: 11211 - metadata_cache_driver: - type: memcached - host: localhost - port: 11211 diff --git a/tests/Application/config/packages/test_cached/framework.yaml b/tests/Application/config/packages/test_cached/framework.yaml deleted file mode 100644 index e9dd6eea..00000000 --- a/tests/Application/config/packages/test_cached/framework.yaml +++ /dev/null @@ -1,2 +0,0 @@ -imports: - - { resource: ../test/framework.yaml } diff --git a/tests/Application/config/packages/test_cached/monolog.yaml b/tests/Application/config/packages/test_cached/monolog.yaml deleted file mode 100644 index 7e2b9e3a..00000000 --- a/tests/Application/config/packages/test_cached/monolog.yaml +++ /dev/null @@ -1,6 +0,0 @@ -monolog: - handlers: - main: - type: stream - path: "%kernel.logs_dir%/%kernel.environment%.log" - level: error diff --git a/tests/Application/config/packages/test_cached/sylius_channel.yaml b/tests/Application/config/packages/test_cached/sylius_channel.yaml deleted file mode 100644 index bab83ef2..00000000 --- a/tests/Application/config/packages/test_cached/sylius_channel.yaml +++ /dev/null @@ -1,2 +0,0 @@ -sylius_channel: - debug: true diff --git a/tests/Application/config/packages/test_cached/sylius_theme.yaml b/tests/Application/config/packages/test_cached/sylius_theme.yaml deleted file mode 100644 index 4d34199f..00000000 --- a/tests/Application/config/packages/test_cached/sylius_theme.yaml +++ /dev/null @@ -1,3 +0,0 @@ -sylius_theme: - sources: - test: ~ diff --git a/tests/Application/config/packages/test_cached/twig.yaml b/tests/Application/config/packages/test_cached/twig.yaml deleted file mode 100644 index 8c6e0b40..00000000 --- a/tests/Application/config/packages/test_cached/twig.yaml +++ /dev/null @@ -1,2 +0,0 @@ -twig: - strict_variables: true diff --git a/tests/Application/config/packages/translation.yaml b/tests/Application/config/packages/translation.yaml deleted file mode 100644 index 1f4f9664..00000000 --- a/tests/Application/config/packages/translation.yaml +++ /dev/null @@ -1,8 +0,0 @@ -framework: - default_locale: '%locale%' - translator: - paths: - - '%kernel.project_dir%/translations' - fallbacks: - - '%locale%' - - 'en' diff --git a/tests/Application/config/packages/twig.yaml b/tests/Application/config/packages/twig.yaml deleted file mode 100644 index 8545473d..00000000 --- a/tests/Application/config/packages/twig.yaml +++ /dev/null @@ -1,12 +0,0 @@ -twig: - paths: ['%kernel.project_dir%/templates'] - debug: '%kernel.debug%' - strict_variables: '%kernel.debug%' - -services: - _defaults: - public: false - autowire: true - autoconfigure: true - - Twig\Extra\Intl\IntlExtension: ~ diff --git a/tests/Application/config/packages/validator.yaml b/tests/Application/config/packages/validator.yaml deleted file mode 100644 index a695e1a6..00000000 --- a/tests/Application/config/packages/validator.yaml +++ /dev/null @@ -1,3 +0,0 @@ -framework: - validation: - email_validation_mode: html5 diff --git a/tests/Application/config/packages/webpack_encore.yaml b/tests/Application/config/packages/webpack_encore.yaml deleted file mode 100644 index 23ddaa20..00000000 --- a/tests/Application/config/packages/webpack_encore.yaml +++ /dev/null @@ -1,7 +0,0 @@ -webpack_encore: - output_path: '%kernel.project_dir%/public/build/default' - builds: - shop: '%kernel.project_dir%/public/build/shop' - admin: '%kernel.project_dir%/public/build/admin' - app.admin: '%kernel.project_dir%/public/build/app/admin' - app.shop: '%kernel.project_dir%/public/build/app/shop' diff --git a/tests/Application/config/packages/workflow.yaml b/tests/Application/config/packages/workflow.yaml deleted file mode 100644 index 2a716ff0..00000000 --- a/tests/Application/config/packages/workflow.yaml +++ /dev/null @@ -1,2 +0,0 @@ -framework: - workflows: ~ diff --git a/tests/Application/config/routes.yaml b/tests/Application/config/routes.yaml deleted file mode 100644 index c93dbbec..00000000 --- a/tests/Application/config/routes.yaml +++ /dev/null @@ -1,9 +0,0 @@ -acme_sylius_example_shop: - resource: "@AcmeSyliusExamplePlugin/config/shop_routing.yaml" - prefix: /{_locale} - requirements: - _locale: ^[a-z]{2}(?:_[A-Z]{2})?$ - -acme_sylius_example_admin: - resource: "@AcmeSyliusExamplePlugin/config/admin_routing.yaml" - prefix: /admin diff --git a/tests/Application/config/routes/dev/web_profiler.yaml b/tests/Application/config/routes/dev/web_profiler.yaml deleted file mode 100644 index 3e79dc21..00000000 --- a/tests/Application/config/routes/dev/web_profiler.yaml +++ /dev/null @@ -1,7 +0,0 @@ -_wdt: - resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml" - prefix: /_wdt - -_profiler: - resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml" - prefix: /_profiler diff --git a/tests/Application/config/routes/liip_imagine.yaml b/tests/Application/config/routes/liip_imagine.yaml deleted file mode 100644 index 201cbd5d..00000000 --- a/tests/Application/config/routes/liip_imagine.yaml +++ /dev/null @@ -1,2 +0,0 @@ -_liip_imagine: - resource: "@LiipImagineBundle/Resources/config/routing.yaml" diff --git a/tests/Application/config/routes/sylius_admin.yaml b/tests/Application/config/routes/sylius_admin.yaml deleted file mode 100644 index b9c12c22..00000000 --- a/tests/Application/config/routes/sylius_admin.yaml +++ /dev/null @@ -1,3 +0,0 @@ -sylius_admin: - resource: "@SyliusAdminBundle/Resources/config/routing.yml" - prefix: '/%sylius_admin.path_name%' diff --git a/tests/Application/config/routes/sylius_api.yaml b/tests/Application/config/routes/sylius_api.yaml deleted file mode 100644 index a7504e86..00000000 --- a/tests/Application/config/routes/sylius_api.yaml +++ /dev/null @@ -1,3 +0,0 @@ -sylius_api: - resource: "@SyliusApiBundle/Resources/config/routing.yml" - prefix: "%sylius.security.api_route%" diff --git a/tests/Application/config/routes/sylius_shop.yaml b/tests/Application/config/routes/sylius_shop.yaml deleted file mode 100644 index 8e3dd427..00000000 --- a/tests/Application/config/routes/sylius_shop.yaml +++ /dev/null @@ -1,26 +0,0 @@ -sylius_shop: - resource: "@SyliusShopBundle/Resources/config/routing.yml" - prefix: /{_locale} - requirements: - _locale: ^[A-Za-z]{2,4}(_([A-Za-z]{4}|[0-9]{3}))?(_([A-Za-z]{2}|[0-9]{3}))?$ - -sylius_shop_payum: - resource: "@SyliusPayumBundle/Resources/config/routing/integrations/sylius_shop.yaml" - -sylius_payment_notify: - resource: "@SyliusPaymentBundle/Resources/config/routing/integrations/sylius.yaml" - -sylius_shop_default_locale: - path: / - methods: [GET] - defaults: - _controller: sylius_shop.controller.locale_switch::switchAction - -# see https://web.dev/change-password-url/ -sylius_shop_request_password_reset_token_redirect: - path: /.well-known/change-password - methods: [GET] - controller: Symfony\Bundle\FrameworkBundle\Controller\RedirectController::redirectAction - defaults: - route: sylius_shop_request_password_reset_token - permanent: false diff --git a/tests/Application/config/secrets/dev/.gitignore b/tests/Application/config/secrets/dev/.gitignore deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/Application/config/secrets/prod/.gitignore b/tests/Application/config/secrets/prod/.gitignore deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/Application/config/secrets/test/.gitignore b/tests/Application/config/secrets/test/.gitignore deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/Application/config/secrets/test_cached/.gitignore b/tests/Application/config/secrets/test_cached/.gitignore deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/Application/config/serialization/.gitignore b/tests/Application/config/serialization/.gitignore deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/Application/config/services.yaml b/tests/Application/config/services.yaml deleted file mode 100644 index 615506eb..00000000 --- a/tests/Application/config/services.yaml +++ /dev/null @@ -1,4 +0,0 @@ -# Put parameters here that don't need to change on each machine where the app is deployed -# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration -parameters: - locale: en_US diff --git a/tests/Application/config/services_test.yaml b/tests/Application/config/services_test.yaml deleted file mode 100644 index d072d897..00000000 --- a/tests/Application/config/services_test.yaml +++ /dev/null @@ -1,8 +0,0 @@ -imports: - - { resource: "../../../vendor/sylius/sylius/src/Sylius/Behat/Resources/config/services.xml" } - - { resource: "../../Behat/Resources/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' diff --git a/tests/Application/config/services_test_cached.yaml b/tests/Application/config/services_test_cached.yaml deleted file mode 100644 index 0de380ea..00000000 --- a/tests/Application/config/services_test_cached.yaml +++ /dev/null @@ -1,2 +0,0 @@ -imports: - - { resource: "services_test.yaml" } diff --git a/tests/Application/package.json b/tests/Application/package.json deleted file mode 100644 index b91df2a0..00000000 --- a/tests/Application/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "license": "UNLICENSED", - "scripts": { - "build": "encore dev", - "build:prod": "encore production", - "watch": "encore dev --watch" - }, - "dependencies": { - "@sylius-ui/admin": "file:../../vendor/sylius/sylius/src/Sylius/Bundle/AdminBundle", - "@sylius-ui/shop": "file:../../vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle", - "@symfony/ux-autocomplete": "file:../../vendor/symfony/ux-autocomplete/assets", - "@symfony/ux-live-component": "file:../../vendor/symfony/ux-live-component/assets" - }, - "devDependencies": { - "@hotwired/stimulus": "^3.0.0", - "@symfony/stimulus-bridge": "^3.2.0", - "@symfony/webpack-encore": "^5.0.1", - "tom-select": "^2.2.2" - } -} diff --git a/tests/Application/public/.htaccess b/tests/Application/public/.htaccess deleted file mode 100644 index 99ed00df..00000000 --- a/tests/Application/public/.htaccess +++ /dev/null @@ -1,25 +0,0 @@ -DirectoryIndex app.php - - - RewriteEngine On - - RewriteCond %{HTTP:Authorization} ^(.*) - RewriteRule .* - [e=HTTP_AUTHORIZATION:%1] - - RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$ - RewriteRule ^(.*) - [E=BASE:%1] - - RewriteCond %{ENV:REDIRECT_STATUS} ^$ - RewriteRule ^index\.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L] - - RewriteCond %{REQUEST_FILENAME} -f - RewriteRule .? - [L] - - RewriteRule .? %{ENV:BASE}/index.php [L] - - - - - RedirectMatch 302 ^/$ /index.php/ - - diff --git a/tests/Application/public/favicon.ico b/tests/Application/public/favicon.ico deleted file mode 100644 index 592f7a8e45d5ef6fe2a3c0426b5276e463480ba5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 32038 zcmeHQ4NO#5+NN=dA;z$#F^w_CnoZLsP17~T#Xl;F2&jmH2&jNc5hrj3LAj!gs&t%y8h&WqvL*7f{zp z4)@%9&(C|_bMAZI^S;kHI5@oL@H>a!|K0(=4;>Ev&cR_LiG66eFU9i;Jp0q1M(;mz zaM(HD!NJ|#aR0~k4i5jf%E94}xFtn=i142NFVY|%_s1~Id)y#t`KwdG&99urH=>+# z8zP)V^?RLjYQvl_)rZgFrsdveR0cX9m#)4WFIhPpFIh1ben9+e?fNHI+JYBw^RVwv z$lN49NL(3iI4)hmWHxVPa+I4(*y-8vlO^lIx%tRF$$R#iJCmjKB4H#?9pJ~#N8+dD z-XDYJmo)#0(p5}K_1cm14I8_1+x!n@DZPhA^D~#*wjE;U&#c_xlqg%H>Y*8O4jwIBRhZLjaaALh67Ft-CvemR&6_6*bz3L zzAx79bIw-!JTv6?etD%m_#^s`&sC(_8b|9!*-?D*&@{ze`<${{H$5WxL3f?;aJF1?zbuz`L-`v?sX(Vy86}eVs==C`|%K8 zyz&(d39?nMvTpj8)#&2Q_A%eOA-mmB?f{j6e6GnAZp_6NuMu%u&~Co~N8G?`BJ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j{p-tVyeB|XILYp z%NhG+tvOnz`+4*I#6LjS1wPcez61T4oKxpA-84>ReZ`#-M{-(ytoA+5=z9uWY~WPV zGTmikAJhlX+pXI-TD+Npj$pyp^wZs5ZhhFp#>>7TZVzf~{`ul!ZvHp|UANU!2`2@9P*+a9Cd8>NA^8{wgtbHR# zwS}zdUkf~wknJXA#mC3b!oC*lKQ*uCld*yQ3~$Yvp3TEjUCc5|_6_JlJvF!gzKos6 zS{(aAXW#yHO|j2E7a~j#5d1Oro;ZpqghzPnd*OX78vmx z;{PY4@}W_xjSPUC(B`!TO5cPzvix@JBAj_(@@yyK6Q+AfPsr9j6xHvuFz?A{VNY)y zupRin9f9|-Cw46#e$8~6J9p%>u@5;O`vRY``=5+^f`4H77MXLEez^?%DqNbC4=*kd zw+E-d_BVtz(=co%Z=7z3eb9lJ`&D$WB*6p_i~zg+z>q$}o&ZmF`>T5Xz8tnuDZw=m z{$VWT_CF~y=`&~NdmZCAhyByMwgAz^n?A#d@>ND{r+hfA@XjS;hS0C*{?ZTgqKb|i z_=b9jpWtHU1v# zgI)*htODm>P8bL0>wWIR?qh`gz?w0a=sSG*{3fI$n5tC8=7hwOwR-G0!Fh7=?PTmj z-gnjgc=C-N_m=ttd&z@R%e}QkCUWsJIFDcen3-@(`QL_j*o%(!!M1$-Urr-E3G-ft z(gIfKZD>1f1J-`?^4oVG10Nobj(ausvjZ!|AD{X*qy_eKJ7j&W?AC$Mx1l|@v;k)U dEVL!xyFC9{-^#oGwy(dr=K;LC|IgyU{{uV>Qo;ZL diff --git a/tests/Application/public/index.php b/tests/Application/public/index.php deleted file mode 100644 index af4ad7e6..00000000 --- a/tests/Application/public/index.php +++ /dev/null @@ -1,29 +0,0 @@ -handle($request); -$response->send(); -$kernel->terminate($request, $response); diff --git a/tests/Application/public/robots.txt b/tests/Application/public/robots.txt deleted file mode 100644 index 214e4119..00000000 --- a/tests/Application/public/robots.txt +++ /dev/null @@ -1,4 +0,0 @@ -# www.robotstxt.org/ -# www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156449 - -User-agent: * diff --git a/tests/Application/src/Entity/.gitignore b/tests/Application/src/Entity/.gitignore deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/Application/templates/.gitignore b/tests/Application/templates/.gitignore deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/Application/translations/.gitignore b/tests/Application/translations/.gitignore deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/Application/var/.gitignore b/tests/Application/var/.gitignore deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/Application/webpack.config.js b/tests/Application/webpack.config.js deleted file mode 100644 index b19eb22b..00000000 --- a/tests/Application/webpack.config.js +++ /dev/null @@ -1,48 +0,0 @@ -const path = require('path'); -const Encore = require('@symfony/webpack-encore'); - -const SyliusAdmin = require('@sylius-ui/admin'); -const SyliusShop = require('@sylius-ui/shop'); - -// Admin config -const adminConfig = SyliusAdmin.getWebpackConfig(path.resolve(__dirname)); - -// Shop config -const shopConfig = SyliusShop.getWebpackConfig(path.resolve(__dirname)); - -// App shop config -Encore - .setOutputPath('public/build/app/shop') - .setPublicPath('/build/app/shop') - .addEntry('app-shop-entry', './assets/shop/entrypoint.js') - .disableSingleRuntimeChunk() - .cleanupOutputBeforeBuild() - .enableSourceMaps(!Encore.isProduction()) - .enableVersioning(Encore.isProduction()) - .enableSassLoader() -; - -const appShopConfig = Encore.getWebpackConfig(); - -appShopConfig.externals = Object.assign({}, appShopConfig.externals, { window: 'window', document: 'document' }); -appShopConfig.name = 'app.shop'; - -Encore.reset(); - -// App admin config -Encore - .setOutputPath('public/build/app/admin') - .setPublicPath('/build/app/admin') - .addEntry('app-admin-entry', './assets/admin/entrypoint.js') - .disableSingleRuntimeChunk() - .cleanupOutputBeforeBuild() - .enableSourceMaps(!Encore.isProduction()) - .enableVersioning(Encore.isProduction()) - .enableSassLoader(); - -const appAdminConfig = Encore.getWebpackConfig(); - -appAdminConfig.externals = Object.assign({}, appAdminConfig.externals, { window: 'window', document: 'document' }); -appAdminConfig.name = 'app.admin'; - -module.exports = [shopConfig, adminConfig, appShopConfig, appAdminConfig]; diff --git a/tests/TestApplication/.env b/tests/TestApplication/.env new file mode 100644 index 00000000..9318f904 --- /dev/null +++ b/tests/TestApplication/.env @@ -0,0 +1,5 @@ +DATABASE_URL=mysql://root:root@127.0.0.1/acme_sylius_example_plugin_%kernel.environment%?serverVersion=5.7 + +BUNDLES_TO_ENABLE="Acme\SyliusExamplePlugin\AcmeSyliusExamplePlugin" +CONFIGS_TO_IMPORT="@AcmeSyliusExamplePlugin/tests/TestApplication/config/config.yaml" +ROUTES_TO_IMPORT="@AcmeSyliusExamplePlugin/config/routes.yaml" diff --git a/tests/TestApplication/config/bundles.php b/tests/TestApplication/config/bundles.php new file mode 100644 index 00000000..b6251283 --- /dev/null +++ b/tests/TestApplication/config/bundles.php @@ -0,0 +1,4 @@ + Date: Thu, 26 Jun 2025 12:37:19 +0200 Subject: [PATCH 02/10] [Maintenance] Add TestApplication --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 54fba0ef..907f0fb0 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,8 @@ "description": "Acme example plugin for Sylius.", "keywords": [ "sylius", - "sylius-plugin" + "sylius-plugin", + "test-appication" ], "license": "MIT", "require": { From effdcae0e78fe412a5261f3f1c7a559330a116c6 Mon Sep 17 00:00:00 2001 From: PiotrSzymanski2000 Date: Fri, 27 Jun 2025 09:08:00 +0200 Subject: [PATCH 03/10] [Maintenance] build fix --- .github/workflows/build.yml | 12 +++---- behat.yml.dist | 37 ++++---------------- composer.json | 6 ++-- phpunit.xml.dist | 44 +++++++++++++++++------- tests/TestApplication/.env | 2 +- tests/TestApplication/config/config.yaml | 1 + 6 files changed, 49 insertions(+), 53 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4a24464d..2c73513b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -72,9 +72,9 @@ jobs: name: Run Chrome Headless run: google-chrome-stable --enable-automation --disable-background-networking --no-default-browser-check --no-first-run --disable-popup-blocking --disable-default-apps --allow-insecure-localhost --disable-translate --disable-extensions --no-sandbox --enable-features=Metal --headless --remote-debugging-port=9222 --window-size=2880,1800 --proxy-server='direct://' --proxy-bypass-list='*' http://127.0.0.1 > /dev/null 2>&1 & - - + - name: Run webserver - run: (symfony server:start --port=8080 --dir=public --daemon) + run: symfony server:start --port=8080 --daemon - name: Get Composer cache directory @@ -140,16 +140,16 @@ jobs: - name: Prepare test application assets run: | - (cd vendor/bin/console assets:install public -vvv) + (vendor/bin/console assets:install public -vvv) (cd vendor/sylius/test-application && yarn build:prod) - name: Prepare test application cache - run: (cd vendor/bin/console cache:warmup -vvv) + run: (vendor/bin/console cache:warmup -vvv) - name: Load fixtures in test application - run: (cd vendor/bin/console sylius:fixtures:load -n) + run: (vendor/bin/console sylius:fixtures:load -n) - name: Validate composer.json @@ -157,7 +157,7 @@ jobs: - name: Validate database schema - run: (cd vendor/bin/console doctrine:schema:validate) + run: (vendor/bin/console doctrine:schema:validate) - name: Run PHPStan diff --git a/behat.yml.dist b/behat.yml.dist index 40aaab03..fcd1c4ff 100644 --- a/behat.yml.dist +++ b/behat.yml.dist @@ -3,15 +3,8 @@ imports: - tests/Behat/Resources/suites.yml default: - formatters: - pretty: - verbose: true - paths: false - snippets: false - extensions: DMore\ChromeExtension\Behat\ServiceContainer\ChromeExtension: ~ - Robertfausk\Behat\PantherExtension: ~ FriendsOfBehat\MinkDebugExtension: directory: etc/build @@ -22,43 +15,25 @@ default: files_path: "%paths.base%/vendor/sylius/sylius/src/Sylius/Behat/Resources/fixtures/" base_url: "https://127.0.0.1:8080/" default_session: symfony - javascript_session: panther + javascript_session: chrome sessions: symfony: symfony: ~ - chromedriver: - chrome: - api_url: http://127.0.0.1:9222 - validate_certificate: false - chrome_headless_second_session: + chrome: chrome: api_url: http://127.0.0.1:9222 validate_certificate: false - panther: - panther: - options: - webServerDir: '%paths.base%/tests/Application/public' - manager_options: - connection_timeout_in_ms: 5000 - request_timeout_in_ms: 120000 - chromedriver_arguments: - - --log-path=etc/build/chromedriver.log - - --verbose - capabilities: - acceptSslCerts: true - acceptInsecureCerts: true - unexpectedAlertBehaviour: accept show_auto: false FriendsOfBehat\SymfonyExtension: - bootstrap: tests/Application/config/bootstrap.php + bootstrap: vendor/sylius/test-application/config/bootstrap.php kernel: - class: Tests\Acme\SyliusExamplePlugin\Application\Kernel + class: Sylius\TestApplication\Kernel FriendsOfBehat\VariadicExtension: ~ + SyliusLabs\SuiteTagsExtension: ~ + FriendsOfBehat\SuiteSettingsExtension: paths: - "features" - - SyliusLabs\SuiteTagsExtension: ~ diff --git a/composer.json b/composer.json index 907f0fb0..8781305a 100644 --- a/composer.json +++ b/composer.json @@ -42,7 +42,8 @@ "symfony/http-client": "^6.4 || ^7.1", "symfony/intl": "^6.4 || ^7.1", "symfony/web-profiler-bundle": "^6.4 || ^7.1", - "symfony/webpack-encore-bundle": "^2.2" + "symfony/webpack-encore-bundle": "^2.2", + "symfony/runtime": "^6.4" }, "config": { "sort-packages": true, @@ -50,7 +51,8 @@ "dealerdirect/phpcodesniffer-composer-installer": false, "php-http/discovery": false, "phpstan/extension-installer": true, - "symfony/flex": true + "symfony/flex": true, + "symfony/runtime": true } }, "extra": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 042a638d..4f3b3181 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,22 +1,40 @@ - + + + + + + + + + + - + tests - - - + + tests/Unit + - - + + tests/Functional + - - - + + tests/Integration + + + + tests/Functional + tests/Integration + + diff --git a/tests/TestApplication/.env b/tests/TestApplication/.env index 9318f904..1b3a0d91 100644 --- a/tests/TestApplication/.env +++ b/tests/TestApplication/.env @@ -2,4 +2,4 @@ DATABASE_URL=mysql://root:root@127.0.0.1/acme_sylius_example_plugin_%kernel.envi BUNDLES_TO_ENABLE="Acme\SyliusExamplePlugin\AcmeSyliusExamplePlugin" CONFIGS_TO_IMPORT="@AcmeSyliusExamplePlugin/tests/TestApplication/config/config.yaml" -ROUTES_TO_IMPORT="@AcmeSyliusExamplePlugin/config/routes.yaml" +ROUTES_TO_IMPORT="@AcmeSyliusExamplePlugin/config/shop_routing.yaml" diff --git a/tests/TestApplication/config/config.yaml b/tests/TestApplication/config/config.yaml index 195d483c..0248de5f 100644 --- a/tests/TestApplication/config/config.yaml +++ b/tests/TestApplication/config/config.yaml @@ -1,5 +1,6 @@ imports: - { resource: "@AcmeSyliusExamplePlugin/config/config.yaml" } + - { resource: "services_test.php" } twig: paths: From 374b184c5203d31a2e2c97e3e125dc3c926317e1 Mon Sep 17 00:00:00 2001 From: PiotrSzymanski2000 Date: Fri, 27 Jun 2025 09:10:20 +0200 Subject: [PATCH 04/10] [Maintenance] build fix --- tests/TestApplication/config/services_test.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/TestApplication/config/services_test.php diff --git a/tests/TestApplication/config/services_test.php b/tests/TestApplication/config/services_test.php new file mode 100644 index 00000000..6eaf02e9 --- /dev/null +++ b/tests/TestApplication/config/services_test.php @@ -0,0 +1,14 @@ +import('../../../vendor/sylius/sylius/src/Sylius/Behat/Resources/config/services.xml'); + $container->import('@AcmeSyliusExamplePlugin/tests/Behat/Resources/services.xml'); + } +}; From 1cb622a33bd8d0f15829a09dcbf899e333f0e393 Mon Sep 17 00:00:00 2001 From: PiotrSzymanski2000 Date: Fri, 27 Jun 2025 09:13:16 +0200 Subject: [PATCH 05/10] [Maintenance] build fix --- tests/Functional/.gitignore | 0 tests/Integration/.gitignore | 0 tests/Unit/.gitignore | 0 3 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 tests/Functional/.gitignore create mode 100644 tests/Integration/.gitignore create mode 100644 tests/Unit/.gitignore diff --git a/tests/Functional/.gitignore b/tests/Functional/.gitignore new file mode 100644 index 00000000..e69de29b diff --git a/tests/Integration/.gitignore b/tests/Integration/.gitignore new file mode 100644 index 00000000..e69de29b diff --git a/tests/Unit/.gitignore b/tests/Unit/.gitignore new file mode 100644 index 00000000..e69de29b From 9b036d28f9ed298b07badc0682db542fe47cd957 Mon Sep 17 00:00:00 2001 From: PiotrSzymanski2000 Date: Fri, 27 Jun 2025 09:18:51 +0200 Subject: [PATCH 06/10] [Maintenance] build fix --- .github/workflows/build.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2c73513b..637be8d9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -175,11 +175,13 @@ jobs: name: Run Behat run: vendor/bin/behat --colors --strict -vvv --no-interaction -f progress || vendor/bin/behat --colors --strict -vvv --no-interaction -f progress --rerun - - + - name: Upload Behat logs uses: actions/upload-artifact@v4 if: failure() with: - name: Behat logs + name: "Behat logs - ${{ matrix.sylius }}-${{ github.run_id }}-${{ github.run_number }}" path: etc/build/ if-no-files-found: ignore + compression-level: 6 + overwrite: true From 9aa1de32999adf52e51044c71a85c011e2e9e20f Mon Sep 17 00:00:00 2001 From: PiotrSzymanski2000 Date: Fri, 27 Jun 2025 09:45:24 +0200 Subject: [PATCH 07/10] [Maintenance] build fix --- .github/workflows/build.yml | 100 ++++++++++++++++-------------------- 1 file changed, 45 insertions(+), 55 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 637be8d9..116d5de1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,31 +29,31 @@ jobs: env: APP_ENV: test DATABASE_URL: "mysql://root:root@127.0.0.1/sylius?serverVersion=${{ matrix.mysql }}" - + steps: - uses: actions/checkout@v4 - + - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: "${{ matrix.php }}" extensions: intl - tools: flex,symfony + tools: flex, symfony coverage: none - + - name: Setup Node uses: actions/setup-node@v4 with: node-version: "${{ matrix.node }}" - + - name: Shutdown default MySQL run: sudo service mysql stop - - + - name: Setup MySQL uses: mirromutth/mysql-action@v1.1 with: @@ -63,24 +63,16 @@ jobs: - name: Output PHP version for Symfony CLI run: php -v | head -n 1 | awk '{ print $2 }' > .php-version - + - name: Install certificates run: symfony server:ca:install - - - - name: Run Chrome Headless - run: google-chrome-stable --enable-automation --disable-background-networking --no-default-browser-check --no-first-run --disable-popup-blocking --disable-default-apps --allow-insecure-localhost --disable-translate --disable-extensions --no-sandbox --enable-features=Metal --headless --remote-debugging-port=9222 --window-size=2880,1800 --proxy-server='direct://' --proxy-bypass-list='*' http://127.0.0.1 > /dev/null 2>&1 & - - - - name: Run webserver - run: symfony server:start --port=8080 --daemon - + - name: Get Composer cache directory id: composer-cache run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - + - name: Cache Composer uses: actions/cache@v4 @@ -89,35 +81,33 @@ jobs: key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json **/composer.lock') }} restore-keys: | ${{ runner.os }}-php-${{ matrix.php }}-composer- - - - - name: Configure global composer - run: | - composer global config --no-plugins allow-plugins.symfony/flex true - composer global require --no-progress --no-scripts --no-plugins "symfony/flex:^2.2.2" - + - name: Restrict Symfony version if: matrix.symfony != '' run: | + composer global config --no-plugins allow-plugins.symfony/flex true + composer global require --no-progress --no-scripts --no-plugins "symfony/flex:^2.4" 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 - env: - SYMFONY_REQUIRE: ${{ matrix.symfony }} - + + - + name: Run unit tests + run: vendor/bin/phpunit --colors=always --testsuite=unit + - name: Get Yarn cache directory id: yarn-cache run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - + - name: Cache Yarn uses: actions/cache@v4 @@ -126,11 +116,11 @@ jobs: key: ${{ runner.os }}-node-${{ matrix.node }}-yarn-${{ hashFiles('**/package.json **/yarn.lock') }} restore-keys: | ${{ runner.os }}-node-${{ matrix.node }}-yarn- - + - name: Install JS dependencies run: (cd vendor/sylius/test-application && yarn install) - + - name: Prepare test application database run: | @@ -140,42 +130,42 @@ jobs: - name: Prepare test application assets run: | - (vendor/bin/console assets:install public -vvv) - (cd vendor/sylius/test-application && yarn build:prod) - + vendor/bin/console assets:install -vvv + (cd vendor/sylius/test-application && yarn build) + - name: Prepare test application cache - run: (vendor/bin/console cache:warmup -vvv) - + run: vendor/bin/console cache:warmup -vvv + - name: Load fixtures in test application - run: (vendor/bin/console sylius:fixtures:load -n) - + run: vendor/bin/console sylius:fixtures:load -n - name: Validate composer.json run: composer validate --ansi --strict - + - - name: Validate database schema - run: (vendor/bin/console doctrine:schema:validate) - + name: Validate container + run: vendor/bin/console lint:container + - - name: Run PHPStan - run: vendor/bin/phpstan analyse -c phpstan.neon -l max src/ - + name: Run Non-unit PHPUnit tests + run: vendor/bin/phpunit --colors=always --testsuite=non-unit + - - name: Run PHPSpec - run: vendor/bin/phpspec run --ansi -f progress --no-interaction - + name: Run Chrome Headless + run: google-chrome-stable --enable-automation --disable-background-networking --no-default-browser-check --no-first-run --disable-popup-blocking --disable-default-apps --allow-insecure-localhost --disable-translate --disable-extensions --no-sandbox --enable-features=Metal --headless --remote-debugging-port=9222 --window-size=2880,1800 --proxy-server='direct://' --proxy-bypass-list='*' http://127.0.0.1 > /dev/null 2>&1 & + - - name: Run PHPUnit - run: vendor/bin/phpunit --colors=always - + name: Run webserver + run: symfony server:start --port=8080 --daemon + - name: Run Behat - run: vendor/bin/behat --colors --strict -vvv --no-interaction -f progress || vendor/bin/behat --colors --strict -vvv --no-interaction -f progress --rerun - - - + run: | + vendor/bin/behat --colors --strict -vvv --no-interaction -f progress || vendor/bin/behat --colors --strict -vvv --no-interaction -f progress --rerun + + - name: Upload Behat logs uses: actions/upload-artifact@v4 if: failure() From a34414ad0f743cbf78f4772f74ced49220cc52ae Mon Sep 17 00:00:00 2001 From: PiotrSzymanski2000 Date: Fri, 27 Jun 2025 11:50:12 +0200 Subject: [PATCH 08/10] [Maintenance] cr fixes --- .github/workflows/build.yml | 9 ++++----- behat.yml.dist | 23 +++++++++++++++++++++++ composer.json | 5 ++--- src/AcmeSyliusExamplePlugin.php | 6 ------ tests/TestApplication/.env | 3 ++- tests/TestApplication/.env.test | 3 +++ tests/TestApplication/config/bundles.php | 1 + 7 files changed, 35 insertions(+), 15 deletions(-) create mode 100644 tests/TestApplication/.env.test diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 116d5de1..fc8acc4e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -53,7 +53,7 @@ jobs: name: Shutdown default MySQL run: sudo service mysql stop - - + - name: Setup MySQL uses: mirromutth/mysql-action@v1.1 with: @@ -89,7 +89,7 @@ jobs: composer global config --no-plugins allow-plugins.symfony/flex true composer global require --no-progress --no-scripts --no-plugins "symfony/flex:^2.4" composer config extra.symfony.require "${{ matrix.symfony }}" - + - name: Restrict Sylius version if: matrix.sylius != '' @@ -162,9 +162,8 @@ jobs: - name: Run Behat - run: | - vendor/bin/behat --colors --strict -vvv --no-interaction -f progress || vendor/bin/behat --colors --strict -vvv --no-interaction -f progress --rerun - + run: vendor/bin/behat --colors --strict -vvv --no-interaction -f progress || vendor/bin/behat --colors --strict -vvv --no-interaction -f progress --rerun + - name: Upload Behat logs uses: actions/upload-artifact@v4 diff --git a/behat.yml.dist b/behat.yml.dist index fcd1c4ff..8aa16219 100644 --- a/behat.yml.dist +++ b/behat.yml.dist @@ -3,8 +3,15 @@ imports: - tests/Behat/Resources/suites.yml default: + formatters: + pretty: + verbose: true + paths: false + snippets: false + extensions: DMore\ChromeExtension\Behat\ServiceContainer\ChromeExtension: ~ + Robertfausk\Behat\PantherExtension: ~ FriendsOfBehat\MinkDebugExtension: directory: etc/build @@ -23,6 +30,20 @@ default: chrome: api_url: http://127.0.0.1:9222 validate_certificate: false + panther: + panther: + options: + webServerDir: '%paths.base%/vendor/sylius/test-application/public' + manager_options: + connection_timeout_in_ms: 5000 + request_timeout_in_ms: 120000 + chromedriver_arguments: + - --log-path=etc/build/chromedriver.log + - --verbose + capabilities: + acceptSslCerts: true + acceptInsecureCerts: true + unexpectedAlertBehaviour: accept show_auto: false FriendsOfBehat\SymfonyExtension: @@ -37,3 +58,5 @@ default: FriendsOfBehat\SuiteSettingsExtension: paths: - "features" + + SyliusLabs\SuiteTagsExtension: ~ diff --git a/composer.json b/composer.json index 8781305a..74f49d7b 100644 --- a/composer.json +++ b/composer.json @@ -34,7 +34,7 @@ "sylius-labs/coding-standard": "^4.4", "sylius-labs/suite-tags-extension": "~0.2", "sylius/sylius-rector": "^2.0", - "sylius/test-application": "~2.0.0", + "sylius/test-application": "^2.0", "symfony/browser-kit": "^6.4 || ^7.1", "symfony/debug-bundle": "^6.4 || ^7.1", "symfony/dotenv": "^6.4 || ^7.1", @@ -63,7 +63,6 @@ "require": "^6.4" }, "public-dir": "vendor/sylius/test-application/public" - }, "autoload": { "psr-4": { @@ -71,6 +70,6 @@ "Tests\\Acme\\SyliusExamplePlugin\\": "tests/" } }, - "minimum-stability": "dev", + "minimum-stability": "alpha", "prefer-stable": true } diff --git a/src/AcmeSyliusExamplePlugin.php b/src/AcmeSyliusExamplePlugin.php index 0713f20a..7b076f6d 100644 --- a/src/AcmeSyliusExamplePlugin.php +++ b/src/AcmeSyliusExamplePlugin.php @@ -5,18 +5,12 @@ namespace Acme\SyliusExamplePlugin; use Sylius\Bundle\CoreBundle\Application\SyliusPluginTrait; -use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\HttpKernel\Bundle\Bundle; final class AcmeSyliusExamplePlugin extends Bundle { use SyliusPluginTrait; - public function build(ContainerBuilder $container): void - { - parent::build($container); - } - public function getPath(): string { return \dirname(__DIR__); diff --git a/tests/TestApplication/.env b/tests/TestApplication/.env index 1b3a0d91..11a98b3f 100644 --- a/tests/TestApplication/.env +++ b/tests/TestApplication/.env @@ -1,5 +1,6 @@ DATABASE_URL=mysql://root:root@127.0.0.1/acme_sylius_example_plugin_%kernel.environment%?serverVersion=5.7 -BUNDLES_TO_ENABLE="Acme\SyliusExamplePlugin\AcmeSyliusExamplePlugin" +BUNDLES_TO_ENABLE="" +TEST_APP_BUNDLES_PATH="tests/TestApplication/config/bundles.php" CONFIGS_TO_IMPORT="@AcmeSyliusExamplePlugin/tests/TestApplication/config/config.yaml" ROUTES_TO_IMPORT="@AcmeSyliusExamplePlugin/config/shop_routing.yaml" diff --git a/tests/TestApplication/.env.test b/tests/TestApplication/.env.test new file mode 100644 index 00000000..9d8188a8 --- /dev/null +++ b/tests/TestApplication/.env.test @@ -0,0 +1,3 @@ +DATABASE_URL=mysql://root:root@127.0.0.1/acme_sylius_example_plugin_%kernel.environment%?serverVersion=5.7 + +BUNDLES_TO_ENABLE="" diff --git a/tests/TestApplication/config/bundles.php b/tests/TestApplication/config/bundles.php index b6251283..f988bbbf 100644 --- a/tests/TestApplication/config/bundles.php +++ b/tests/TestApplication/config/bundles.php @@ -1,4 +1,5 @@ ['all' => true], ]; From 61ea75f848ac8fc3369293b791dbce0fef2815ed Mon Sep 17 00:00:00 2001 From: PiotrSzymanski2000 Date: Fri, 27 Jun 2025 12:00:22 +0200 Subject: [PATCH 09/10] [Maintenance] styles fix --- .github/workflows/build.yml | 43 +++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fc8acc4e..9d4cdf03 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,11 +29,11 @@ jobs: env: APP_ENV: test DATABASE_URL: "mysql://root:root@127.0.0.1/sylius?serverVersion=${{ matrix.mysql }}" - + steps: - uses: actions/checkout@v4 - + - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -42,7 +42,7 @@ jobs: extensions: intl tools: flex, symfony coverage: none - + - name: Setup Node uses: actions/setup-node@v4 @@ -63,16 +63,16 @@ jobs: - name: Output PHP version for Symfony CLI run: php -v | head -n 1 | awk '{ print $2 }' > .php-version - + - name: Install certificates run: symfony server:ca:install - + - name: Get Composer cache directory id: composer-cache run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - + - name: Cache Composer uses: actions/cache@v4 @@ -81,7 +81,7 @@ jobs: key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json **/composer.lock') }} restore-keys: | ${{ runner.os }}-php-${{ matrix.php }}-composer- - + - name: Restrict Symfony version if: matrix.symfony != '' @@ -94,20 +94,20 @@ jobs: 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 - + - name: Run unit tests run: vendor/bin/phpunit --colors=always --testsuite=unit - + - name: Get Yarn cache directory id: yarn-cache run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - + - name: Cache Yarn uses: actions/cache@v4 @@ -116,11 +116,11 @@ jobs: key: ${{ runner.os }}-node-${{ matrix.node }}-yarn-${{ hashFiles('**/package.json **/yarn.lock') }} restore-keys: | ${{ runner.os }}-node-${{ matrix.node }}-yarn- - + - name: Install JS dependencies run: (cd vendor/sylius/test-application && yarn install) - + - name: Prepare test application database run: | @@ -132,38 +132,39 @@ jobs: run: | vendor/bin/console assets:install -vvv (cd vendor/sylius/test-application && yarn build) - + - name: Prepare test application cache run: vendor/bin/console cache:warmup -vvv - + - name: Load fixtures in test application run: vendor/bin/console sylius:fixtures:load -n + - name: Validate composer.json run: composer validate --ansi --strict - + - name: Validate container run: vendor/bin/console lint:container - + - name: Run Non-unit PHPUnit tests run: vendor/bin/phpunit --colors=always --testsuite=non-unit - + - name: Run Chrome Headless run: google-chrome-stable --enable-automation --disable-background-networking --no-default-browser-check --no-first-run --disable-popup-blocking --disable-default-apps --allow-insecure-localhost --disable-translate --disable-extensions --no-sandbox --enable-features=Metal --headless --remote-debugging-port=9222 --window-size=2880,1800 --proxy-server='direct://' --proxy-bypass-list='*' http://127.0.0.1 > /dev/null 2>&1 & - + - name: Run webserver run: symfony server:start --port=8080 --daemon - + - name: Run Behat run: vendor/bin/behat --colors --strict -vvv --no-interaction -f progress || vendor/bin/behat --colors --strict -vvv --no-interaction -f progress --rerun - + - name: Upload Behat logs uses: actions/upload-artifact@v4 From e9cbb8eb455a483d8db911c645f8e6e6dfd2768a Mon Sep 17 00:00:00 2001 From: PiotrSzymanski2000 Date: Fri, 27 Jun 2025 12:01:06 +0200 Subject: [PATCH 10/10] [Maintenance] styles fix --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9d4cdf03..35533b94 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,7 +48,7 @@ jobs: uses: actions/setup-node@v4 with: node-version: "${{ matrix.node }}" - + - name: Shutdown default MySQL run: sudo service mysql stop