From 44339be65d3db0f8aae7e1ca885a64d69dad369c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Fr=C3=A9mont?= Date: Tue, 2 Jul 2024 09:18:55 +0200 Subject: [PATCH] Create testing database --- .github/workflows/ci.yaml | 6 ++++++ config/bundles.php | 2 +- .../Symfony/{AdminUiBundle.php => SyliusAdminUiBundle.php} | 5 +---- 3 files changed, 8 insertions(+), 5 deletions(-) rename src/AdminUi/src/Symfony/{AdminUiBundle.php => SyliusAdminUiBundle.php} (90%) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 65b8543e..66d72d3d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -21,6 +21,7 @@ jobs: name: "PHP ${{ matrix.php }} / Symfony ${{ matrix.symfony }}" env: APP_ENV: test + DATABASE_URL: "pgsql://postgres:postgres@127.0.0.1/sylius_stack?charset=utf8&serverVersion=${{ matrix.postgres }}" steps: - name: "Checkout" uses: actions/checkout@v3 @@ -67,6 +68,11 @@ jobs: - name: Run PHPStan run: vendor/bin/phpstan analyse + - name: Create Testing database + run: | + bin/console doctrine:database:create + bin/console doctrine:schema:create + - name: Run PHPUnit run: vendor/bin/phpunit diff --git a/config/bundles.php b/config/bundles.php index c6fe3999..e94a30a6 100644 --- a/config/bundles.php +++ b/config/bundles.php @@ -6,7 +6,7 @@ Symfony\UX\TwigComponent\TwigComponentBundle::class => ['all' => true], Sylius\TwigHooks\TwigHooksBundle::class => ['all' => true], Sylius\TwigExtra\Symfony\TwigExtraBundle::class => ['all' => true], - Sylius\AdminUi\Symfony\AdminUiBundle::class => ['all' => true], + Sylius\AdminUi\Symfony\SyliusAdminUiBundle::class => ['all' => true], Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true], Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true], Symfony\UX\LiveComponent\LiveComponentBundle::class => ['all' => true], diff --git a/src/AdminUi/src/Symfony/AdminUiBundle.php b/src/AdminUi/src/Symfony/SyliusAdminUiBundle.php similarity index 90% rename from src/AdminUi/src/Symfony/AdminUiBundle.php rename to src/AdminUi/src/Symfony/SyliusAdminUiBundle.php index 393a33b3..96ce17b4 100644 --- a/src/AdminUi/src/Symfony/AdminUiBundle.php +++ b/src/AdminUi/src/Symfony/SyliusAdminUiBundle.php @@ -9,11 +9,8 @@ use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; use Symfony\Component\HttpKernel\Bundle\AbstractBundle; -final class AdminUiBundle extends AbstractBundle +final class SyliusAdminUiBundle extends AbstractBundle { - /** @var string */ - protected string $name = 'SyliusAdminUi'; - public function getPath(): string { if (!isset($this->path)) {