├── .env ├── .env.dist ├── .gitignore ├── Dockerfile ├── README.md ├── assets └── .gitignore ├── bin ├── console └── phpunit ├── composer.json ├── composer.lock ├── config ├── bundles.php ├── packages │ ├── dev │ │ ├── debug.yaml │ │ ├── easy_log_handler.yaml │ │ ├── monolog.yaml │ │ ├── routing.yaml │ │ ├── swiftmailer.yaml │ │ └── web_profiler.yaml │ ├── doctrine.yaml │ ├── doctrine_migrations.yaml │ ├── framework.yaml │ ├── prod │ │ ├── doctrine.yaml │ │ └── monolog.yaml │ ├── routing.yaml │ ├── security.yaml │ ├── sensio_framework_extra.yaml │ ├── swiftmailer.yaml │ ├── test │ │ ├── framework.yaml │ │ ├── monolog.yaml │ │ ├── routing.yaml │ │ ├── swiftmailer.yaml │ │ └── web_profiler.yaml │ ├── translation.yaml │ ├── twig.yaml │ └── validator.yaml ├── routes.yaml ├── routes │ ├── annotations.yaml │ └── dev │ │ ├── twig.yaml │ │ └── web_profiler.yaml └── services.yaml ├── docker-compose.yml ├── docker ├── .bashrc └── app.conf ├── package.json ├── phpunit.xml.dist ├── public ├── .htaccess └── index.php ├── src ├── Controller │ ├── .gitignore │ └── DefaultController.php ├── Entity │ └── .gitignore ├── Kernel.php ├── Migrations │ └── .gitignore └── Repository │ └── .gitignore ├── symfony.lock ├── templates └── base.html.twig ├── tests └── .gitignore └── translations └── .gitignore /.env: -------------------------------------------------------------------------------- 1 | SYMFONY_PATH=/home/ph/www/docker-symfony4 2 | DB_ROOT_PASS=rootpass 3 | SYMFONY_DB_NAME=symfony 4 | SYMFONY_DB_USER=symfony 5 | SYMFONY_DB_PATH=symfonydbpass 6 | 7 | 8 | APP_ENV=dev 9 | APP_SECRET=!ChangeMe! 10 | TRUSTED_PROXIES=10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 11 | TRUSTED_HOSTS=localhost 12 | -------------------------------------------------------------------------------- /.env.dist: -------------------------------------------------------------------------------- 1 | # This file is a "template" of which env vars need to be defined for your application 2 | # Copy this file to .env file for development, create environment variables when deploying to production 3 | # https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration 4 | 5 | ###> symfony/framework-bundle ### 6 | APP_ENV=dev 7 | APP_SECRET=777647b3e12f26a43e548090915cb9ae 8 | #TRUSTED_PROXIES=127.0.0.1,127.0.0.2 9 | #TRUSTED_HOSTS=localhost,example.com 10 | ###< symfony/framework-bundle ### 11 | 12 | ###> symfony/swiftmailer-bundle ### 13 | # For Gmail as a transport, use: "gmail://username:password@localhost" 14 | # For a generic SMTP server, use: "smtp://localhost:25?encryption=&auth_mode=" 15 | # Delivery is disabled by default via "null://localhost" 16 | MAILER_URL=null://localhost 17 | ###< symfony/swiftmailer-bundle ### 18 | 19 | ###> doctrine/doctrine-bundle ### 20 | # Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url 21 | # For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data.db" 22 | # Configure your db driver and server_version in config/packages/doctrine.yaml 23 | DATABASE_URL=mysql://db_user:db_password@127.0.0.1:3306/db_name 24 | ###< doctrine/doctrine-bundle ### 25 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | ###> symfony/framework-bundle ### 3 | /.env 4 | /public/bundles/ 5 | /var/ 6 | /vendor/ 7 | ###< symfony/framework-bundle ### 8 | 9 | ###> symfony/webpack-encore-pack ### 10 | /node_modules/ 11 | /public/build/ 12 | npm-debug.log 13 | yarn-error.log 14 | ###< symfony/webpack-encore-pack ### 15 | 16 | ###> symfony/web-server-bundle ### 17 | /.web-server-pid 18 | ###< symfony/web-server-bundle ### 19 | 20 | ###> symfony/phpunit-bridge ### 21 | .phpunit 22 | /phpunit.xml 23 | ###< symfony/phpunit-bridge ### 24 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:7.2.1-apache 2 | 3 | MAINTAINER Pierre-Henri Bourdeau 4 | 5 | # Debian dep 6 | RUN apt-get update 7 | RUN apt-get install -y vim git libzip-dev zlib1g-dev zip unzip 8 | 9 | # Install php extensions 10 | RUN docker-php-ext-configure zip --with-libzip 11 | RUN docker-php-ext-install pdo pdo_mysql zip opcache 12 | 13 | # Install Composer 14 | COPY --from=composer:latest /usr/bin/composer /usr/bin/composer 15 | 16 | # Bashrc 17 | RUN rm /root/.bashrc 18 | COPY docker/.bashrc /root/.bashrc 19 | 20 | # Cleaning 21 | RUN rm -rf /etc/apache2/sites-available/* && rm -rf /etc/apache2/sites-enabled/* 22 | RUN service apache2 restart 23 | RUN rm -rf /var/www/* 24 | 25 | # Conf Apache2 26 | RUN mkdir /var/www/app 27 | RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf 28 | COPY docker/app.conf /etc/apache2/sites-available/app.conf 29 | RUN usermod -u 1000 www-data 30 | RUN a2ensite app.conf 31 | RUN service apache2 restart 32 | 33 | WORKDIR /var/www/app 34 | 35 | ENV COMPOSER_ALLOW_SUPERUSER=1 36 | 37 | COPY composer.json composer.lock ./ 38 | RUN composer install --prefer-dist --no-progress --no-suggest 39 | 40 | VOLUME /var/www/app/vendor 41 | 42 | # EXPOSE 80 43 | 44 | CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"] 45 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Docker Symfony 4 2 | ================== 3 | 4 | ## Install Docker 5 | 6 | See doc: https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/ 7 | 8 | ```bash 9 | sudo usermod -aG docker ${USER} 10 | sudo reboot 11 | ``` 12 | 13 | ## Install docker-symfony4 & containers 14 | 15 | ```bash 16 | git clone https://github.com/bourdeau/docker-symfony4.git && cd docker-symfony4 17 | 18 | vim .env 19 | # Edit env variables to match your application 20 | 21 | docker-compose up -d 22 | ``` 23 | 24 | ## Set up your Symfony4 application 25 | 26 | ```bash 27 | # The path you defined above in .env 28 | cd $SYMFONY_PATH 29 | vim .env 30 | # Set DATABASE_URL with the env variable you defined above 31 | ``` 32 | 33 | You are done! 34 | 35 | Visit: http://localhost:8080 36 | 37 | 38 | ## Connect to a container 39 | 40 | ```bash 41 | docker exec -it bash 42 | 43 | # Composer is intalled in the apache container so you can: 44 | cd /var/www/app && composer install --prefer-dist 45 | ``` 46 | 47 | ## Deploy to Heroku 48 | 49 | ```bash 50 | # Create the app 51 | heroku create bourdeau-symfony 52 | 53 | # Push the app 54 | heroku container:push symfony --app bourdeau-symfony 55 | 56 | # Add a dyno 57 | heroku ps:scale symfony=1 58 | 59 | heroku container:release symfony 60 | heroku open --app bourdeau-symfony 61 | 62 | heroku logs --tail 63 | 64 | # List dyno 65 | 66 | heroku ps 67 | # Restart a dyno 68 | heroku restart symfony.1 69 | ``` 70 | -------------------------------------------------------------------------------- /assets/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bourdeau/docker-symfony4/a678c4d12bfa418c81bbdf1f064c3489bf708101/assets/.gitignore -------------------------------------------------------------------------------- /bin/console: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | load(__DIR__.'/../.env'); 23 | } 24 | 25 | $input = new ArgvInput(); 26 | $env = $input->getParameterOption(['--env', '-e'], $_SERVER['APP_ENV'] ?? 'dev', true); 27 | $debug = (bool) ($_SERVER['APP_DEBUG'] ?? ('prod' !== $env)) && !$input->hasParameterOption('--no-debug', true); 28 | 29 | if ($debug) { 30 | umask(0000); 31 | 32 | if (class_exists(Debug::class)) { 33 | Debug::enable(); 34 | } 35 | } 36 | 37 | $kernel = new Kernel($env, $debug); 38 | $application = new Application($kernel); 39 | $application->run($input); 40 | -------------------------------------------------------------------------------- /bin/phpunit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | ['all' => true], 5 | Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true], 6 | Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle::class => ['all' => true], 7 | Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true], 8 | Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle::class => ['all' => true], 9 | Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true], 10 | Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true], 11 | Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true], 12 | Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true], 13 | Symfony\Bundle\WebServerBundle\WebServerBundle::class => ['dev' => true], 14 | Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true], 15 | Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true], 16 | Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true], 17 | ]; 18 | -------------------------------------------------------------------------------- /config/packages/dev/debug.yaml: -------------------------------------------------------------------------------- 1 | debug: 2 | # Forwards VarDumper Data clones to a centralized server allowing to inspect dumps on CLI or in your browser. 3 | # See the "server:dump" command to start a new server. 4 | dump_destination: "tcp://%env(VAR_DUMPER_SERVER)%" 5 | -------------------------------------------------------------------------------- /config/packages/dev/easy_log_handler.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | EasyCorp\EasyLog\EasyLogHandler: 3 | public: false 4 | arguments: ['%kernel.logs_dir%/%kernel.environment%.log'] 5 | 6 | #// FIXME: How to add this configuration automatically without messing up with the monolog configuration? 7 | #monolog: 8 | # handlers: 9 | # buffered: 10 | # type: buffer 11 | # handler: easylog 12 | # channels: ['!event'] 13 | # level: debug 14 | # easylog: 15 | # type: service 16 | # id: EasyCorp\EasyLog\EasyLogHandler 17 | -------------------------------------------------------------------------------- /config/packages/dev/monolog.yaml: -------------------------------------------------------------------------------- 1 | monolog: 2 | handlers: 3 | main: 4 | type: stream 5 | path: "%kernel.logs_dir%/%kernel.environment%.log" 6 | level: debug 7 | channels: ["!event"] 8 | # uncomment to get logging in your browser 9 | # you may have to allow bigger header sizes in your Web server configuration 10 | #firephp: 11 | # type: firephp 12 | # level: info 13 | #chromephp: 14 | # type: chromephp 15 | # level: info 16 | console: 17 | type: console 18 | process_psr_3_messages: false 19 | channels: ["!event", "!doctrine", "!console"] 20 | -------------------------------------------------------------------------------- /config/packages/dev/routing.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | router: 3 | strict_requirements: true 4 | -------------------------------------------------------------------------------- /config/packages/dev/swiftmailer.yaml: -------------------------------------------------------------------------------- 1 | # See https://symfony.com/doc/current/email/dev_environment.html 2 | swiftmailer: 3 | # send all emails to a specific address 4 | #delivery_addresses: ['me@example.com'] 5 | -------------------------------------------------------------------------------- /config/packages/dev/web_profiler.yaml: -------------------------------------------------------------------------------- 1 | web_profiler: 2 | toolbar: true 3 | intercept_redirects: false 4 | 5 | framework: 6 | profiler: { only_exceptions: false } 7 | -------------------------------------------------------------------------------- /config/packages/doctrine.yaml: -------------------------------------------------------------------------------- 1 | parameters: 2 | # Adds a fallback DATABASE_URL if the env var is not set. 3 | # This allows you to run cache:warmup even if your 4 | # environment variables are not available yet. 5 | # You should not need to change this value. 6 | env(DATABASE_URL): '' 7 | 8 | doctrine: 9 | dbal: 10 | # configure these for your database server 11 | driver: 'pdo_mysql' 12 | server_version: '5.7' 13 | charset: utf8mb4 14 | default_table_options: 15 | charset: utf8mb4 16 | collate: utf8mb4_unicode_ci 17 | 18 | url: '%env(resolve:DATABASE_URL)%' 19 | orm: 20 | auto_generate_proxy_classes: '%kernel.debug%' 21 | naming_strategy: doctrine.orm.naming_strategy.underscore 22 | auto_mapping: true 23 | mappings: 24 | App: 25 | is_bundle: false 26 | type: annotation 27 | dir: '%kernel.project_dir%/src/Entity' 28 | prefix: 'App\Entity' 29 | alias: App 30 | -------------------------------------------------------------------------------- /config/packages/doctrine_migrations.yaml: -------------------------------------------------------------------------------- 1 | doctrine_migrations: 2 | dir_name: '%kernel.project_dir%/src/Migrations' 3 | # namespace is arbitrary but should be different from App\Migrations 4 | # as migrations classes should NOT be autoloaded 5 | namespace: DoctrineMigrations 6 | -------------------------------------------------------------------------------- /config/packages/framework.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | secret: '%env(APP_SECRET)%' 3 | #default_locale: en 4 | #csrf_protection: true 5 | #http_method_override: true 6 | 7 | # Enables session support. Note that the session will ONLY be started if you read or write from it. 8 | # Remove or comment this section to explicitly disable session support. 9 | session: 10 | handler_id: ~ 11 | 12 | #esi: true 13 | #fragments: true 14 | php_errors: 15 | log: true 16 | 17 | cache: 18 | # Put the unique name of your app here: the prefix seed 19 | # is used to compute stable namespaces for cache keys. 20 | #prefix_seed: your_vendor_name/app_name 21 | 22 | # The app cache caches to the filesystem by default. 23 | # Other options include: 24 | 25 | # Redis 26 | #app: cache.adapter.redis 27 | #default_redis_provider: redis://localhost 28 | 29 | # APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues) 30 | #app: cache.adapter.apcu 31 | -------------------------------------------------------------------------------- /config/packages/prod/doctrine.yaml: -------------------------------------------------------------------------------- 1 | doctrine: 2 | orm: 3 | metadata_cache_driver: 4 | type: service 5 | id: doctrine.system_cache_provider 6 | query_cache_driver: 7 | type: service 8 | id: doctrine.system_cache_provider 9 | result_cache_driver: 10 | type: service 11 | id: doctrine.result_cache_provider 12 | 13 | services: 14 | doctrine.result_cache_provider: 15 | class: Symfony\Component\Cache\DoctrineProvider 16 | public: false 17 | arguments: 18 | - '@doctrine.result_cache_pool' 19 | doctrine.system_cache_provider: 20 | class: Symfony\Component\Cache\DoctrineProvider 21 | public: false 22 | arguments: 23 | - '@doctrine.system_cache_pool' 24 | 25 | framework: 26 | cache: 27 | pools: 28 | doctrine.result_cache_pool: 29 | adapter: cache.app 30 | doctrine.system_cache_pool: 31 | adapter: cache.system 32 | -------------------------------------------------------------------------------- /config/packages/prod/monolog.yaml: -------------------------------------------------------------------------------- 1 | monolog: 2 | handlers: 3 | main: 4 | type: fingers_crossed 5 | action_level: error 6 | handler: nested 7 | excluded_404s: 8 | # regex: exclude all 404 errors from the logs 9 | - ^/ 10 | nested: 11 | type: stream 12 | path: "%kernel.logs_dir%/%kernel.environment%.log" 13 | level: debug 14 | console: 15 | type: console 16 | process_psr_3_messages: false 17 | channels: ["!event", "!doctrine"] 18 | -------------------------------------------------------------------------------- /config/packages/routing.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | router: 3 | strict_requirements: ~ 4 | -------------------------------------------------------------------------------- /config/packages/security.yaml: -------------------------------------------------------------------------------- 1 | security: 2 | # https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers 3 | providers: 4 | in_memory: { memory: ~ } 5 | firewalls: 6 | dev: 7 | pattern: ^/(_(profiler|wdt)|css|images|js)/ 8 | security: false 9 | main: 10 | anonymous: true 11 | 12 | # activate different ways to authenticate 13 | 14 | # http_basic: true 15 | # https://symfony.com/doc/current/security.html#a-configuring-how-your-users-will-authenticate 16 | 17 | # form_login: true 18 | # https://symfony.com/doc/current/security/form_login_setup.html 19 | 20 | # Easy way to control access for large sections of your site 21 | # Note: Only the *first* access control that matches will be used 22 | access_control: 23 | # - { path: ^/admin, roles: ROLE_ADMIN } 24 | # - { path: ^/profile, roles: ROLE_USER } 25 | -------------------------------------------------------------------------------- /config/packages/sensio_framework_extra.yaml: -------------------------------------------------------------------------------- 1 | sensio_framework_extra: 2 | router: 3 | annotations: false 4 | -------------------------------------------------------------------------------- /config/packages/swiftmailer.yaml: -------------------------------------------------------------------------------- 1 | swiftmailer: 2 | url: '%env(MAILER_URL)%' 3 | spool: { type: 'memory' } 4 | -------------------------------------------------------------------------------- /config/packages/test/framework.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | test: true 3 | session: 4 | storage_id: session.storage.mock_file 5 | -------------------------------------------------------------------------------- /config/packages/test/monolog.yaml: -------------------------------------------------------------------------------- 1 | monolog: 2 | handlers: 3 | main: 4 | type: stream 5 | path: "%kernel.logs_dir%/%kernel.environment%.log" 6 | level: debug 7 | channels: ["!event"] 8 | -------------------------------------------------------------------------------- /config/packages/test/routing.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | router: 3 | strict_requirements: true 4 | -------------------------------------------------------------------------------- /config/packages/test/swiftmailer.yaml: -------------------------------------------------------------------------------- 1 | swiftmailer: 2 | disable_delivery: true 3 | -------------------------------------------------------------------------------- /config/packages/test/web_profiler.yaml: -------------------------------------------------------------------------------- 1 | web_profiler: 2 | toolbar: false 3 | intercept_redirects: false 4 | 5 | framework: 6 | profiler: { collect: false } 7 | -------------------------------------------------------------------------------- /config/packages/translation.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | default_locale: '%locale%' 3 | translator: 4 | paths: 5 | - '%kernel.project_dir%/translations' 6 | fallbacks: 7 | - '%locale%' 8 | -------------------------------------------------------------------------------- /config/packages/twig.yaml: -------------------------------------------------------------------------------- 1 | twig: 2 | paths: ['%kernel.project_dir%/templates'] 3 | debug: '%kernel.debug%' 4 | strict_variables: '%kernel.debug%' 5 | -------------------------------------------------------------------------------- /config/packages/validator.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | validation: 3 | email_validation_mode: html5 4 | -------------------------------------------------------------------------------- /config/routes.yaml: -------------------------------------------------------------------------------- 1 | #index: 2 | # path: / 3 | # controller: App\Controller\DefaultController::index 4 | -------------------------------------------------------------------------------- /config/routes/annotations.yaml: -------------------------------------------------------------------------------- 1 | controllers: 2 | resource: ../../src/Controller/ 3 | type: annotation 4 | -------------------------------------------------------------------------------- /config/routes/dev/twig.yaml: -------------------------------------------------------------------------------- 1 | _errors: 2 | resource: '@TwigBundle/Resources/config/routing/errors.xml' 3 | prefix: /_error 4 | -------------------------------------------------------------------------------- /config/routes/dev/web_profiler.yaml: -------------------------------------------------------------------------------- 1 | web_profiler_wdt: 2 | resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml' 3 | prefix: /_wdt 4 | 5 | web_profiler_profiler: 6 | resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml' 7 | prefix: /_profiler 8 | -------------------------------------------------------------------------------- /config/services.yaml: -------------------------------------------------------------------------------- 1 | # Put parameters here that don't need to change on each machine where the app is deployed 2 | # https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration 3 | parameters: 4 | locale: 'en' 5 | 6 | services: 7 | # default configuration for services in *this* file 8 | _defaults: 9 | autowire: true # Automatically injects dependencies in your services. 10 | autoconfigure: true # Automatically registers your services as commands, event subscribers, etc. 11 | public: false # Allows optimizing the container by removing unused services; this also means 12 | # fetching services directly from the container via $container->get() won't work. 13 | # The best practice is to be explicit about your dependencies anyway. 14 | 15 | # makes classes in src/ available to be used as services 16 | # this creates a service per class whose id is the fully-qualified class name 17 | App\: 18 | resource: '../src/*' 19 | exclude: '../src/{Entity,Migrations,Tests,Kernel.php}' 20 | 21 | # controllers are imported separately to make sure services can be injected 22 | # as action arguments even if you don't extend any base controller class 23 | App\Controller\: 24 | resource: '../src/Controller' 25 | tags: ['controller.service_arguments'] 26 | 27 | # add more service definitions when explicit configuration is needed 28 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.4" 2 | 3 | services: 4 | 5 | symfony: 6 | build: . 7 | container_name: symfony 8 | volumes: 9 | - ${SYMFONY_PATH}:/var/www/app 10 | tty: true 11 | depends_on: 12 | - db 13 | env_file: 14 | - ./.env 15 | ports: 16 | - "8080:80" 17 | 18 | db: 19 | image: mysql:5.7 20 | container_name: mysql 21 | volumes: 22 | - db_data:/var/lib/mysql 23 | environment: 24 | MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASS} 25 | MYSQL_DATABASE: ${SYMFONY_DB_NAME} 26 | MYSQL_USER: ${SYMFONY_DB_USER} 27 | MYSQL_PASSWORD: ${SYMFONY_DB_PATH} 28 | ports: 29 | - "3307:3306" 30 | 31 | volumes: 32 | db_data: 33 | -------------------------------------------------------------------------------- /docker/.bashrc: -------------------------------------------------------------------------------- 1 | # ~/.bashrc: executed by bash(1) for non-login shells. 2 | # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) 3 | # for examples 4 | 5 | # If not running interactively, don't do anything 6 | case $- in 7 | *i*) ;; 8 | *) return;; 9 | esac 10 | 11 | # don't put duplicate lines or lines starting with space in the history. 12 | # See bash(1) for more options 13 | HISTCONTROL=ignoreboth 14 | 15 | # append to the history file, don't overwrite it 16 | shopt -s histappend 17 | 18 | # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) 19 | HISTSIZE=1000 20 | HISTFILESIZE=2000 21 | 22 | # check the window size after each command and, if necessary, 23 | # update the values of LINES and COLUMNS. 24 | shopt -s checkwinsize 25 | 26 | # If set, the pattern "**" used in a pathname expansion context will 27 | # match all files and zero or more directories and subdirectories. 28 | #shopt -s globstar 29 | 30 | # make less more friendly for non-text input files, see lesspipe(1) 31 | [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" 32 | 33 | # set variable identifying the chroot you work in (used in the prompt below) 34 | if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then 35 | debian_chroot=$(cat /etc/debian_chroot) 36 | fi 37 | 38 | # set a fancy prompt (non-color, unless we know we "want" color) 39 | case "$TERM" in 40 | xterm-color|*-256color) color_prompt=yes;; 41 | esac 42 | 43 | # uncomment for a colored prompt, if the terminal has the capability; turned 44 | # off by default to not distract the user: the focus in a terminal window 45 | # should be on the output of commands, not on the prompt 46 | force_color_prompt=yes 47 | 48 | if [ -n "$force_color_prompt" ]; then 49 | if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then 50 | # We have color support; assume it's compliant with Ecma-48 51 | # (ISO/IEC-6429). (Lack of such support is extremely rare, and such 52 | # a case would tend to support setf rather than setaf.) 53 | color_prompt=yes 54 | else 55 | color_prompt= 56 | fi 57 | fi 58 | 59 | if [ "$color_prompt" = yes ]; then 60 | PS1='${debian_chroot:+($debian_chroot)}\[\033[01;33m\]\u\[\033[01;34m\]🐳\[\033[01;32m\]\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' 61 | else 62 | PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' 63 | fi 64 | unset color_prompt force_color_prompt 65 | 66 | # If this is an xterm set the title to user@host:dir 67 | case "$TERM" in 68 | xterm*|rxvt*) 69 | PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" 70 | ;; 71 | *) 72 | ;; 73 | esac 74 | 75 | # enable color support of ls and also add handy aliases 76 | if [ -x /usr/bin/dircolors ]; then 77 | test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" 78 | alias ls='ls --color=auto' 79 | #alias dir='dir --color=auto' 80 | #alias vdir='vdir --color=auto' 81 | 82 | alias grep='grep --color=auto' 83 | alias fgrep='fgrep --color=auto' 84 | alias egrep='egrep --color=auto' 85 | fi 86 | 87 | # colored GCC warnings and errors 88 | #export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' 89 | 90 | # some more ls aliases 91 | alias ll='ls -alF' 92 | alias la='ls -A' 93 | alias l='ls -CF' 94 | 95 | # Add an "alert" alias for long running commands. Use like so: 96 | # sleep 10; alert 97 | alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' 98 | 99 | 100 | # enable programmable completion features (you don't need to enable 101 | # this, if it's already enabled in /etc/bash.bashrc and /etc/profile 102 | # sources /etc/bash.bashrc). 103 | if ! shopt -oq posix; then 104 | if [ -f /usr/share/bash-completion/bash_completion ]; then 105 | . /usr/share/bash-completion/bash_completion 106 | elif [ -f /etc/bash_completion ]; then 107 | . /etc/bash_completion 108 | fi 109 | fi 110 | -------------------------------------------------------------------------------- /docker/app.conf: -------------------------------------------------------------------------------- 1 | 2 | ServerName localhost 3 | DocumentRoot /var/www/app/public 4 | 5 | Options -Indexes 6 | AllowOverride All 7 | Require all granted 8 | 9 | 10 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "devDependencies": { 3 | "@symfony/webpack-encore": "^0.19.0" 4 | }, 5 | "license": "UNLICENSED", 6 | "private": true, 7 | "scripts": { 8 | "dev-server": "encore dev-server", 9 | "dev": "encore dev", 10 | "watch": "encore dev --watch", 11 | "build": "encore production" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | tests/ 44 | 45 | 46 | 47 | 48 | 49 | ./src/ 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | # Use the front controller as index file. It serves as a fallback solution when 2 | # every other rewrite/redirect fails (e.g. in an aliased environment without 3 | # mod_rewrite). Additionally, this reduces the matching process for the 4 | # start page (path "/") because otherwise Apache will apply the rewriting rules 5 | # to each configured DirectoryIndex file (e.g. index.php, index.html, index.pl). 6 | DirectoryIndex index.php 7 | 8 | # By default, Apache does not evaluate symbolic links if you did not enable this 9 | # feature in your server configuration. Uncomment the following line if you 10 | # install assets as symlinks or if you experience problems related to symlinks 11 | # when compiling LESS/Sass/CoffeScript assets. 12 | # Options FollowSymlinks 13 | 14 | # Disabling MultiViews prevents unwanted negotiation, e.g. "/index" should not resolve 15 | # to the front controller "/index.php" but be rewritten to "/index.php/index". 16 | 17 | Options -MultiViews 18 | 19 | 20 | 21 | RewriteEngine On 22 | 23 | # Determine the RewriteBase automatically and set it as environment variable. 24 | # If you are using Apache aliases to do mass virtual hosting or installed the 25 | # project in a subdirectory, the base path will be prepended to allow proper 26 | # resolution of the index.php file and to redirect to the correct URI. It will 27 | # work in environments without path prefix as well, providing a safe, one-size 28 | # fits all solution. But as you do not need it in this case, you can comment 29 | # the following 2 lines to eliminate the overhead. 30 | RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$ 31 | RewriteRule ^(.*) - [E=BASE:%1] 32 | 33 | # Sets the HTTP_AUTHORIZATION header removed by Apache 34 | RewriteCond %{HTTP:Authorization} . 35 | RewriteRule ^ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 36 | 37 | # Redirect to URI without front controller to prevent duplicate content 38 | # (with and without `/index.php`). Only do this redirect on the initial 39 | # rewrite by Apache and not on subsequent cycles. Otherwise we would get an 40 | # endless redirect loop (request -> rewrite to front controller -> 41 | # redirect -> request -> ...). 42 | # So in case you get a "too many redirects" error or you always get redirected 43 | # to the start page because your Apache does not expose the REDIRECT_STATUS 44 | # environment variable, you have 2 choices: 45 | # - disable this feature by commenting the following 2 lines or 46 | # - use Apache >= 2.3.9 and replace all L flags by END flags and remove the 47 | # following RewriteCond (best solution) 48 | RewriteCond %{ENV:REDIRECT_STATUS} ^$ 49 | RewriteRule ^index\.php(?:/(.*)|$) %{ENV:BASE}/$1 [R=301,L] 50 | 51 | # If the requested filename exists, simply serve it. 52 | # We only want to let Apache serve files and not directories. 53 | RewriteCond %{REQUEST_FILENAME} -f 54 | RewriteRule ^ - [L] 55 | 56 | # Rewrite all other queries to the front controller. 57 | RewriteRule ^ %{ENV:BASE}/index.php [L] 58 | 59 | 60 | 61 | 62 | # When mod_rewrite is not available, we instruct a temporary redirect of 63 | # the start page to the front controller explicitly so that the website 64 | # and the generated links can still be used. 65 | RedirectMatch 307 ^/$ /index.php/ 66 | # RedirectTemp cannot be used instead 67 | 68 | 69 | -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | load(__DIR__.'/../.env'); 16 | } 17 | 18 | $env = $_SERVER['APP_ENV'] ?? 'dev'; 19 | $debug = (bool) ($_SERVER['APP_DEBUG'] ?? ('prod' !== $env)); 20 | 21 | if ($debug) { 22 | umask(0000); 23 | 24 | Debug::enable(); 25 | } 26 | 27 | 28 | 29 | if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? false) { 30 | Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_ALL ^ Request::HEADER_X_FORWARDED_HOST); 31 | } 32 | 33 | if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? false) { 34 | Request::setTrustedHosts(explode(',', $trustedHosts)); 35 | } 36 | 37 | $kernel = new Kernel($env, $debug); 38 | $request = Request::createFromGlobals(); 39 | $response = $kernel->handle($request); 40 | $response->send(); 41 | $kernel->terminate($request, $response); 42 | -------------------------------------------------------------------------------- /src/Controller/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bourdeau/docker-symfony4/a678c4d12bfa418c81bbdf1f064c3489bf708101/src/Controller/.gitignore -------------------------------------------------------------------------------- /src/Controller/DefaultController.php: -------------------------------------------------------------------------------- 1 | Welcome to Me' 16 | ); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Entity/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bourdeau/docker-symfony4/a678c4d12bfa418c81bbdf1f064c3489bf708101/src/Entity/.gitignore -------------------------------------------------------------------------------- /src/Kernel.php: -------------------------------------------------------------------------------- 1 | getProjectDir().'/var/cache/'.$this->environment; 21 | } 22 | 23 | public function getLogDir() 24 | { 25 | return $this->getProjectDir().'/var/log'; 26 | } 27 | 28 | public function registerBundles() 29 | { 30 | $contents = require $this->getProjectDir().'/config/bundles.php'; 31 | foreach ($contents as $class => $envs) { 32 | if (isset($envs['all']) || isset($envs[$this->environment])) { 33 | yield new $class(); 34 | } 35 | } 36 | } 37 | 38 | protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader) 39 | { 40 | $container->addResource(new FileResource($this->getProjectDir().'/config/bundles.php')); 41 | // Feel free to remove the "container.autowiring.strict_mode" parameter 42 | // if you are using symfony/dependency-injection 4.0+ as it's the default behavior 43 | $container->setParameter('container.autowiring.strict_mode', true); 44 | $container->setParameter('container.dumper.inline_class_loader', true); 45 | $confDir = $this->getProjectDir().'/config'; 46 | 47 | $loader->load($confDir.'/{packages}/*'.self::CONFIG_EXTS, 'glob'); 48 | $loader->load($confDir.'/{packages}/'.$this->environment.'/**/*'.self::CONFIG_EXTS, 'glob'); 49 | $loader->load($confDir.'/{services}'.self::CONFIG_EXTS, 'glob'); 50 | $loader->load($confDir.'/{services}_'.$this->environment.self::CONFIG_EXTS, 'glob'); 51 | } 52 | 53 | protected function configureRoutes(RouteCollectionBuilder $routes) 54 | { 55 | $confDir = $this->getProjectDir().'/config'; 56 | 57 | $routes->import($confDir.'/{routes}/*'.self::CONFIG_EXTS, '/', 'glob'); 58 | $routes->import($confDir.'/{routes}/'.$this->environment.'/**/*'.self::CONFIG_EXTS, '/', 'glob'); 59 | $routes->import($confDir.'/{routes}'.self::CONFIG_EXTS, '/', 'glob'); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/Migrations/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bourdeau/docker-symfony4/a678c4d12bfa418c81bbdf1f064c3489bf708101/src/Migrations/.gitignore -------------------------------------------------------------------------------- /src/Repository/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bourdeau/docker-symfony4/a678c4d12bfa418c81bbdf1f064c3489bf708101/src/Repository/.gitignore -------------------------------------------------------------------------------- /symfony.lock: -------------------------------------------------------------------------------- 1 | { 2 | "doctrine/annotations": { 3 | "version": "1.0", 4 | "recipe": { 5 | "repo": "github.com/symfony/recipes", 6 | "branch": "master", 7 | "version": "1.0", 8 | "ref": "cb4152ebcadbe620ea2261da1a1c5a9b8cea7672" 9 | } 10 | }, 11 | "doctrine/cache": { 12 | "version": "1.9.x-dev" 13 | }, 14 | "doctrine/collections": { 15 | "version": "1.6.x-dev" 16 | }, 17 | "doctrine/common": { 18 | "version": "2.9.x-dev" 19 | }, 20 | "doctrine/dbal": { 21 | "version": "2.9.x-dev" 22 | }, 23 | "doctrine/doctrine-bundle": { 24 | "version": "1.6", 25 | "recipe": { 26 | "repo": "github.com/symfony/recipes", 27 | "branch": "master", 28 | "version": "1.6", 29 | "ref": "ae205d5114e719deb64d2110f56ef910787d1e04" 30 | } 31 | }, 32 | "doctrine/doctrine-cache-bundle": { 33 | "version": "1.3.x-dev" 34 | }, 35 | "doctrine/doctrine-migrations-bundle": { 36 | "version": "1.2", 37 | "recipe": { 38 | "repo": "github.com/symfony/recipes", 39 | "branch": "master", 40 | "version": "1.2", 41 | "ref": "c1431086fec31f17fbcfe6d6d7e92059458facc1" 42 | } 43 | }, 44 | "doctrine/event-manager": { 45 | "version": "1.0.x-dev" 46 | }, 47 | "doctrine/inflector": { 48 | "version": "1.3.x-dev" 49 | }, 50 | "doctrine/instantiator": { 51 | "version": "1.2.x-dev" 52 | }, 53 | "doctrine/lexer": { 54 | "version": "1.0.x-dev" 55 | }, 56 | "doctrine/migrations": { 57 | "version": "1.8.x-dev" 58 | }, 59 | "doctrine/orm": { 60 | "version": "2.7.x-dev" 61 | }, 62 | "doctrine/persistence": { 63 | "version": "1.0.x-dev" 64 | }, 65 | "doctrine/reflection": { 66 | "version": "1.0.x-dev" 67 | }, 68 | "easycorp/easy-log-handler": { 69 | "version": "1.0", 70 | "recipe": { 71 | "repo": "github.com/symfony/recipes", 72 | "branch": "master", 73 | "version": "1.0", 74 | "ref": "70062abc2cd58794d2a90274502f81b55cd9951b" 75 | } 76 | }, 77 | "egulias/email-validator": { 78 | "version": "2.1.6" 79 | }, 80 | "facebook/webdriver": { 81 | "version": "1.6.0" 82 | }, 83 | "fig/link-util": { 84 | "version": "1.0.x-dev" 85 | }, 86 | "jdorn/sql-formatter": { 87 | "version": "1.3.x-dev" 88 | }, 89 | "monolog/monolog": { 90 | "version": "1.x-dev" 91 | }, 92 | "nikic/php-parser": { 93 | "version": "4.1-dev" 94 | }, 95 | "ocramius/package-versions": { 96 | "version": "1.4.0" 97 | }, 98 | "ocramius/proxy-manager": { 99 | "version": "2.2.x-dev" 100 | }, 101 | "phpdocumentor/reflection-common": { 102 | "version": "1.0.1" 103 | }, 104 | "phpdocumentor/reflection-docblock": { 105 | "version": "4.3.0" 106 | }, 107 | "phpdocumentor/type-resolver": { 108 | "version": "0.4.0" 109 | }, 110 | "psr/cache": { 111 | "version": "1.0.x-dev" 112 | }, 113 | "psr/container": { 114 | "version": "1.0.x-dev" 115 | }, 116 | "psr/link": { 117 | "version": "1.0.x-dev" 118 | }, 119 | "psr/log": { 120 | "version": "1.0.x-dev" 121 | }, 122 | "psr/simple-cache": { 123 | "version": "1.0.x-dev" 124 | }, 125 | "sensio/framework-extra-bundle": { 126 | "version": "5.2", 127 | "recipe": { 128 | "repo": "github.com/symfony/recipes", 129 | "branch": "master", 130 | "version": "5.2", 131 | "ref": "fb7e19da7f013d0d422fa9bce16f5c510e27609b" 132 | } 133 | }, 134 | "swiftmailer/swiftmailer": { 135 | "version": "6.1-dev" 136 | }, 137 | "symfony/apache-pack": { 138 | "version": "1.0", 139 | "recipe": { 140 | "repo": "github.com/symfony/recipes-contrib", 141 | "branch": "master", 142 | "version": "1.0", 143 | "ref": "c82bead70f9a4f656354a193df7bf0ca2114efa0" 144 | } 145 | }, 146 | "symfony/asset": { 147 | "version": "4.2-dev" 148 | }, 149 | "symfony/browser-kit": { 150 | "version": "4.2-dev" 151 | }, 152 | "symfony/cache": { 153 | "version": "4.2-dev" 154 | }, 155 | "symfony/config": { 156 | "version": "4.2-dev" 157 | }, 158 | "symfony/console": { 159 | "version": "3.3", 160 | "recipe": { 161 | "repo": "github.com/symfony/recipes", 162 | "branch": "master", 163 | "version": "3.3", 164 | "ref": "e3868d2f4a5104f19f844fe551099a00c6562527" 165 | } 166 | }, 167 | "symfony/contracts": { 168 | "version": "1.0-dev" 169 | }, 170 | "symfony/css-selector": { 171 | "version": "4.2-dev" 172 | }, 173 | "symfony/debug": { 174 | "version": "4.2-dev" 175 | }, 176 | "symfony/debug-bundle": { 177 | "version": "4.1", 178 | "recipe": { 179 | "repo": "github.com/symfony/recipes", 180 | "branch": "master", 181 | "version": "4.1", 182 | "ref": "f8863cbad2f2e58c4b65fa1eac892ab189971bea" 183 | } 184 | }, 185 | "symfony/debug-pack": { 186 | "version": "dev-master" 187 | }, 188 | "symfony/dependency-injection": { 189 | "version": "4.2-dev" 190 | }, 191 | "symfony/doctrine-bridge": { 192 | "version": "4.2-dev" 193 | }, 194 | "symfony/dom-crawler": { 195 | "version": "4.2-dev" 196 | }, 197 | "symfony/dotenv": { 198 | "version": "4.2-dev" 199 | }, 200 | "symfony/event-dispatcher": { 201 | "version": "4.2-dev" 202 | }, 203 | "symfony/expression-language": { 204 | "version": "4.2-dev" 205 | }, 206 | "symfony/filesystem": { 207 | "version": "4.2-dev" 208 | }, 209 | "symfony/finder": { 210 | "version": "4.2-dev" 211 | }, 212 | "symfony/flex": { 213 | "version": "1.0", 214 | "recipe": { 215 | "repo": "github.com/symfony/recipes", 216 | "branch": "master", 217 | "version": "1.0", 218 | "ref": "e921bdbfe20cdefa3b82f379d1cd36df1bc8d115" 219 | } 220 | }, 221 | "symfony/form": { 222 | "version": "4.2-dev" 223 | }, 224 | "symfony/framework-bundle": { 225 | "version": "4.2", 226 | "recipe": { 227 | "repo": "github.com/symfony/recipes", 228 | "branch": "master", 229 | "version": "4.2", 230 | "ref": "c707603542a6715e71df7f02d249621f85b63de3" 231 | } 232 | }, 233 | "symfony/http-foundation": { 234 | "version": "4.2-dev" 235 | }, 236 | "symfony/http-kernel": { 237 | "version": "4.2-dev" 238 | }, 239 | "symfony/inflector": { 240 | "version": "4.2-dev" 241 | }, 242 | "symfony/intl": { 243 | "version": "4.2-dev" 244 | }, 245 | "symfony/maker-bundle": { 246 | "version": "1.0", 247 | "recipe": { 248 | "repo": "github.com/symfony/recipes", 249 | "branch": "master", 250 | "version": "1.0", 251 | "ref": "fadbfe33303a76e25cb63401050439aa9b1a9c7f" 252 | } 253 | }, 254 | "symfony/mime": { 255 | "version": "4.3-dev" 256 | }, 257 | "symfony/monolog-bridge": { 258 | "version": "4.2-dev" 259 | }, 260 | "symfony/monolog-bundle": { 261 | "version": "3.1", 262 | "recipe": { 263 | "repo": "github.com/symfony/recipes", 264 | "branch": "master", 265 | "version": "3.1", 266 | "ref": "18ebf5a940573a20de06f9c4060101eeb438cf3d" 267 | } 268 | }, 269 | "symfony/options-resolver": { 270 | "version": "4.2-dev" 271 | }, 272 | "symfony/orm-pack": { 273 | "version": "dev-master" 274 | }, 275 | "symfony/panther": { 276 | "version": "1.0.x-dev" 277 | }, 278 | "symfony/phpunit-bridge": { 279 | "version": "4.1", 280 | "recipe": { 281 | "repo": "github.com/symfony/recipes", 282 | "branch": "master", 283 | "version": "4.1", 284 | "ref": "b14c7f62fabeedf256d3211b0f704402b5530ba1" 285 | } 286 | }, 287 | "symfony/polyfill-intl-icu": { 288 | "version": "1.9-dev" 289 | }, 290 | "symfony/polyfill-intl-idn": { 291 | "version": "v1.10.0" 292 | }, 293 | "symfony/polyfill-mbstring": { 294 | "version": "1.9-dev" 295 | }, 296 | "symfony/polyfill-php72": { 297 | "version": "1.9-dev" 298 | }, 299 | "symfony/polyfill-php73": { 300 | "version": "1.11-dev" 301 | }, 302 | "symfony/process": { 303 | "version": "4.2-dev" 304 | }, 305 | "symfony/profiler-pack": { 306 | "version": "v1.0.3" 307 | }, 308 | "symfony/property-access": { 309 | "version": "4.2-dev" 310 | }, 311 | "symfony/property-info": { 312 | "version": "4.2-dev" 313 | }, 314 | "symfony/routing": { 315 | "version": "4.2", 316 | "recipe": { 317 | "repo": "github.com/symfony/recipes", 318 | "branch": "master", 319 | "version": "4.2", 320 | "ref": "5374e24d508ba8fd6ba9eb15170255fdb778316a" 321 | } 322 | }, 323 | "symfony/security-bundle": { 324 | "version": "3.3", 325 | "recipe": { 326 | "repo": "github.com/symfony/recipes", 327 | "branch": "master", 328 | "version": "3.3", 329 | "ref": "f8a63faa0d9521526499c0a8f403c9964ecb0527" 330 | } 331 | }, 332 | "symfony/security-core": { 333 | "version": "4.2-dev" 334 | }, 335 | "symfony/security-csrf": { 336 | "version": "4.2-dev" 337 | }, 338 | "symfony/security-guard": { 339 | "version": "4.2-dev" 340 | }, 341 | "symfony/security-http": { 342 | "version": "4.2-dev" 343 | }, 344 | "symfony/serializer": { 345 | "version": "4.2-dev" 346 | }, 347 | "symfony/serializer-pack": { 348 | "version": "dev-master" 349 | }, 350 | "symfony/stopwatch": { 351 | "version": "4.2-dev" 352 | }, 353 | "symfony/swiftmailer-bundle": { 354 | "version": "2.5", 355 | "recipe": { 356 | "repo": "github.com/symfony/recipes", 357 | "branch": "master", 358 | "version": "2.5", 359 | "ref": "3db029c03e452b4a23f7fc45cec7c922c2247eb8" 360 | } 361 | }, 362 | "symfony/test-pack": { 363 | "version": "v1.0.2" 364 | }, 365 | "symfony/translation": { 366 | "version": "3.3", 367 | "recipe": { 368 | "repo": "github.com/symfony/recipes", 369 | "branch": "master", 370 | "version": "3.3", 371 | "ref": "1fb02a6e1c8f3d4232cce485c9afa868d63b115a" 372 | } 373 | }, 374 | "symfony/twig-bridge": { 375 | "version": "4.2-dev" 376 | }, 377 | "symfony/twig-bundle": { 378 | "version": "3.3", 379 | "recipe": { 380 | "repo": "github.com/symfony/recipes", 381 | "branch": "master", 382 | "version": "3.3", 383 | "ref": "369b5b29dc52b2c190002825ae7ec24ab6f962dd" 384 | } 385 | }, 386 | "symfony/validator": { 387 | "version": "4.1", 388 | "recipe": { 389 | "repo": "github.com/symfony/recipes", 390 | "branch": "master", 391 | "version": "4.1", 392 | "ref": "0cdc982334f45d554957a6167e030482795bf9d7" 393 | } 394 | }, 395 | "symfony/var-dumper": { 396 | "version": "4.2-dev" 397 | }, 398 | "symfony/var-exporter": { 399 | "version": "4.2-dev" 400 | }, 401 | "symfony/web-link": { 402 | "version": "4.2-dev" 403 | }, 404 | "symfony/web-profiler-bundle": { 405 | "version": "3.3", 406 | "recipe": { 407 | "repo": "github.com/symfony/recipes", 408 | "branch": "master", 409 | "version": "3.3", 410 | "ref": "6bdfa1a95f6b2e677ab985cd1af2eae35d62e0f6" 411 | } 412 | }, 413 | "symfony/web-server-bundle": { 414 | "version": "3.3", 415 | "recipe": { 416 | "repo": "github.com/symfony/recipes", 417 | "branch": "master", 418 | "version": "3.3", 419 | "ref": "dae9b39fd6717970be7601101ce5aa960bf53d9a" 420 | } 421 | }, 422 | "symfony/yaml": { 423 | "version": "4.2-dev" 424 | }, 425 | "twig/twig": { 426 | "version": "2.x-dev" 427 | }, 428 | "webmozart/assert": { 429 | "version": "1.3-dev" 430 | }, 431 | "zendframework/zend-code": { 432 | "version": "3.3-dev" 433 | } 434 | } 435 | -------------------------------------------------------------------------------- /templates/base.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {% block title %}Welcome!{% endblock %} 6 | {% block stylesheets %}{% endblock %} 7 | 8 | 9 | {% block body %}{% endblock %} 10 | {% block javascripts %}{% endblock %} 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bourdeau/docker-symfony4/a678c4d12bfa418c81bbdf1f064c3489bf708101/tests/.gitignore -------------------------------------------------------------------------------- /translations/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bourdeau/docker-symfony4/a678c4d12bfa418c81bbdf1f064c3489bf708101/translations/.gitignore --------------------------------------------------------------------------------