| @@ -0,0 +1 @@ | |||||
| COMPOSE_PROJECT_NAME='spt-symfony' | |||||
| @@ -0,0 +1,20 @@ | |||||
| server { | |||||
| listen 80; | |||||
| # this path MUST be exactly as docker-compose.fpm.volumes, | |||||
| # even if it doesn't exist in this dock. | |||||
| root /var/www/html/public; | |||||
| client_max_body_size 16M; | |||||
| location / { | |||||
| try_files $uri /index.php$is_args$args; | |||||
| } | |||||
| location ~ ^/.+\.php(/|$) { | |||||
| fastcgi_pass php:9000; | |||||
| fastcgi_buffers 16 16k; | |||||
| fastcgi_buffer_size 32k; | |||||
| include fastcgi_params; | |||||
| fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,7 @@ | |||||
| #!/bin/sh | |||||
| su www-data -s /bin/bash -c "composer install" | |||||
| su www-data -s /bin/bash -c "./bin/console --env=prod doctrine:migrations:migrate -n" | |||||
| su www-data -s /bin/bash -c "./bin/console --env=prod cache:clear" | |||||
| php-fpm | |||||
| @@ -0,0 +1,17 @@ | |||||
| #!/bin/sh | |||||
| EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')" | |||||
| php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | |||||
| ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" | |||||
| if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ] | |||||
| then | |||||
| >&2 echo 'ERROR: Invalid installer checksum' | |||||
| rm composer-setup.php | |||||
| exit 1 | |||||
| fi | |||||
| php composer-setup.php --quiet | |||||
| RESULT=$? | |||||
| rm composer-setup.php | |||||
| exit $RESULT | |||||
| @@ -0,0 +1,44 @@ | |||||
| # In all environments, the following files are loaded if they exist, | |||||
| # the latter taking precedence over the former: | |||||
| # | |||||
| # * .env contains default values for the environment variables needed by the app | |||||
| # * .env.local uncommitted file with local overrides | |||||
| # * .env.$APP_ENV committed environment-specific defaults | |||||
| # * .env.$APP_ENV.local uncommitted environment-specific overrides | |||||
| # | |||||
| # Real environment variables win over .env files. | |||||
| # | |||||
| # DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES. | |||||
| # https://symfony.com/doc/current/configuration/secrets.html | |||||
| # | |||||
| # Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2). | |||||
| # https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration | |||||
| ###> symfony/framework-bundle ### | |||||
| APP_ENV=dev | |||||
| APP_SECRET=7a626b0d898f0ba8183bd46fce2e9150 | |||||
| ###< symfony/framework-bundle ### | |||||
| ###> symfony/webapp-pack ### | |||||
| MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0 | |||||
| ###< symfony/webapp-pack ### | |||||
| ###> 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.db" | |||||
| # DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=8&charset=utf8mb4" | |||||
| DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=14&charset=utf8" | |||||
| ###< doctrine/doctrine-bundle ### | |||||
| ###> symfony/messenger ### | |||||
| # Choose one of the transports below | |||||
| # MESSENGER_TRANSPORT_DSN=doctrine://default | |||||
| # MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages | |||||
| # MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages | |||||
| ###< symfony/messenger ### | |||||
| ###> symfony/mailer ### | |||||
| # MAILER_DSN=null://null | |||||
| ###< symfony/mailer ### | |||||
| @@ -0,0 +1,6 @@ | |||||
| # define your env variables for the test env here | |||||
| KERNEL_CLASS='App\Kernel' | |||||
| APP_SECRET='$ecretf0rt3st' | |||||
| SYMFONY_DEPRECATIONS_HELPER=999999 | |||||
| PANTHER_APP_ENV=panther | |||||
| PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots | |||||
| @@ -0,0 +1,23 @@ | |||||
| ###> 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.result.cache | |||||
| ###< phpunit/phpunit ### | |||||
| ###> symfony/phpunit-bridge ### | |||||
| .phpunit.result.cache | |||||
| /phpunit.xml | |||||
| ###< symfony/phpunit-bridge ### | |||||
| /.db/ | |||||
| /.idea/ | |||||
| @@ -0,0 +1,65 @@ | |||||
| FROM php:8.1-fpm | |||||
| RUN apt-get update | |||||
| RUN apt-get install -y \ | |||||
| git zip \ | |||||
| wget git unzip libicu-dev \ | |||||
| libfreetype6-dev \ | |||||
| libjpeg62-turbo-dev \ | |||||
| libpng-dev \ | |||||
| libicu-dev \ | |||||
| && docker-php-ext-install -j$(nproc) iconv \ | |||||
| && docker-php-ext-configure gd --with-jpeg=/usr/include/ --with-freetype=/usr/include/ \ | |||||
| && docker-php-ext-install -j$(nproc) gd \ | |||||
| && docker-php-ext-install -j$(nproc) intl \ | |||||
| && docker-php-ext-install -j$(nproc) pdo_mysql | |||||
| RUN pecl install xdebug \ | |||||
| && docker-php-ext-enable xdebug \ | |||||
| && echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \ | |||||
| && echo "xdebug.client_host = host.docker.internal" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \ | |||||
| && echo "xdebug.start_with_request=yes" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \ | |||||
| && echo 'xdebug.discover_client_host=1' >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \ | |||||
| && echo 'xdebug.log=/var/www/var/log/xdebug.log' >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \ | |||||
| && echo 'xdebug.log_level=0' >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini | |||||
| COPY .docker/php/install_composer.sh /install_composer.sh | |||||
| RUN chmod +x /install_composer.sh \ | |||||
| && cd / \ | |||||
| && /install_composer.sh \ | |||||
| && rm /install_composer.sh \ | |||||
| && mv /composer.phar /usr/local/bin/composer | |||||
| # | |||||
| ##RUN wget https://get.symfony.com/cli/installer -O - | bash \ | |||||
| ## && mv /root/.symfony5/bin/symfony /usr/local/bin/symfony | |||||
| # | |||||
| #RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini" | |||||
| # | |||||
| #RUN git config --global user.email "re@spawntree.de" | |||||
| # | |||||
| #RUN echo 'upload_max_filesize = 16M' >> /usr/local/etc/php/conf.d/docker-php-uploadmaxfilesize.ini; | |||||
| #RUN echo 'memory_limit = 512M' >> /usr/local/etc/php/conf.d/docker-php-memorylimit.ini; | |||||
| # | |||||
| #WORKDIR /var/www/html | |||||
| # | |||||
| #COPY composer.json composer.lock ./ | |||||
| #RUN composer install --prefer-dist --no-interaction --no-dev --no-scripts --no-autoloader | |||||
| # | |||||
| #COPY . ./ | |||||
| # | |||||
| ##RUN chown -R www-data:www-data /var/www/html && \ | |||||
| ## composer dump-autoload --no-dev --classmap-authoritative && \ | |||||
| ## composer run-script post-install-cmd --no-interaction && \ | |||||
| ## bin/console cache:warmup --no-debug | |||||
| #COPY .docker/php/init.sh /init.sh | |||||
| RUN chown -R www-data:www-data /var/www/html | |||||
| USER www-data | |||||
| EXPOSE 9000 | |||||
| #CMD "/.docker/php/init.sh" | |||||
| #ENTRYPOINT ["/init.sh"] | |||||
| CMD ["php-fpm"] | |||||
| @@ -0,0 +1,5 @@ | |||||
| - docker-compose exec php /bin/bash | |||||
| - https://symfony.com/doc/current/setup.html | |||||
| - composer create-project symfony/skeleton:"6.1.*" my_project_directory | |||||
| - cd my_project_directory | |||||
| - composer require webapp | |||||
| @@ -0,0 +1,17 @@ | |||||
| #!/usr/bin/env php | |||||
| <?php | |||||
| use App\Kernel; | |||||
| use Symfony\Bundle\FrameworkBundle\Console\Application; | |||||
| if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) { | |||||
| throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".'); | |||||
| } | |||||
| require_once dirname(__DIR__).'/vendor/autoload_runtime.php'; | |||||
| return function (array $context) { | |||||
| $kernel = new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']); | |||||
| return new Application($kernel); | |||||
| }; | |||||
| @@ -0,0 +1,19 @@ | |||||
| #!/usr/bin/env php | |||||
| <?php | |||||
| if (!ini_get('date.timezone')) { | |||||
| ini_set('date.timezone', 'UTC'); | |||||
| } | |||||
| if (is_file(dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit')) { | |||||
| define('PHPUNIT_COMPOSER_INSTALL', dirname(__DIR__).'/vendor/autoload.php'); | |||||
| require PHPUNIT_COMPOSER_INSTALL; | |||||
| PHPUnit\TextUI\Command::main(); | |||||
| } else { | |||||
| if (!is_file(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) { | |||||
| echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n"; | |||||
| exit(1); | |||||
| } | |||||
| require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php'; | |||||
| } | |||||
| @@ -0,0 +1,109 @@ | |||||
| { | |||||
| "type": "project", | |||||
| "license": "proprietary", | |||||
| "minimum-stability": "stable", | |||||
| "prefer-stable": true, | |||||
| "require": { | |||||
| "php": ">=8.1", | |||||
| "ext-ctype": "*", | |||||
| "ext-iconv": "*", | |||||
| "doctrine/annotations": "^1.0", | |||||
| "doctrine/doctrine-bundle": "^2.7", | |||||
| "doctrine/doctrine-migrations-bundle": "^3.2", | |||||
| "doctrine/orm": "^2.13", | |||||
| "phpdocumentor/reflection-docblock": "^5.3", | |||||
| "phpstan/phpdoc-parser": "^1.7", | |||||
| "sensio/framework-extra-bundle": "^6.1", | |||||
| "symfony/asset": "6.1.*", | |||||
| "symfony/console": "6.1.*", | |||||
| "symfony/doctrine-messenger": "6.1.*", | |||||
| "symfony/dotenv": "6.1.*", | |||||
| "symfony/expression-language": "6.1.*", | |||||
| "symfony/flex": "^2", | |||||
| "symfony/form": "6.1.*", | |||||
| "symfony/framework-bundle": "6.1.*", | |||||
| "symfony/http-client": "6.1.*", | |||||
| "symfony/intl": "6.1.*", | |||||
| "symfony/mailer": "6.1.*", | |||||
| "symfony/mime": "6.1.*", | |||||
| "symfony/monolog-bundle": "^3.0", | |||||
| "symfony/notifier": "6.1.*", | |||||
| "symfony/process": "6.1.*", | |||||
| "symfony/property-access": "6.1.*", | |||||
| "symfony/property-info": "6.1.*", | |||||
| "symfony/proxy-manager-bridge": "6.1.*", | |||||
| "symfony/runtime": "6.1.*", | |||||
| "symfony/security-bundle": "6.1.*", | |||||
| "symfony/serializer": "6.1.*", | |||||
| "symfony/string": "6.1.*", | |||||
| "symfony/translation": "6.1.*", | |||||
| "symfony/twig-bundle": "6.1.*", | |||||
| "symfony/validator": "6.1.*", | |||||
| "symfony/web-link": "6.1.*", | |||||
| "symfony/yaml": "6.1.*", | |||||
| "twig/extra-bundle": "^2.12|^3.0", | |||||
| "twig/twig": "^2.12|^3.0" | |||||
| }, | |||||
| "config": { | |||||
| "allow-plugins": { | |||||
| "composer/package-versions-deprecated": true, | |||||
| "symfony/flex": true, | |||||
| "symfony/runtime": true | |||||
| }, | |||||
| "optimize-autoloader": true, | |||||
| "preferred-install": { | |||||
| "*": "dist" | |||||
| }, | |||||
| "sort-packages": true | |||||
| }, | |||||
| "autoload": { | |||||
| "psr-4": { | |||||
| "App\\": "src/" | |||||
| } | |||||
| }, | |||||
| "autoload-dev": { | |||||
| "psr-4": { | |||||
| "App\\Tests\\": "tests/" | |||||
| } | |||||
| }, | |||||
| "replace": { | |||||
| "symfony/polyfill-ctype": "*", | |||||
| "symfony/polyfill-iconv": "*", | |||||
| "symfony/polyfill-php72": "*", | |||||
| "symfony/polyfill-php73": "*", | |||||
| "symfony/polyfill-php74": "*", | |||||
| "symfony/polyfill-php80": "*", | |||||
| "symfony/polyfill-php81": "*" | |||||
| }, | |||||
| "scripts": { | |||||
| "auto-scripts": { | |||||
| "cache:clear": "symfony-cmd", | |||||
| "assets:install %PUBLIC_DIR%": "symfony-cmd" | |||||
| }, | |||||
| "post-install-cmd": [ | |||||
| "@auto-scripts" | |||||
| ], | |||||
| "post-update-cmd": [ | |||||
| "@auto-scripts" | |||||
| ] | |||||
| }, | |||||
| "conflict": { | |||||
| "symfony/symfony": "*" | |||||
| }, | |||||
| "extra": { | |||||
| "symfony": { | |||||
| "allow-contrib": false, | |||||
| "require": "6.1.*" | |||||
| } | |||||
| }, | |||||
| "require-dev": { | |||||
| "phpunit/phpunit": "^9.5", | |||||
| "symfony/browser-kit": "6.1.*", | |||||
| "symfony/css-selector": "6.1.*", | |||||
| "symfony/debug-bundle": "6.1.*", | |||||
| "symfony/maker-bundle": "^1.0", | |||||
| "symfony/phpunit-bridge": "^6.1", | |||||
| "symfony/stopwatch": "6.1.*", | |||||
| "symfony/web-profiler-bundle": "6.1.*" | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,15 @@ | |||||
| <?php | |||||
| return [ | |||||
| Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true], | |||||
| Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true], | |||||
| Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true], | |||||
| Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true], | |||||
| Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true], | |||||
| Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true], | |||||
| Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true], | |||||
| Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true], | |||||
| Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true], | |||||
| Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true], | |||||
| Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true], | |||||
| ]; | |||||
| @@ -0,0 +1,19 @@ | |||||
| framework: | |||||
| cache: | |||||
| # Unique name of your app: used to compute stable namespaces for cache keys. | |||||
| #prefix_seed: your_vendor_name/app_name | |||||
| # The "app" cache stores to the filesystem by default. | |||||
| # The data in this cache should persist between deploys. | |||||
| # Other options include: | |||||
| # Redis | |||||
| #app: cache.adapter.redis | |||||
| #default_redis_provider: redis://localhost | |||||
| # APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues) | |||||
| #app: cache.adapter.apcu | |||||
| # Namespaced pools use the above "app" backend by default | |||||
| #pools: | |||||
| #my.dedicated.cache: null | |||||
| @@ -0,0 +1,5 @@ | |||||
| when@dev: | |||||
| debug: | |||||
| # Forwards VarDumper Data clones to a centralized server allowing to inspect dumps on CLI or in your browser. | |||||
| # See the "server:dump" command to start a new server. | |||||
| dump_destination: "tcp://%env(VAR_DUMPER_SERVER)%" | |||||
| @@ -0,0 +1,42 @@ | |||||
| doctrine: | |||||
| dbal: | |||||
| url: '%env(resolve:DATABASE_URL)%' | |||||
| # IMPORTANT: You MUST configure your server version, | |||||
| # either here or in the DATABASE_URL env var (see .env file) | |||||
| #server_version: '13' | |||||
| orm: | |||||
| auto_generate_proxy_classes: true | |||||
| naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware | |||||
| auto_mapping: true | |||||
| mappings: | |||||
| App: | |||||
| is_bundle: false | |||||
| dir: '%kernel.project_dir%/src/Entity' | |||||
| prefix: 'App\Entity' | |||||
| alias: App | |||||
| when@test: | |||||
| doctrine: | |||||
| dbal: | |||||
| # "TEST_TOKEN" is typically set by ParaTest | |||||
| dbname_suffix: '_test%env(default::TEST_TOKEN)%' | |||||
| when@prod: | |||||
| doctrine: | |||||
| orm: | |||||
| auto_generate_proxy_classes: false | |||||
| query_cache_driver: | |||||
| type: pool | |||||
| pool: doctrine.system_cache_pool | |||||
| result_cache_driver: | |||||
| type: pool | |||||
| pool: doctrine.result_cache_pool | |||||
| framework: | |||||
| cache: | |||||
| pools: | |||||
| doctrine.result_cache_pool: | |||||
| adapter: cache.app | |||||
| doctrine.system_cache_pool: | |||||
| adapter: cache.system | |||||
| @@ -0,0 +1,6 @@ | |||||
| doctrine_migrations: | |||||
| migrations_paths: | |||||
| # namespace is arbitrary but should be different from App\Migrations | |||||
| # as migrations classes should NOT be autoloaded | |||||
| 'DoctrineMigrations': '%kernel.project_dir%/migrations' | |||||
| enable_profiler: '%kernel.debug%' | |||||
| @@ -0,0 +1,24 @@ | |||||
| # see https://symfony.com/doc/current/reference/configuration/framework.html | |||||
| framework: | |||||
| secret: '%env(APP_SECRET)%' | |||||
| #csrf_protection: true | |||||
| http_method_override: false | |||||
| # Enables session support. Note that the session will ONLY be started if you read or write from it. | |||||
| # Remove or comment this section to explicitly disable session support. | |||||
| session: | |||||
| handler_id: null | |||||
| cookie_secure: auto | |||||
| cookie_samesite: lax | |||||
| storage_factory_id: session.storage.factory.native | |||||
| #esi: true | |||||
| #fragments: true | |||||
| php_errors: | |||||
| log: true | |||||
| when@test: | |||||
| framework: | |||||
| test: true | |||||
| session: | |||||
| storage_factory_id: session.storage.factory.mock_file | |||||
| @@ -0,0 +1,3 @@ | |||||
| framework: | |||||
| mailer: | |||||
| dsn: '%env(MAILER_DSN)%' | |||||
| @@ -0,0 +1,24 @@ | |||||
| framework: | |||||
| messenger: | |||||
| failure_transport: failed | |||||
| transports: | |||||
| # https://symfony.com/doc/current/messenger.html#transport-configuration | |||||
| async: | |||||
| dsn: '%env(MESSENGER_TRANSPORT_DSN)%' | |||||
| options: | |||||
| use_notify: true | |||||
| check_delayed_interval: 60000 | |||||
| retry_strategy: | |||||
| max_retries: 3 | |||||
| multiplier: 2 | |||||
| failed: 'doctrine://default?queue_name=failed' | |||||
| # sync: 'sync://' | |||||
| routing: | |||||
| Symfony\Component\Mailer\Messenger\SendEmailMessage: async | |||||
| Symfony\Component\Notifier\Message\ChatMessage: async | |||||
| Symfony\Component\Notifier\Message\SmsMessage: async | |||||
| # Route your messages to the transports | |||||
| # 'App\Message\YourMessage': async | |||||
| @@ -0,0 +1,61 @@ | |||||
| monolog: | |||||
| channels: | |||||
| - deprecation # Deprecations are logged in the dedicated "deprecation" channel when it exists | |||||
| when@dev: | |||||
| monolog: | |||||
| handlers: | |||||
| main: | |||||
| type: stream | |||||
| path: "%kernel.logs_dir%/%kernel.environment%.log" | |||||
| level: debug | |||||
| channels: ["!event"] | |||||
| # uncomment to get logging in your browser | |||||
| # you may have to allow bigger header sizes in your Web server configuration | |||||
| #firephp: | |||||
| # type: firephp | |||||
| # level: info | |||||
| #chromephp: | |||||
| # type: chromephp | |||||
| # level: info | |||||
| console: | |||||
| type: console | |||||
| process_psr_3_messages: false | |||||
| channels: ["!event", "!doctrine", "!console"] | |||||
| when@test: | |||||
| monolog: | |||||
| handlers: | |||||
| main: | |||||
| type: fingers_crossed | |||||
| action_level: error | |||||
| handler: nested | |||||
| excluded_http_codes: [404, 405] | |||||
| channels: ["!event"] | |||||
| nested: | |||||
| type: stream | |||||
| path: "%kernel.logs_dir%/%kernel.environment%.log" | |||||
| level: debug | |||||
| when@prod: | |||||
| monolog: | |||||
| handlers: | |||||
| main: | |||||
| type: fingers_crossed | |||||
| action_level: error | |||||
| handler: nested | |||||
| excluded_http_codes: [404, 405] | |||||
| buffer_size: 50 # How many messages should be saved? Prevent memory leaks | |||||
| nested: | |||||
| type: stream | |||||
| path: php://stderr | |||||
| level: debug | |||||
| formatter: monolog.formatter.json | |||||
| console: | |||||
| type: console | |||||
| process_psr_3_messages: false | |||||
| channels: ["!event", "!doctrine"] | |||||
| deprecation: | |||||
| type: stream | |||||
| channels: [deprecation] | |||||
| path: php://stderr | |||||
| @@ -0,0 +1,16 @@ | |||||
| framework: | |||||
| notifier: | |||||
| #chatter_transports: | |||||
| # slack: '%env(SLACK_DSN)%' | |||||
| # telegram: '%env(TELEGRAM_DSN)%' | |||||
| #texter_transports: | |||||
| # twilio: '%env(TWILIO_DSN)%' | |||||
| # nexmo: '%env(NEXMO_DSN)%' | |||||
| channel_policy: | |||||
| # use chat/slack, chat/telegram, sms/twilio or sms/nexmo | |||||
| urgent: ['email'] | |||||
| high: ['email'] | |||||
| medium: ['email'] | |||||
| low: ['email'] | |||||
| admin_recipients: | |||||
| - { email: admin@example.com } | |||||
| @@ -0,0 +1,12 @@ | |||||
| framework: | |||||
| router: | |||||
| utf8: true | |||||
| # 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 | |||||
| when@prod: | |||||
| framework: | |||||
| router: | |||||
| strict_requirements: null | |||||
| @@ -0,0 +1,39 @@ | |||||
| security: | |||||
| # https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords | |||||
| password_hashers: | |||||
| Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto' | |||||
| # https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider | |||||
| providers: | |||||
| users_in_memory: { memory: null } | |||||
| firewalls: | |||||
| dev: | |||||
| pattern: ^/(_(profiler|wdt)|css|images|js)/ | |||||
| security: false | |||||
| main: | |||||
| lazy: true | |||||
| provider: users_in_memory | |||||
| # activate different ways to authenticate | |||||
| # https://symfony.com/doc/current/security.html#the-firewall | |||||
| # https://symfony.com/doc/current/security/impersonating_user.html | |||||
| # switch_user: true | |||||
| # Easy way to control access for large sections of your site | |||||
| # Note: Only the *first* access control that matches will be used | |||||
| access_control: | |||||
| # - { path: ^/admin, roles: ROLE_ADMIN } | |||||
| # - { path: ^/profile, roles: ROLE_USER } | |||||
| when@test: | |||||
| security: | |||||
| password_hashers: | |||||
| # By default, password hashers are resource intensive and take time. This is | |||||
| # important to generate secure password hashes. In tests however, secure hashes | |||||
| # are not important, waste resources and increase test times. The following | |||||
| # reduces the work factor to the lowest possible values. | |||||
| Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: | |||||
| algorithm: auto | |||||
| cost: 4 # Lowest possible value for bcrypt | |||||
| time_cost: 3 # Lowest possible value for argon | |||||
| memory_cost: 10 # Lowest possible value for argon | |||||
| @@ -0,0 +1,3 @@ | |||||
| sensio_framework_extra: | |||||
| router: | |||||
| annotations: false | |||||
| @@ -0,0 +1,13 @@ | |||||
| framework: | |||||
| default_locale: en | |||||
| translator: | |||||
| default_path: '%kernel.project_dir%/translations' | |||||
| fallbacks: | |||||
| - en | |||||
| # providers: | |||||
| # crowdin: | |||||
| # dsn: '%env(CROWDIN_DSN)%' | |||||
| # loco: | |||||
| # dsn: '%env(LOCO_DSN)%' | |||||
| # lokalise: | |||||
| # dsn: '%env(LOKALISE_DSN)%' | |||||
| @@ -0,0 +1,6 @@ | |||||
| twig: | |||||
| default_path: '%kernel.project_dir%/templates' | |||||
| when@test: | |||||
| twig: | |||||
| strict_variables: true | |||||
| @@ -0,0 +1,13 @@ | |||||
| framework: | |||||
| validation: | |||||
| email_validation_mode: html5 | |||||
| # Enables validator auto-mapping support. | |||||
| # For instance, basic validation constraints will be inferred from Doctrine's metadata. | |||||
| #auto_mapping: | |||||
| # App\Entity\: [] | |||||
| when@test: | |||||
| framework: | |||||
| validation: | |||||
| not_compromised_password: false | |||||
| @@ -0,0 +1,17 @@ | |||||
| when@dev: | |||||
| web_profiler: | |||||
| toolbar: true | |||||
| intercept_redirects: false | |||||
| framework: | |||||
| profiler: | |||||
| only_exceptions: false | |||||
| collect_serializer_data: true | |||||
| when@test: | |||||
| web_profiler: | |||||
| toolbar: false | |||||
| intercept_redirects: false | |||||
| framework: | |||||
| profiler: { collect: false } | |||||
| @@ -0,0 +1,5 @@ | |||||
| <?php | |||||
| if (file_exists(dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php')) { | |||||
| require dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php'; | |||||
| } | |||||
| @@ -0,0 +1,3 @@ | |||||
| controllers: | |||||
| resource: ../src/Controller/ | |||||
| type: attribute | |||||
| @@ -0,0 +1,4 @@ | |||||
| when@dev: | |||||
| _errors: | |||||
| resource: '@FrameworkBundle/Resources/config/routing/errors.xml' | |||||
| prefix: /_error | |||||
| @@ -0,0 +1,8 @@ | |||||
| when@dev: | |||||
| web_profiler_wdt: | |||||
| resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml' | |||||
| prefix: /_wdt | |||||
| web_profiler_profiler: | |||||
| resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml' | |||||
| prefix: /_profiler | |||||
| @@ -0,0 +1,24 @@ | |||||
| # This file is the entry point to configure your own services. | |||||
| # Files in the packages/ subdirectory configure your dependencies. | |||||
| # Put parameters here that don't need to change on each machine where the app is deployed | |||||
| # https://symfony.com/doc/current/best_practices.html#use-parameters-for-application-configuration | |||||
| parameters: | |||||
| services: | |||||
| # default configuration for services in *this* file | |||||
| _defaults: | |||||
| autowire: true # Automatically injects dependencies in your services. | |||||
| autoconfigure: true # Automatically registers your services as commands, event subscribers, etc. | |||||
| # makes classes in src/ available to be used as services | |||||
| # this creates a service per class whose id is the fully-qualified class name | |||||
| App\: | |||||
| resource: '../src/' | |||||
| exclude: | |||||
| - '../src/DependencyInjection/' | |||||
| - '../src/Entity/' | |||||
| - '../src/Kernel.php' | |||||
| # add more service definitions when explicit configuration is needed | |||||
| # please note that last definitions always *replace* previous ones | |||||
| @@ -0,0 +1,50 @@ | |||||
| version: '3.8' | |||||
| services: | |||||
| nginx: | |||||
| image: nginx:1.23-alpine | |||||
| depends_on: | |||||
| - php | |||||
| volumes: | |||||
| - ./.docker/nginx.conf:/etc/nginx/conf.d/default.conf:ro | |||||
| - ./../:/var/www/html:cached | |||||
| ports: | |||||
| - "8080:80" | |||||
| php: | |||||
| build: | |||||
| context: . | |||||
| dockerfile: ./Dockerfile | |||||
| depends_on: | |||||
| - database | |||||
| #- mailhog | |||||
| volumes: | |||||
| - ./:/var/www/html | |||||
| environment: | |||||
| DATABASE_URL: 'mysql://spt4B@ue5:spt4B@er5p@55@database:3306/bauer_umfeld?serverVersion=mariadb-10.7.4' | |||||
| MAILER_DSN: 'smtp://mailhog:1025' | |||||
| database: | |||||
| image: mariadb:10.7.4 | |||||
| ports: | |||||
| - "127.0.0.1:3336:3306" | |||||
| volumes: | |||||
| - .db:/var/lib/mysql | |||||
| environment: | |||||
| MYSQL_ROOT_PASSWORD: 'sp@wntr33' | |||||
| MYSQL_DATABASE: 'bauer_umfeld' | |||||
| MYSQL_USER: 'spt4B@ue5' | |||||
| MYSQL_PASSWORD: 'spt4B@er5p@55' | |||||
| phpmyadmin: | |||||
| image: phpmyadmin | |||||
| container_name: phpmyadmin | |||||
| restart: always | |||||
| ports: | |||||
| - "8081:80" | |||||
| environment: | |||||
| - PMA_ARBITRARY=1 | |||||
| networks: | |||||
| - default | |||||
| # mailhog: | |||||
| # image: mailhog/mailhog:latest | |||||
| # ports: | |||||
| # - "127.0.0.1:8025:8025" | |||||
| # - "127.0.0.1:2525:1025" | |||||
| @@ -0,0 +1,42 @@ | |||||
| <?xml version="1.0" encoding="UTF-8"?> | |||||
| <!-- https://phpunit.readthedocs.io/en/latest/configuration.html --> | |||||
| <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |||||
| xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" | |||||
| backupGlobals="false" | |||||
| colors="true" | |||||
| bootstrap="tests/bootstrap.php" | |||||
| convertDeprecationsToExceptions="false" | |||||
| > | |||||
| <php> | |||||
| <ini name="display_errors" value="1" /> | |||||
| <ini name="error_reporting" value="-1" /> | |||||
| <server name="APP_ENV" value="test" force="true" /> | |||||
| <server name="SHELL_VERBOSITY" value="-1" /> | |||||
| <server name="SYMFONY_PHPUNIT_REMOVE" value="" /> | |||||
| <server name="SYMFONY_PHPUNIT_VERSION" value="9.5" /> | |||||
| </php> | |||||
| <testsuites> | |||||
| <testsuite name="Project Test Suite"> | |||||
| <directory>tests</directory> | |||||
| </testsuite> | |||||
| </testsuites> | |||||
| <coverage processUncoveredFiles="true"> | |||||
| <include> | |||||
| <directory suffix=".php">src</directory> | |||||
| </include> | |||||
| </coverage> | |||||
| <listeners> | |||||
| <listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" /> | |||||
| </listeners> | |||||
| <!-- Run `composer require symfony/panther` before enabling this extension --> | |||||
| <!-- | |||||
| <extensions> | |||||
| <extension class="Symfony\Component\Panther\ServerExtension" /> | |||||
| </extensions> | |||||
| --> | |||||
| </phpunit> | |||||
| @@ -0,0 +1,9 @@ | |||||
| <?php | |||||
| use App\Kernel; | |||||
| require_once dirname(__DIR__).'/vendor/autoload_runtime.php'; | |||||
| return function (array $context) { | |||||
| return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']); | |||||
| }; | |||||
| @@ -0,0 +1,11 @@ | |||||
| <?php | |||||
| namespace App; | |||||
| use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait; | |||||
| use Symfony\Component\HttpKernel\Kernel as BaseKernel; | |||||
| class Kernel extends BaseKernel | |||||
| { | |||||
| use MicroKernelTrait; | |||||
| } | |||||
| @@ -0,0 +1,282 @@ | |||||
| { | |||||
| "doctrine/annotations": { | |||||
| "version": "1.13", | |||||
| "recipe": { | |||||
| "repo": "github.com/symfony/recipes", | |||||
| "branch": "main", | |||||
| "version": "1.10", | |||||
| "ref": "64d8583af5ea57b7afa4aba4b159907f3a148b05" | |||||
| } | |||||
| }, | |||||
| "doctrine/doctrine-bundle": { | |||||
| "version": "2.7", | |||||
| "recipe": { | |||||
| "repo": "github.com/symfony/recipes", | |||||
| "branch": "main", | |||||
| "version": "2.4", | |||||
| "ref": "da713d006953b90d1c085c1be480ecdd6c4a95e0" | |||||
| }, | |||||
| "files": [ | |||||
| "config/packages/doctrine.yaml", | |||||
| "src/Entity/.gitignore", | |||||
| "src/Repository/.gitignore" | |||||
| ] | |||||
| }, | |||||
| "doctrine/doctrine-migrations-bundle": { | |||||
| "version": "3.2", | |||||
| "recipe": { | |||||
| "repo": "github.com/symfony/recipes", | |||||
| "branch": "main", | |||||
| "version": "3.1", | |||||
| "ref": "ee609429c9ee23e22d6fa5728211768f51ed2818" | |||||
| }, | |||||
| "files": [ | |||||
| "config/packages/doctrine_migrations.yaml", | |||||
| "migrations/.gitignore" | |||||
| ] | |||||
| }, | |||||
| "phpunit/phpunit": { | |||||
| "version": "9.5", | |||||
| "recipe": { | |||||
| "repo": "github.com/symfony/recipes", | |||||
| "branch": "main", | |||||
| "version": "9.3", | |||||
| "ref": "a6249a6c4392e9169b87abf93225f7f9f59025e6" | |||||
| }, | |||||
| "files": [ | |||||
| ".env.test", | |||||
| "phpunit.xml.dist", | |||||
| "tests/bootstrap.php" | |||||
| ] | |||||
| }, | |||||
| "sensio/framework-extra-bundle": { | |||||
| "version": "6.2", | |||||
| "recipe": { | |||||
| "repo": "github.com/symfony/recipes", | |||||
| "branch": "main", | |||||
| "version": "5.2", | |||||
| "ref": "fb7e19da7f013d0d422fa9bce16f5c510e27609b" | |||||
| }, | |||||
| "files": [ | |||||
| "config/packages/sensio_framework_extra.yaml" | |||||
| ] | |||||
| }, | |||||
| "symfony/console": { | |||||
| "version": "6.1", | |||||
| "recipe": { | |||||
| "repo": "github.com/symfony/recipes", | |||||
| "branch": "main", | |||||
| "version": "5.3", | |||||
| "ref": "da0c8be8157600ad34f10ff0c9cc91232522e047" | |||||
| }, | |||||
| "files": [ | |||||
| "bin/console" | |||||
| ] | |||||
| }, | |||||
| "symfony/debug-bundle": { | |||||
| "version": "6.1", | |||||
| "recipe": { | |||||
| "repo": "github.com/symfony/recipes", | |||||
| "branch": "main", | |||||
| "version": "5.3", | |||||
| "ref": "5aa8aa48234c8eb6dbdd7b3cd5d791485d2cec4b" | |||||
| }, | |||||
| "files": [ | |||||
| "config/packages/debug.yaml" | |||||
| ] | |||||
| }, | |||||
| "symfony/flex": { | |||||
| "version": "2.2", | |||||
| "recipe": { | |||||
| "repo": "github.com/symfony/recipes", | |||||
| "branch": "main", | |||||
| "version": "1.0", | |||||
| "ref": "146251ae39e06a95be0fe3d13c807bcf3938b172" | |||||
| }, | |||||
| "files": [ | |||||
| ".env" | |||||
| ] | |||||
| }, | |||||
| "symfony/framework-bundle": { | |||||
| "version": "6.1", | |||||
| "recipe": { | |||||
| "repo": "github.com/symfony/recipes", | |||||
| "branch": "main", | |||||
| "version": "5.4", | |||||
| "ref": "3cd216a4d007b78d8554d44a5b1c0a446dab24fb" | |||||
| }, | |||||
| "files": [ | |||||
| "config/packages/cache.yaml", | |||||
| "config/packages/framework.yaml", | |||||
| "config/preload.php", | |||||
| "config/routes/framework.yaml", | |||||
| "config/services.yaml", | |||||
| "public/index.php", | |||||
| "src/Controller/.gitignore", | |||||
| "src/Kernel.php" | |||||
| ] | |||||
| }, | |||||
| "symfony/mailer": { | |||||
| "version": "6.1", | |||||
| "recipe": { | |||||
| "repo": "github.com/symfony/recipes", | |||||
| "branch": "main", | |||||
| "version": "4.3", | |||||
| "ref": "97a61eabb351d7f6cb7702039bcfe07fe9d7e03c" | |||||
| }, | |||||
| "files": [ | |||||
| "config/packages/mailer.yaml" | |||||
| ] | |||||
| }, | |||||
| "symfony/maker-bundle": { | |||||
| "version": "1.45", | |||||
| "recipe": { | |||||
| "repo": "github.com/symfony/recipes", | |||||
| "branch": "main", | |||||
| "version": "1.0", | |||||
| "ref": "fadbfe33303a76e25cb63401050439aa9b1a9c7f" | |||||
| } | |||||
| }, | |||||
| "symfony/messenger": { | |||||
| "version": "6.1", | |||||
| "recipe": { | |||||
| "repo": "github.com/symfony/recipes", | |||||
| "branch": "main", | |||||
| "version": "6.0", | |||||
| "ref": "2523f7d31488903e247a522e760dc279be7f7aaf" | |||||
| }, | |||||
| "files": [ | |||||
| "config/packages/messenger.yaml" | |||||
| ] | |||||
| }, | |||||
| "symfony/monolog-bundle": { | |||||
| "version": "3.8", | |||||
| "recipe": { | |||||
| "repo": "github.com/symfony/recipes", | |||||
| "branch": "main", | |||||
| "version": "3.7", | |||||
| "ref": "213676c4ec929f046dfde5ea8e97625b81bc0578" | |||||
| }, | |||||
| "files": [ | |||||
| "config/packages/monolog.yaml" | |||||
| ] | |||||
| }, | |||||
| "symfony/notifier": { | |||||
| "version": "6.1", | |||||
| "recipe": { | |||||
| "repo": "github.com/symfony/recipes", | |||||
| "branch": "main", | |||||
| "version": "5.0", | |||||
| "ref": "c31585e252b32fe0e1f30b1f256af553f4a06eb9" | |||||
| }, | |||||
| "files": [ | |||||
| "config/packages/notifier.yaml" | |||||
| ] | |||||
| }, | |||||
| "symfony/phpunit-bridge": { | |||||
| "version": "6.1", | |||||
| "recipe": { | |||||
| "repo": "github.com/symfony/recipes", | |||||
| "branch": "main", | |||||
| "version": "5.3", | |||||
| "ref": "97cb3dc7b0f39c7cfc4b7553504c9d7b7795de96" | |||||
| }, | |||||
| "files": [ | |||||
| ".env.test", | |||||
| "bin/phpunit", | |||||
| "phpunit.xml.dist", | |||||
| "tests/bootstrap.php" | |||||
| ] | |||||
| }, | |||||
| "symfony/routing": { | |||||
| "version": "6.1", | |||||
| "recipe": { | |||||
| "repo": "github.com/symfony/recipes", | |||||
| "branch": "main", | |||||
| "version": "6.1", | |||||
| "ref": "a44010c0d06989bd4f154aa07d2542d47caf5b83" | |||||
| }, | |||||
| "files": [ | |||||
| "config/packages/routing.yaml", | |||||
| "config/routes.yaml" | |||||
| ] | |||||
| }, | |||||
| "symfony/security-bundle": { | |||||
| "version": "6.1", | |||||
| "recipe": { | |||||
| "repo": "github.com/symfony/recipes", | |||||
| "branch": "main", | |||||
| "version": "6.0", | |||||
| "ref": "8a5b112826f7d3d5b07027f93786ae11a1c7de48" | |||||
| }, | |||||
| "files": [ | |||||
| "config/packages/security.yaml" | |||||
| ] | |||||
| }, | |||||
| "symfony/translation": { | |||||
| "version": "6.1", | |||||
| "recipe": { | |||||
| "repo": "github.com/symfony/recipes", | |||||
| "branch": "main", | |||||
| "version": "5.3", | |||||
| "ref": "da64f5a2b6d96f5dc24914517c0350a5f91dee43" | |||||
| }, | |||||
| "files": [ | |||||
| "config/packages/translation.yaml", | |||||
| "translations/.gitignore" | |||||
| ] | |||||
| }, | |||||
| "symfony/twig-bundle": { | |||||
| "version": "6.1", | |||||
| "recipe": { | |||||
| "repo": "github.com/symfony/recipes", | |||||
| "branch": "main", | |||||
| "version": "5.4", | |||||
| "ref": "bb2178c57eee79e6be0b297aa96fc0c0def81387" | |||||
| }, | |||||
| "files": [ | |||||
| "config/packages/twig.yaml", | |||||
| "templates/base.html.twig" | |||||
| ] | |||||
| }, | |||||
| "symfony/validator": { | |||||
| "version": "6.1", | |||||
| "recipe": { | |||||
| "repo": "github.com/symfony/recipes", | |||||
| "branch": "main", | |||||
| "version": "5.3", | |||||
| "ref": "c32cfd98f714894c4f128bb99aa2530c1227603c" | |||||
| }, | |||||
| "files": [ | |||||
| "config/packages/validator.yaml" | |||||
| ] | |||||
| }, | |||||
| "symfony/web-profiler-bundle": { | |||||
| "version": "6.1", | |||||
| "recipe": { | |||||
| "repo": "github.com/symfony/recipes", | |||||
| "branch": "main", | |||||
| "version": "6.1", | |||||
| "ref": "e42b3f0177df239add25373083a564e5ead4e13a" | |||||
| }, | |||||
| "files": [ | |||||
| "config/packages/web_profiler.yaml", | |||||
| "config/routes/web_profiler.yaml" | |||||
| ] | |||||
| }, | |||||
| "symfony/webapp-pack": { | |||||
| "version": "1.1", | |||||
| "recipe": { | |||||
| "repo": "github.com/symfony/recipes", | |||||
| "branch": "main", | |||||
| "version": "1.0", | |||||
| "ref": "2fb3513dbc139884fc5b7c751242b66f9f10f0c3" | |||||
| }, | |||||
| "files": [ | |||||
| "config/packages/messenger.yaml" | |||||
| ] | |||||
| }, | |||||
| "twig/extra-bundle": { | |||||
| "version": "v3.4.0" | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,19 @@ | |||||
| <!DOCTYPE html> | |||||
| <html> | |||||
| <head> | |||||
| <meta charset="UTF-8"> | |||||
| <title>{% block title %}Welcome!{% endblock %}</title> | |||||
| <link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text></svg>"> | |||||
| {# Run `composer require symfony/webpack-encore-bundle` to start using Symfony UX #} | |||||
| {% block stylesheets %} | |||||
| {{ encore_entry_link_tags('app') }} | |||||
| {% endblock %} | |||||
| {% block javascripts %} | |||||
| {{ encore_entry_script_tags('app') }} | |||||
| {% endblock %} | |||||
| </head> | |||||
| <body> | |||||
| {% block body %}{% endblock %} | |||||
| </body> | |||||
| </html> | |||||
| @@ -0,0 +1,11 @@ | |||||
| <?php | |||||
| use Symfony\Component\Dotenv\Dotenv; | |||||
| require dirname(__DIR__).'/vendor/autoload.php'; | |||||
| if (file_exists(dirname(__DIR__).'/config/bootstrap.php')) { | |||||
| require dirname(__DIR__).'/config/bootstrap.php'; | |||||
| } elseif (method_exists(Dotenv::class, 'bootEnv')) { | |||||
| (new Dotenv())->bootEnv(dirname(__DIR__).'/.env'); | |||||
| } | |||||