feat: add native Xdebug support (#271)

* feat: add native Xdebug support

* cleanup

* fix review

* fix review

* Improve docs

* some more improvements

* remove useless env var
This commit is contained in:
Kévin Dunglas
2022-08-04 14:47:59 +02:00
committed by GitHub
parent 062e9f1986
commit 17a02310d5
8 changed files with 77 additions and 115 deletions

View File

@@ -1,13 +1,5 @@
expose_php = 0
date.timezone = UTC
apc.enable_cli = 1
session.use_strict_mode = 1
zend.detect_unicode = 0
# https://symfony.com/doc/current/performance.html
realpath_cache_size = 4096K
realpath_cache_ttl = 600
opcache.interned_strings_buffer = 16
opcache.max_accelerated_files = 20000
opcache.memory_consumption = 256
opcache.enable_file_override = 1
; See https://docs.docker.com/desktop/networking/#i-want-to-connect-from-a-container-to-a-service-on-the-host
; See https://github.com/docker/for-linux/issues/264
; The `client_host` below may optionally be replaced with `discover_client_host=yes`
; Add `start_with_request=yes` to start debug session on each request
xdebug.client_host = 'host.docker.internal'

View File

@@ -0,0 +1,13 @@
expose_php = 0
date.timezone = UTC
apc.enable_cli = 1
session.use_strict_mode = 1
zend.detect_unicode = 0
; https://symfony.com/doc/current/performance.html
realpath_cache_size = 4096K
realpath_cache_ttl = 600
opcache.interned_strings_buffer = 16
opcache.max_accelerated_files = 20000
opcache.memory_consumption = 256
opcache.enable_file_override = 1

View File

@@ -1,15 +1,2 @@
expose_php = 0
date.timezone = UTC
apc.enable_cli = 1
session.use_strict_mode = 1
zend.detect_unicode = 0
# https://symfony.com/doc/current/performance.html
realpath_cache_size = 4096K
realpath_cache_ttl = 600
opcache.interned_strings_buffer = 16
opcache.max_accelerated_files = 20000
opcache.memory_consumption = 256
opcache.enable_file_override = 1
opcache.preload_user=www-data
opcache.preload=/srv/app/config/preload.php
opcache.preload_user = www-data
opcache.preload = /srv/app/config/preload.php

View File

@@ -7,13 +7,9 @@ if [ "${1#-}" != "$1" ]; then
fi
if [ "$1" = 'php-fpm' ] || [ "$1" = 'php' ] || [ "$1" = 'bin/console' ]; then
if [ "$APP_ENV" != 'prod' ]; then
ln -sf "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"
fi
mkdir -p var/cache var/log
# The first time volumes are mounted, the project needs to be recreated
# The first time volumes are mounted, the project needs to be created
if [ ! -f composer.json ]; then
CREATION=1
composer create-project "$SKELETON $SYMFONY_VERSION" tmp --stability="$STABILITY" --prefer-dist --no-progress --no-interaction --no-install
@@ -28,7 +24,6 @@ if [ "$1" = 'php-fpm' ] || [ "$1" = 'php' ] || [ "$1" = 'bin/console' ]; then
fi
if [ "$APP_ENV" != 'prod' ]; then
rm -f .env.local.php
composer install --prefer-dist --no-progress --no-interaction
fi