diff --git a/.env b/.env index 09a703b..a8b47d9 100644 --- a/.env +++ b/.env @@ -7,4 +7,36 @@ MESSENGER_TRANSPORT_DSN="doctrine://default" MAILER_DSN="smtp://localhost:1025" DEFAULT_URI="http://localhost:8000" KAZ_API_USER= -KAZ_API_PASSWORD= \ No newline at end of file +KAZ_API_PASSWORD= +###> symfony/framework-bundle ### +APP_ENV=dev +APP_SECRET= +APP_SHARE_DIR=var/share +###< symfony/framework-bundle ### + +###> symfony/routing ### +# Configure how to generate URLs in non-HTTP contexts, such as CLI commands. +# See https://symfony.com/doc/current/routing.html#generating-urls-in-commands +DEFAULT_URI=http://localhost +###< symfony/routing ### + +###> doctrine/doctrine-bundle ### +# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url +# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml +# +# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data_%kernel.environment%.db" +# DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=8.0.32&charset=utf8mb4" +# DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=10.11.2-MariaDB&charset=utf8mb4" +DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=16&charset=utf8" +###< doctrine/doctrine-bundle ### + +###> symfony/messenger ### +# Choose one of the transports below +# MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages +# MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages +MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0 +###< symfony/messenger ### + +###> symfony/mailer ### +MAILER_DSN=null://null +###< symfony/mailer ### diff --git a/.gitignore b/.gitignore index 1753b28..7474f55 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,18 @@ yarn-error.log /public/assets/ /assets/vendor/ ###< symfony/asset-mapper ### + +###> symfony/framework-bundle ### +/.env.local +/.env.local.php +/.env.*.local +/config/secrets/prod/prod.decrypt.private.php +/public/bundles/ +/var/ +/vendor/ +###< symfony/framework-bundle ### + +###> phpunit/phpunit ### +/phpunit.xml +/.phpunit.cache/ +###< phpunit/phpunit ### diff --git a/assets/stimulus_bootstrap.js b/assets/stimulus_bootstrap.js index c26293e..d0bf4cb 100644 --- a/assets/stimulus_bootstrap.js +++ b/assets/stimulus_bootstrap.js @@ -1,3 +1,6 @@ +import { startStimulusApp } from '@symfony/stimulus-bundle'; + +const app = startStimulusApp(); import { startStimulusApp } from '@symfony/stimulus-bridge'; // Registers Stimulus controllers from controllers.json and in the controllers/ directory diff --git a/assets/styles/app.css b/assets/styles/app.css index bd6213e..0434219 100644 --- a/assets/styles/app.css +++ b/assets/styles/app.css @@ -1,3 +1,5 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; \ No newline at end of file +@import "tailwindcss"; + +body { + background-color: bg-slate-100; +} \ No newline at end of file diff --git a/compose.yaml b/compose.yaml index 346b51c..2e5a766 100644 --- a/compose.yaml +++ b/compose.yaml @@ -26,5 +26,28 @@ services: MP_SMTP_AUTH_ACCEPT_ANY: 1 MP_SMTP_AUTH_ALLOW_INSECURE: 1 +###> doctrine/doctrine-bundle ### + database: + image: postgres:${POSTGRES_VERSION:-16}-alpine + environment: + POSTGRES_DB: ${POSTGRES_DB:-app} + # You should definitely change the password in production + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-!ChangeMe!} + POSTGRES_USER: ${POSTGRES_USER:-app} + healthcheck: + test: ["CMD", "pg_isready", "-d", "${POSTGRES_DB:-app}", "-U", "${POSTGRES_USER:-app}"] + timeout: 5s + retries: 5 + start_period: 60s + volumes: + - database_data:/var/lib/postgresql/data:rw + # You may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data! + # - ./docker/db/data:/var/lib/postgresql/data:rw +###< doctrine/doctrine-bundle ### + volumes: database_data: + +###> doctrine/doctrine-bundle ### + database_data: +###< doctrine/doctrine-bundle ### diff --git a/composer.json b/composer.json index c7011b9..c1fd17e 100644 --- a/composer.json +++ b/composer.json @@ -41,7 +41,6 @@ "symfony/ux-turbo": "^2.32", "symfony/validator": "8.0.*", "symfony/web-link": "8.0.*", - "symfony/webpack-encore-bundle": "^2.4", "symfony/yaml": "8.0.*", "symfonycasts/tailwind-bundle": "^0.12.0", "twig/extra-bundle": "^2.12|^3.0", diff --git a/composer.lock b/composer.lock index 1f66794..7d7666c 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "b2f5377481dc83317c4b7c49f2dd183e", + "content-hash": "bc53a345dda69084bc7dbf18b03f3d9d", "packages": [ { "name": "composer/semver", @@ -7480,82 +7480,6 @@ ], "time": "2026-01-01T23:07:29+00:00" }, - { - "name": "symfony/webpack-encore-bundle", - "version": "v2.4.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/webpack-encore-bundle.git", - "reference": "5b932e0feddd81aaf0ecd7d5fcd2e450e5a7817e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/webpack-encore-bundle/zipball/5b932e0feddd81aaf0ecd7d5fcd2e450e5a7817e", - "reference": "5b932e0feddd81aaf0ecd7d5fcd2e450e5a7817e", - "shasum": "" - }, - "require": { - "php": ">=8.1.0", - "symfony/asset": "^5.4 || ^6.2 || ^7.0 || ^8.0", - "symfony/config": "^5.4 || ^6.2 || ^7.0 || ^8.0", - "symfony/dependency-injection": "^5.4 || ^6.2 || ^7.0 || ^8.0", - "symfony/http-kernel": "^5.4 || ^6.2 || ^7.0 || ^8.0", - "symfony/service-contracts": "^1.1.9 || ^2.1.3 || ^3.0" - }, - "require-dev": { - "symfony/framework-bundle": "^5.4 || ^6.2 || ^7.0 || ^8.0", - "symfony/http-client": "^5.4 || ^6.2 || ^7.0 || ^8.0", - "symfony/phpunit-bridge": "^5.4 || ^6.2 || ^7.0 || ^8.0", - "symfony/twig-bundle": "^5.4 || ^6.2 || ^7.0 || ^8.0", - "symfony/web-link": "^5.4 || ^6.2 || ^7.0 || ^8.0" - }, - "type": "symfony-bundle", - "extra": { - "thanks": { - "url": "https://github.com/symfony/webpack-encore", - "name": "symfony/webpack-encore" - } - }, - "autoload": { - "psr-4": { - "Symfony\\WebpackEncoreBundle\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Integration of your Symfony app with Webpack Encore", - "support": { - "issues": "https://github.com/symfony/webpack-encore-bundle/issues", - "source": "https://github.com/symfony/webpack-encore-bundle/tree/v2.4.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2025-11-27T13:41:46+00:00" - }, { "name": "symfony/yaml", "version": "v8.0.1", diff --git a/config/bundles.php b/config/bundles.php index 083a65f..7996d0c 100644 --- a/config/bundles.php +++ b/config/bundles.php @@ -11,7 +11,6 @@ return [ Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true], Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true], Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true], - Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true], Symfony\UX\StimulusBundle\StimulusBundle::class => ['all' => true], Symfony\UX\Turbo\TurboBundle::class => ['all' => true], Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true], diff --git a/config/packages/webpack_encore.yaml b/config/packages/webpack_encore.yaml deleted file mode 100644 index 4c009ee..0000000 --- a/config/packages/webpack_encore.yaml +++ /dev/null @@ -1,45 +0,0 @@ -webpack_encore: - # The path where Encore is building the assets - i.e. Encore.setOutputPath() - output_path: '%kernel.project_dir%/public/build' - # If multiple builds are defined (as shown below), you can disable the default build: - # output_path: false - - # Set attributes that will be rendered on all script and link tags - script_attributes: - defer: true - # Uncomment (also under link_attributes) if using Turbo Drive - # https://turbo.hotwired.dev/handbook/drive#reloading-when-assets-change - # 'data-turbo-track': reload - # link_attributes: - # Uncomment if using Turbo Drive - # 'data-turbo-track': reload - - # If using Encore.enableIntegrityHashes() and need the crossorigin attribute (default: false, or use 'anonymous' or 'use-credentials') - # crossorigin: 'anonymous' - - # Preload all rendered script and link tags automatically via the HTTP/2 Link header - # preload: true - - # Throw an exception if the entrypoints.json file is missing or an entry is missing from the data - # strict_mode: false - - # If you have multiple builds: - # builds: - # frontend: '%kernel.project_dir%/public/frontend/build' - - # pass the build name as the 3rd argument to the Twig functions - # {{ encore_entry_script_tags('entry1', null, 'frontend') }} - -framework: - assets: - json_manifest_path: '%kernel.project_dir%/public/build/manifest.json' - -#when@prod: -# webpack_encore: -# # Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes) -# # Available in version 1.2 -# cache: true - -#when@test: -# webpack_encore: -# strict_mode: false diff --git a/config/reference.php b/config/reference.php index 6bd5b62..b41219b 100644 --- a/config/reference.php +++ b/config/reference.php @@ -1441,16 +1441,6 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param; * generate_final_classes?: bool|Param, // Default: true * generate_final_entities?: bool|Param, // Default: false * } - * @psalm-type WebpackEncoreConfig = array{ - * output_path: scalar|Param|null, // The path where Encore is building the assets - i.e. Encore.setOutputPath() - * crossorigin?: false|"anonymous"|"use-credentials"|Param, // crossorigin value when Encore.enableIntegrityHashes() is used, can be false (default), anonymous or use-credentials // Default: false - * preload?: bool|Param, // preload all rendered script and link tags automatically via the http2 Link header. // Default: false - * cache?: bool|Param, // Enable caching of the entry point file(s) // Default: false - * strict_mode?: bool|Param, // Throw an exception if the entrypoints.json file is missing or an entry is missing from the data // Default: true - * builds?: array, - * script_attributes?: array, - * link_attributes?: array, - * } * @psalm-type StimulusConfig = array{ * controller_paths?: list, * controllers_json?: scalar|Param|null, // Default: "%kernel.project_dir%/assets/controllers.json" @@ -1485,7 +1475,6 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param; * twig_extra?: TwigExtraConfig, * security?: SecurityConfig, * monolog?: MonologConfig, - * webpack_encore?: WebpackEncoreConfig, * stimulus?: StimulusConfig, * turbo?: TurboConfig, * symfonycasts_tailwind?: SymfonycastsTailwindConfig, @@ -1503,7 +1492,6 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param; * security?: SecurityConfig, * monolog?: MonologConfig, * maker?: MakerConfig, - * webpack_encore?: WebpackEncoreConfig, * stimulus?: StimulusConfig, * turbo?: TurboConfig, * symfonycasts_tailwind?: SymfonycastsTailwindConfig, @@ -1519,7 +1507,6 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param; * twig_extra?: TwigExtraConfig, * security?: SecurityConfig, * monolog?: MonologConfig, - * webpack_encore?: WebpackEncoreConfig, * stimulus?: StimulusConfig, * turbo?: TurboConfig, * symfonycasts_tailwind?: SymfonycastsTailwindConfig, @@ -1536,7 +1523,6 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param; * twig_extra?: TwigExtraConfig, * security?: SecurityConfig, * monolog?: MonologConfig, - * webpack_encore?: WebpackEncoreConfig, * stimulus?: StimulusConfig, * turbo?: TurboConfig, * symfonycasts_tailwind?: SymfonycastsTailwindConfig, diff --git a/phpunit.dist.xml b/phpunit.dist.xml index 22bd879..461d57e 100644 --- a/phpunit.dist.xml +++ b/phpunit.dist.xml @@ -15,6 +15,28 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/base.html.twig b/templates/base.html.twig index 03ef230..89eb2cc 100644 --- a/templates/base.html.twig +++ b/templates/base.html.twig @@ -5,7 +5,6 @@ {% block title %}Association KAZ{% endblock %} {% block stylesheets %} - {% endblock %} {% block javascripts %}