diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2c50179f..5d5d1f49 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -69,18 +69,10 @@ jobs: 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: (cd tests/Application && symfony server:start --port=8080 --dir=public --daemon) - - name: Get Composer cache directory id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Cache Composer @@ -133,27 +125,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:migrations:migrate -vvv) + vendor/bin/console doctrine:database:create -vvv + vendor/bin/console doctrine:migrations:migrate -vvv - name: Prepare test application assets run: | - (cd tests/Application && bin/console assets:install public -vvv) - (cd tests/Application && yarn prod) + vendor/bin/console assets:install -vvv + cd vendor/sylius/test-application && yarn encore dev - name: Prepare test application cache - run: (cd tests/Application && bin/console cache:warmup -vvv) + run: vendor/bin/console cache:warmup -vvv - name: Load fixtures in test application - run: (cd tests/Application && bin/console sylius:fixtures:load -n) + run: vendor/bin/console sylius:fixtures:load -n - name: Validate composer.json @@ -161,12 +153,20 @@ jobs: - name: Validate database schema - run: (cd tests/Application && bin/console doctrine:schema:validate) + run: vendor/bin/console doctrine:schema:validate - 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 webserver + run: symfony server:start --port=8080 --daemon + - name: Run PHPUnit run: vendor/bin/phpunit --colors=always diff --git a/.gitignore b/.gitignore index faa68809..ff7a0c20 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,8 @@ /behat.yml /phpunit.xml -tests/Application/yarn.lock + +/tests/TestApplication/.env.local +/tests/TestApplication/.env.*.local + +.phpunit.result.cache diff --git a/behat.yml.dist b/behat.yml.dist index 7c94ac13..ff76cdcd 100644 --- a/behat.yml.dist +++ b/behat.yml.dist @@ -32,9 +32,9 @@ default: show_auto: false FriendsOfBehat\SymfonyExtension: - bootstrap: tests/Application/config/bootstrap.php + bootstrap: vendor/sylius/test-application/config/bootstrap.php kernel: - class: Tests\Sylius\WishlistPlugin\Application\Kernel + class: Sylius\TestApplication\Kernel FriendsOfBehat\VariadicExtension: ~ diff --git a/composer.json b/composer.json index 83e9385d..5ac4bd04 100644 --- a/composer.json +++ b/composer.json @@ -24,6 +24,7 @@ "phpspec/phpspec": "^7.0", "phpunit/phpunit": "^9.5", "sylius/sylius-rector": "^2.0", + "sylius/test-application": "^2.0.0@alpha", "sylius-labs/coding-standard": "^4.4", "sylius-labs/suite-tags-extension": "~0.2", "symfony/browser-kit": "^6.4 || ^7.1", @@ -46,29 +47,30 @@ } }, "autoload-dev": { - "classmap": ["tests/Application/Kernel.php"], "psr-4": { "Sylius\\WishlistPlugin\\": "src/", "Tests\\Sylius\\WishlistPlugin\\": "tests/", - "Sylius\\Tests\\Api\\": ["vendor/sylius/sylius/tests/Api/"] + "Sylius\\Tests\\Api\\": "vendor/sylius/sylius/tests/Api/" } }, "config": { "allow-plugins": { "phpstan/extension-installer": true, - "composer/package-versions-deprecated": true, "dealerdirect/phpcodesniffer-composer-installer": true, "symfony/thanks": true, - "php-http/discovery": true + "php-http/discovery": true, + "symfony/flex": true, + "symfony/runtime": true }, "preferred-install": { "sylius/sylius": "source" } }, - "scripts": { - "auto-scripts": { - "cache:clear": "symfony-cmd", - "assets:install %PUBLIC_DIR%": "symfony-cmd" - } + "extra": { + "symfony": { + "allow-contrib": false, + "require": "^7.1" + }, + "public-dir": "vendor/sylius/test-application/public" } } diff --git a/config/config.yaml b/config/config.yaml index ec65e7da..4cd34756 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -1,2 +1,7 @@ imports: - { resource: "@SyliusWishlistPlugin/config/twig_hooks/**/*.yaml" } + +api_platform: + mapping: + paths: + - '%sylius_wishlist_api_platform_mapping_path%' diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 4c170f67..29fb4c49 100755 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,24 +1,17 @@ - - - - - - - + - - diff --git a/tests/Application/.env b/tests/Application/.env deleted file mode 100755 index f5f429c4..00000000 --- a/tests/Application/.env +++ /dev/null @@ -1,44 +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/sylius_wishlist_plugin_%kernel.environment% -###< doctrine/doctrine-bundle ### - -###> symfony/swiftmailer-bundle ### -# For Gmail as a transport, use: "gmail://username:password@localhost" -# For a generic SMTP server, use: "smtp://localhost:25?encryption=&auth_mode=" -# Delivery is disabled by default via "null://localhost" -MAILER_URL=smtp://localhost -###< symfony/swiftmailer-bundle ### - -###> symfony/messenger ### -# Choose one of the transports below -# MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages -# MESSENGER_TRANSPORT_DSN=doctrine://default -# MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages -MESSENGER_TRANSPORT_DSN=sync:// -###< symfony/messenger ### - -###> sylius/sylius >= 12.4 ### -SYLIUS_MESSENGER_TRANSPORT_MAIN_DSN=${MESSENGER_TRANSPORT_DSN} -SYLIUS_MESSENGER_TRANSPORT_MAIN_FAILED_DSN=${MESSENGER_TRANSPORT_DSN} -SYLIUS_MESSENGER_TRANSPORT_CATALOG_PROMOTION_REMOVAL_DSN=${MESSENGER_TRANSPORT_DSN} -SYLIUS_MESSENGER_TRANSPORT_CATALOG_PROMOTION_REMOVAL_FAILED_DSN=${MESSENGER_TRANSPORT_DSN} -###< sylius/sylius ### - -###> 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=YOUR_SECRET_PASSPHRASE -###< lexik/jwt-authentication-bundle ### diff --git a/tests/Application/.env.test b/tests/Application/.env.test deleted file mode 100755 index ebdff075..00000000 --- a/tests/Application/.env.test +++ /dev/null @@ -1,10 +0,0 @@ -APP_ENV=test -APP_SECRET='ch4mb3r0f5ecr3ts' - -KERNEL_CLASS='Tests\Sylius\WishlistPlugin\Application\Kernel' - -###> lexik/jwt-authentication-bundle ### -JWT_SECRET_KEY=%kernel.project_dir%/config/jwt/private-test.pem -JWT_PUBLIC_KEY=%kernel.project_dir%/config/jwt/public-test.pem -JWT_PASSPHRASE=ALL_THAT_IS_GOLD_DOES_NOT_GLITTER_NOT_ALL_THOSE_WHO_WANDER_ARE_LOST -###< lexik/jwt-authentication-bundle ### diff --git a/tests/Application/.eslintrc.js b/tests/Application/.eslintrc.js deleted file mode 100755 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 100755 index bc600a8c..00000000 --- a/tests/Application/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -/public/assets -/public/build -/public/css -/public/js -/public/media/* -!/public/media/image/ -/public/media/image/* -!/public/media/image/.gitignore - -/node_modules - -###> 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 ### diff --git a/tests/Application/Kernel.php b/tests/Application/Kernel.php deleted file mode 100755 index f1eaaea9..00000000 --- a/tests/Application/Kernel.php +++ /dev/null @@ -1,139 +0,0 @@ -getProjectDir() . '/var/cache/' . $this->environment; - } - - public function getLogDir(): string - { - return $this->getProjectDir() . '/var/log'; - } - - public function registerBundles(): iterable - { - foreach ($this->getConfigurationDirectories() as $confDir) { - $bundlesFile = $confDir . '/bundles.php'; - if (false === is_file($bundlesFile)) { - continue; - } - yield from $this->registerBundlesFromFile($bundlesFile); - } - - if (class_exists(winzouStateMachineBundle::class)) { - yield new winzouStateMachineBundle(); - } - } - - protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader): void - { - $container->addResource(new FileResource($this->getProjectDir() . '/config/bundles.php')); - $container->setParameter('container.dumper.inline_class_loader', true); - $confDir = $this->getProjectDir() . '/config'; - - $loader->load($confDir . '/{packages}/*' . self::CONFIG_EXTS, 'glob'); - $loader->load($confDir . '/{packages}/' . $this->environment . '/**/*' . self::CONFIG_EXTS, 'glob'); - $loader->load($confDir . '/{services}' . self::CONFIG_EXTS, 'glob'); - $loader->load($confDir . '/{services}_' . $this->environment . self::CONFIG_EXTS, 'glob'); - $loader->load($confDir . '/{api_resources}/*' . self::CONFIG_EXTS, 'glob'); - } - - protected function configureRoutes(RoutingConfigurator $routes): void - { - foreach ($this->getConfigurationDirectories() as $confDir) { - $this->loadRoutesConfiguration($routes, $confDir); - } - } - - private function loadRoutesConfiguration(RoutingConfigurator $routes, string $confDir): void - { - $routes->import($confDir . '/{routes}/*' . self::CONFIG_EXTS); - $routes->import($confDir . '/{routes}/' . $this->environment . '/**/*' . self::CONFIG_EXTS); - $routes->import($confDir . '/{routes}' . self::CONFIG_EXTS); - } - - protected function getContainerBaseClass(): string - { - if ($this->isTestEnvironment() && class_exists(MockerContainer::class)) { - return MockerContainer::class; - } - - return parent::getContainerBaseClass(); - } - - protected function getContainerLoader(ContainerInterface $container): DelegatingLoader - { - Assert::isInstanceOf($container, ContainerBuilder::class); - - $locator = new FileLocator($this); - $resolver = new LoaderResolver([ - new XmlFileLoader($container, $locator), - new YamlFileLoader($container, $locator), - new IniFileLoader($container, $locator), - new PhpFileLoader($container, $locator), - new GlobFileLoader($container, $locator), - new DirectoryLoader($container, $locator), - new ClosureLoader($container), - ]); - - return new DelegatingLoader($resolver); - } - - private function isTestEnvironment(): bool - { - return 0 === strpos($this->getEnvironment(), 'test'); - } - - /** - * @return BundleInterface[] - */ - private function registerBundlesFromFile(string $bundlesFile): iterable - { - $contents = require $bundlesFile; - foreach ($contents as $class => $envs) { - if (isset($envs['all']) || isset($envs[$this->environment])) { - yield new $class(); - } - } - } - - /** - * @return string[] - */ - private function getConfigurationDirectories(): iterable - { - yield $this->getProjectDir() . '/config'; - } -} diff --git a/tests/Application/assets/admin/entrypoint.js b/tests/Application/assets/admin/entrypoint.js deleted file mode 100644 index b5c678eb..00000000 --- a/tests/Application/assets/admin/entrypoint.js +++ /dev/null @@ -1 +0,0 @@ -import '../../../../assets/admin/entrypoint'; diff --git a/tests/Application/assets/shop/entrypoint.js b/tests/Application/assets/shop/entrypoint.js deleted file mode 100644 index 61b43535..00000000 --- a/tests/Application/assets/shop/entrypoint.js +++ /dev/null @@ -1 +0,0 @@ -import '../../../../assets/shop/entrypoint'; diff --git a/tests/Application/bin/console b/tests/Application/bin/console deleted file mode 100755 index 3fc0b017..00000000 --- a/tests/Application/bin/console +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env php -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 100755 index b113a830..00000000 --- a/tests/Application/composer.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "sylius/wishlist-plugin-test-application", - "description": "Sylius application for plugin testing purposes (composer.json needed for project dir resolving)", - "license": "MIT" -} diff --git a/tests/Application/config/api_platform/.gitkeep b/tests/Application/config/api_platform/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/Application/config/bootstrap.php b/tests/Application/config/bootstrap.php deleted file mode 100644 index 261e6cb2..00000000 --- a/tests/Application/config/bootstrap.php +++ /dev/null @@ -1,25 +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.'); -} else { - // load all the .env files - (new Dotenv())->loadEnv(dirname(__DIR__) . '/.env'); -} - -/** @phpstan-ignore-next-line */ -$_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']; -/** @phpstan-ignore-next-line */ -$_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 100755 index 8d06af1f..00000000 --- a/tests/Application/config/bundles.php +++ /dev/null @@ -1,66 +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], - Sylius\Bundle\ApiBundle\SyliusApiBundle::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], - Nelmio\Alice\Bridge\Symfony\NelmioAliceBundle::class => ['dev' => true, 'test' => true, 'test_cached' => true], - Fidry\AliceDataFixtures\Bridge\Symfony\FidryAliceDataFixturesBundle::class => ['dev' => true, 'test' => true, 'test_cached' => true], - Sylius\Behat\Application\SyliusTestPlugin\SyliusTestPlugin::class => ['test' => true, 'test_cached' => true], - Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle::class => ['all' => true], - SyliusLabs\DoctrineMigrationsExtraBundle\SyliusLabsDoctrineMigrationsExtraBundle::class => ['all' => true], - Sylius\WishlistPlugin\SyliusWishlistPlugin::class => ['all' => true], - Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true], - League\FlysystemBundle\FlysystemBundle::class => ['all' => true], - BabDev\PagerfantaBundle\BabDevPagerfantaBundle::class => ['all' => true], - Sylius\Abstraction\StateMachine\SyliusStateMachineAbstractionBundle::class => ['all' => true], - ApiPlatform\Symfony\Bundle\ApiPlatformBundle::class => ['all' => true], - Sylius\TwigHooks\SyliusTwigHooksBundle::class => ['all' => true], - Sylius\TwigExtra\Symfony\SyliusTwigExtraBundle::class => ['all' => true], - Symfony\UX\TwigComponent\TwigComponentBundle::class => ['all' => true], - Symfony\UX\Icons\UXIconsBundle::class => ['all' => true], - Symfony\UX\LiveComponent\LiveComponentBundle::class => ['all' => true], - Symfony\UX\Autocomplete\AutocompleteBundle::class => ['all' => true], - Symfony\UX\StimulusBundle\StimulusBundle::class => ['all' => true], -]; diff --git a/tests/Application/config/jwt/private-test.pem b/tests/Application/config/jwt/private-test.pem deleted file mode 100644 index 8403b2bb..00000000 --- a/tests/Application/config/jwt/private-test.pem +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN ENCRYPTED PRIVATE KEY----- -MIIFHDBOBgkqhkiG9w0BBQ0wQTApBgkqhkiG9w0BBQwwHAQIZXHBeD7QrP0CAggA -MAwGCCqGSIb3DQIJBQAwFAYIKoZIhvcNAwcECHpL59lxi6xIBIIEyPTTl+XDK2GQ -gtIl8tokhZY/trekkttcnLtK2vFDfFhdJFUvDlMi07c4qAzQ++uAV1YVXG6mLoQV -XJE34qQcIP++y9O3L4PWb21EILt3NUHuaIhJZg6vUPMo9uPi59ayqdPBND1lxhCf -uYFABseyx6cUVsEbwV3xfjm1ErMRf0CimgXkSEXUsBQQQgYBkfUB7YJan2z6nc22 -DJ5tRLMp+rbq7PilAPi4G1xc0rR7lCPmBsBYSyMdC+xZNbvt2E+cNp9gfXOls48+ -4oF3nIutqzYnTOWxJUtqPqqCZRTRFOfmrIdCMhWe6a5B/V6onrlB9K1cAfMqyHJU -JPxMdGdQ9l+IRH41a1fyZcnj9qMuW6d/RE6XyvHhfgYVa4K8Tlhw96wAKpfaEpJZ -d1/QJ+6joWvP3e4dwQcqP2pjuoi3C3E5lyMUyuQfS5+ESDYV4W+7+XHMN6sEsPgz -JkO6V6LLWiESX9Uh0VSkbC3+EZlogJg6gWBkY3HKoPa28qff4vtQ9uZu8mpnkxiu -imOtV1lsAhwaYzqt7YUgNA+UudIfvD1/+9n7RgCfvdKhkUXwYwhbR/h3N/py+Rob -xYoChra4QqyWP1qAv9BCA/we41/jVcYj1QaA93QFTr7q9ClcVAZ9tIvFOtye8qOQ -V/4nPxPT6rMd64Fr0c8WSTCZyRqfBHED5Xwtr6FX9fQPEazvzFem7w60zUnmpDa5 -YuroZtB8YYZYbgXwQV+LBTp3hLauuCQ+eCci9Iu48r7Ubkt+PnxrqM3Ho+PNRBYx -cLB9Wuvkdmg6ARlU9RwGs3PQV+3DD2tMBcv1hEwWDLXNt2ViObNeHPEh8q1W5Hn/ -wE4nHWjiMxb8eiMvFC6mUKAW8L2aDCiQOq502riUJGQ1/7xBG7fzsS4X+EZ2M0hv -3Xs+iZ09ALZSwxHwNZoddtRcfozUIWBWYFNhnvk97d8N/cWQIipORyVJZg6LGS8r -t8x6M+eknlGZmGCogu2CJ41Hz5imMC1YUiFp7w/VAiY/c3S8KyxMjeGmznPZicWz -mPzSpgj6hmXP3fhUob2jDe9LeHbHnsGTJKe6Nzgy0q/gh00ufM1W/CJj6pYpuAMU -ZMRDO2IUDo2iic5ZsMNENjTbeSMQw5W2FEzEO4Z71cNYT8EVLeDsPIgDFHdzTepH -pAVt+zG8CuOYWkcdv4VaDwHNkZ7IX2eiynt9dzKxPEFOd3GIe9nGiVlQIiyHejsu -AuPaHmh5RWFuwUBjcfkpP9OivWh/GU6i4n7wZrvc5QztRUBpJ9w8W33qsAJZSMLo -ssYqMmETTbNMkcEyoZdfsd5yfruC3PaxP1xb8s43+Rt+dn8kMKY4RXk+BcDlnvvR -oLr8tSlg0ANLP7EoLAJJY5pOl6Bj9AaDHOMvlqU5kFzc4XDfHe00xViGpnKsPHAB -n5hgHs3TeXgZJx5APvsiz45pK7fQdbr5aLCBUJoXcWSkDqC40KxzsK9CgTZ8RVOW -K4LLl1pWJGclC6pFzNVn9WUL/8JDJ4nKSe9qCsJc1VkKak1ysL/L/8uXC38aDywE -yyi/+awHdusoaNBrxsYmnxLA18o30/1GcA3dvUK9CvgjI+Nn9x1hj+q7ggvwaJkl -iEAEAXYRHjZbU6/bc3jrRg== ------END ENCRYPTED PRIVATE KEY----- diff --git a/tests/Application/config/jwt/public-test.pem b/tests/Application/config/jwt/public-test.pem deleted file mode 100644 index 45d01471..00000000 --- a/tests/Application/config/jwt/public-test.pem +++ /dev/null @@ -1,9 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAy/p9cUsDooQD3KL8x327 -UmqmNg1sKF09HXwap8SaQopsW9jUWAuC0569NvojJuvG+9mxSBTXNj48F6S/BLmE -PEYDtEGJtbB6Hw5Pb20TlLbOg0X6eCojUEXCdKnqhxO7JOVYQQPD5zzgzA5C7FsM -8x4rxwZbHFRLbjVVMCL/hu+RxQhRW5uGwDuRL2qFmV9hIo3AVMFcwGGFY10tt3m2 -9w4O7FQiu1JtdblP6b4IB/v10V/uLDVJHtmSP78Cln1w3Eb/4LcVxBbD61Ha3NGf -UByG2id54nsK4qnXmJCM7dFt6kHhcWKJcA0tnz0CPeWWLUZjE0F8Jhi+Rwe4+p2U -pQIDAQAB ------END PUBLIC KEY----- diff --git a/tests/Application/config/packages/_sylius.yaml b/tests/Application/config/packages/_sylius.yaml deleted file mode 100755 index 9cd95d9e..00000000 --- a/tests/Application/config/packages/_sylius.yaml +++ /dev/null @@ -1,38 +0,0 @@ -imports: - - { resource: "@SyliusCoreBundle/Resources/config/app/config.yml" } - - { resource: "@SyliusAdminBundle/Resources/config/app/config.yml" } - - { resource: "@SyliusShopBundle/Resources/config/app/config.yml" } - - { resource: "@SyliusApiBundle/Resources/config/app/config.yaml" } - - { resource: "@SyliusPayumBundle/Resources/config/app/config.yaml" } - -sylius_api: - enabled: true - -parameters: - sylius_core.public_dir: '%kernel.project_dir%/public' - 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_shop: - product_grid: - include_all_descendants: true - -sylius_state_machine_abstraction: - graphs_to_adapters_mapping: - sylius_refund_refund_payment: '%test_sylius_state_machine_adapter%' - -sylius_twig_hooks: - hooks: - 'sylius_admin.base#stylesheets': - app_styles: - template: 'admin/stylesheets.html.twig' - 'sylius_admin.base#javascripts': - app_javascripts: - template: 'admin/javascripts.html.twig' - - 'sylius_shop.base#stylesheets': - app_styles: - template: 'shop/stylesheets.html.twig' - 'sylius_shop.base#javascripts': - app_javascripts: - template: 'shop/javascripts.html.twig' diff --git a/tests/Application/config/packages/api_platform.yaml b/tests/Application/config/packages/api_platform.yaml deleted file mode 100644 index a3a47cec..00000000 --- a/tests/Application/config/packages/api_platform.yaml +++ /dev/null @@ -1,9 +0,0 @@ -api_platform: - mapping: - paths: - - '%kernel.project_dir%/../../config/api_platform' - - '%kernel.project_dir%/config/api_platform' - 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/cache.yaml b/tests/Application/config/packages/cache.yaml deleted file mode 100644 index 6e4a7f3a..00000000 --- a/tests/Application/config/packages/cache.yaml +++ /dev/null @@ -1,5 +0,0 @@ -framework: - cache: - pools: - test.mailer_pool: - adapter: cache.adapter.filesystem \ No newline at end of file diff --git a/tests/Application/config/packages/dev/framework.yaml b/tests/Application/config/packages/dev/framework.yaml deleted file mode 100755 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 100755 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 100755 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 100755 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 100755 index e5e4b2c3..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: '8.0' - 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 100755 index cdbc01ae..00000000 --- a/tests/Application/config/packages/doctrine_migrations.yaml +++ /dev/null @@ -1,4 +0,0 @@ -doctrine_migrations: - storage: - table_storage: - table_name: sylius_migrations diff --git a/tests/Application/config/packages/framework.yaml b/tests/Application/config/packages/framework.yaml deleted file mode 100755 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 20f1cb0c..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 100755 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/prod/doctrine.yaml b/tests/Application/config/packages/prod/doctrine.yaml deleted file mode 100755 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 100755 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 100755 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 100755 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 100755 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_wishlist_plugin.yaml b/tests/Application/config/packages/sylius_wishlist_plugin.yaml deleted file mode 100644 index 57cd6be6..00000000 --- a/tests/Application/config/packages/sylius_wishlist_plugin.yaml +++ /dev/null @@ -1,2 +0,0 @@ -imports: - - { resource: "@SyliusWishlistPlugin/config/config.yaml" } diff --git a/tests/Application/config/packages/test/framework.yaml b/tests/Application/config/packages/test/framework.yaml deleted file mode 100755 index fc1d3c13..00000000 --- a/tests/Application/config/packages/test/framework.yaml +++ /dev/null @@ -1,4 +0,0 @@ -framework: - test: ~ - session: - storage_factory_id: session.storage.factory.mock_file diff --git a/tests/Application/config/packages/test/monolog.yaml b/tests/Application/config/packages/test/monolog.yaml deleted file mode 100755 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 100755 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 100755 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 100755 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 100755 index fc1d3c13..00000000 --- a/tests/Application/config/packages/test_cached/framework.yaml +++ /dev/null @@ -1,4 +0,0 @@ -framework: - test: ~ - session: - storage_factory_id: session.storage.factory.mock_file diff --git a/tests/Application/config/packages/test_cached/monolog.yaml b/tests/Application/config/packages/test_cached/monolog.yaml deleted file mode 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 8ff7da13..00000000 --- a/tests/Application/config/packages/validator.yaml +++ /dev/null @@ -1,3 +0,0 @@ -framework: - validation: - enable_attributes: true 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/routes.yaml b/tests/Application/config/routes.yaml deleted file mode 100755 index 800a4e3b..00000000 --- a/tests/Application/config/routes.yaml +++ /dev/null @@ -1,2 +0,0 @@ -sylius_wishlist_plugin: - resource: "@SyliusWishlistPlugin/config/routes.yaml" diff --git a/tests/Application/config/routes/dev/twig.yaml b/tests/Application/config/routes/dev/twig.yaml deleted file mode 100755 index bcbbf13d..00000000 --- a/tests/Application/config/routes/dev/twig.yaml +++ /dev/null @@ -1,3 +0,0 @@ -_errors: - resource: '@FrameworkBundle/Resources/config/routing/errors.xml' - prefix: /_error diff --git a/tests/Application/config/routes/dev/web_profiler.yaml b/tests/Application/config/routes/dev/web_profiler.yaml deleted file mode 100755 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 100755 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 100755 index 1ba48d6c..00000000 --- a/tests/Application/config/routes/sylius_admin.yaml +++ /dev/null @@ -1,3 +0,0 @@ -sylius_admin: - resource: "@SyliusAdminBundle/Resources/config/routing.yml" - prefix: /admin diff --git a/tests/Application/config/routes/sylius_api.yaml b/tests/Application/config/routes/sylius_api.yaml deleted file mode 100644 index 36a542f9..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 100755 index 0d096a7a..00000000 --- a/tests/Application/config/routes/sylius_shop.yaml +++ /dev/null @@ -1,14 +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_shop_default_locale: - path: / - methods: [GET] - defaults: - _controller: sylius_shop.controller.locale_switch::switchAction diff --git a/tests/Application/config/services.yaml b/tests/Application/config/services.yaml deleted file mode 100755 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.yml b/tests/Application/config/services_test.yml deleted file mode 100644 index a925faa1..00000000 --- a/tests/Application/config/services_test.yml +++ /dev/null @@ -1,3 +0,0 @@ -imports: - - { resource: "../../Behat/Resources/services.yml" } - - { resource: "../../../vendor/sylius/sylius/src/Sylius/Behat/Resources/config/services.xml" } diff --git a/tests/Application/package.json b/tests/Application/package.json deleted file mode 100755 index 96d31839..00000000 --- a/tests/Application/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "license": "MIT", - "scripts": { - "build": "encore dev", - "build:prod": "encore production", - "watch": "encore dev --watch", - "prod": "yarn build:prod" - }, - "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 100755 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 100755 index 592f7a8e..00000000 Binary files a/tests/Application/public/favicon.ico and /dev/null differ diff --git a/tests/Application/public/index.php b/tests/Application/public/index.php deleted file mode 100755 index 98569059..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 100755 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/templates/admin/javascripts.html.twig b/tests/Application/templates/admin/javascripts.html.twig deleted file mode 100644 index f6071973..00000000 --- a/tests/Application/templates/admin/javascripts.html.twig +++ /dev/null @@ -1 +0,0 @@ -{{ encore_entry_script_tags('app-admin-entry', null, 'app.admin') }} diff --git a/tests/Application/templates/admin/stylesheets.html.twig b/tests/Application/templates/admin/stylesheets.html.twig deleted file mode 100644 index dc98d751..00000000 --- a/tests/Application/templates/admin/stylesheets.html.twig +++ /dev/null @@ -1 +0,0 @@ -{{ encore_entry_link_tags('app-admin-entry', null, 'app.admin') }} diff --git a/tests/Application/templates/shop/javascripts.html.twig b/tests/Application/templates/shop/javascripts.html.twig deleted file mode 100644 index a659c2c1..00000000 --- a/tests/Application/templates/shop/javascripts.html.twig +++ /dev/null @@ -1 +0,0 @@ -{{ encore_entry_script_tags('app-shop-entry', null, 'app.shop') }} diff --git a/tests/Application/templates/shop/stylesheets.html.twig b/tests/Application/templates/shop/stylesheets.html.twig deleted file mode 100644 index b439fca1..00000000 --- a/tests/Application/templates/shop/stylesheets.html.twig +++ /dev/null @@ -1 +0,0 @@ -{{ encore_entry_link_tags('app-shop-entry', null, 'app.shop') }} diff --git a/tests/Application/translations/.gitignore b/tests/Application/translations/.gitignore deleted file mode 100755 index e69de29b..00000000 diff --git a/tests/Application/webpack.config.js b/tests/Application/webpack.config.js deleted file mode 100644 index 5bbadcb0..00000000 --- a/tests/Application/webpack.config.js +++ /dev/null @@ -1,47 +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..60248623 --- /dev/null +++ b/tests/TestApplication/.env @@ -0,0 +1,5 @@ +DATABASE_URL=mysql://root@127.0.0.1/sylius_wishlist_%kernel.environment% + +BUNDLES_TO_ENABLE="Sylius\WishlistPlugin\SyliusWishlistPlugin" +CONFIGS_TO_IMPORT="@SyliusWishlistPlugin/tests/TestApplication/config/config.yaml" +ROUTES_TO_IMPORT="@SyliusWishlistPlugin/config/routes.yaml" diff --git a/tests/TestApplication/config/config.yaml b/tests/TestApplication/config/config.yaml new file mode 100644 index 00000000..b71b2d92 --- /dev/null +++ b/tests/TestApplication/config/config.yaml @@ -0,0 +1,6 @@ +imports: + - { resource: "@SyliusWishlistPlugin/config/config.yaml" } + - { resource: "services_test.php" } + +parameters: + sylius_wishlist_api_platform_mapping_path: '%kernel.project_dir%/../../../config/api_platform/' diff --git a/tests/TestApplication/config/services_test.php b/tests/TestApplication/config/services_test.php new file mode 100644 index 00000000..8ebb8ced --- /dev/null +++ b/tests/TestApplication/config/services_test.php @@ -0,0 +1,23 @@ +import('../../../vendor/sylius/sylius/src/Sylius/Behat/Resources/config/services.xml'); + $container->import('@SyliusWishlistPlugin/tests/Behat/Resources/services.yml'); + } +};