Cannot load Xdebug - it was already loaded (#2123)

zend_extension=xdebug.so is already in /etc/php/7.2/cli/conf.d/20-xdebug.ini

rediefing the alias causes the was already loaded notice.

also /var/www/vendor/bin/phpunit instead of ./vendor/bin/phpunit breaks the alias when vendor directory is not directly under the root app directory
This commit is contained in:
Marco Manieri 2019-07-22 16:31:46 +02:00 committed by Shao Yu-Lung (Allen)
parent 69aa0b2b6a
commit 3a4c9158d2
1 changed files with 1 additions and 2 deletions

View File

@ -314,8 +314,7 @@ ARG INSTALL_XDEBUG=false
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
# Load the xdebug extension only with phpunit commands
apt-get install -y php${LARADOCK_PHP_VERSION}-xdebug && \
sed -i 's/^;//g' /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/20-xdebug.ini && \
echo "alias phpunit='php -dzend_extension=xdebug.so /var/www/vendor/bin/phpunit'" >> ~/.bashrc \
sed -i 's/^;//g' /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/20-xdebug.ini \
;fi
# ADD for REMOTE debugging