From c50076269ebe7a65cfa85473f68b1e135509a5b1 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 | 7 +++++++ config/bundles.php | 2 +- .../Symfony/{AdminUiBundle.php => SyliusAdminUiBundle.php} | 5 +---- 3 files changed, 9 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..2d501e24 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -14,6 +14,7 @@ jobs: fail-fast: false matrix: php: [ "8.1", "8.2", "8.3" ] + postgres: ["14.6"] symfony: [ "^6.4", "^7.0" ] exclude: - php: "8.1" @@ -21,6 +22,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 +69,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)) {