support xdebug 3
This commit is contained in:
parent
4cf39da90d
commit
de70beae47
@ -187,6 +187,9 @@ ARG INSTALL_XDEBUG=false
|
||||
|
||||
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
||||
# Install the xdebug extension
|
||||
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then \
|
||||
pecl install xdebug-3.0.0; \
|
||||
else \
|
||||
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
||||
pecl install xdebug-2.5.5; \
|
||||
else \
|
||||
@ -195,6 +198,7 @@ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
||||
else \
|
||||
pecl install xdebug-2.9.8; \
|
||||
fi \
|
||||
fi \
|
||||
fi && \
|
||||
docker-php-ext-enable xdebug \
|
||||
;fi
|
||||
@ -202,9 +206,20 @@ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
||||
# Copy xdebug configuration for remote debugging
|
||||
COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
|
||||
|
||||
RUN sed -i "s/xdebug.remote_autostart=0/xdebug.remote_autostart=1/" /usr/local/etc/php/conf.d/xdebug.ini && \
|
||||
sed -i "s/xdebug.remote_enable=0/xdebug.remote_enable=1/" /usr/local/etc/php/conf.d/xdebug.ini && \
|
||||
sed -i "s/xdebug.cli_color=0/xdebug.cli_color=1/" /usr/local/etc/php/conf.d/xdebug.ini
|
||||
RUN if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then \
|
||||
sed -i "s/xdebug.remote_host=/xdebug.client_host=/" /usr/local/etc/php/conf.d/xdebug.ini && \
|
||||
sed -i "s/xdebug.remote_connect_back=0/xdebug.discover_client_host=false/" /usr/local/etc/php/conf.d/xdebug.ini && \
|
||||
sed -i "s/xdebug.remote_port=9000/xdebug.client_port=9003/" /usr/local/etc/php/conf.d/xdebug.ini && \
|
||||
sed -i "s/xdebug.profiler_enable=0/; xdebug.profiler_enable=0/" /usr/local/etc/php/conf.d/xdebug.ini && \
|
||||
sed -i "s/xdebug.profiler_output_dir=/xdebug.output_dir=/" /usr/local/etc/php/conf.d/xdebug.ini && \
|
||||
sed -i "s/xdebug.remote_mode=req/; xdebug.remote_mode=req/" /usr/local/etc/php/conf.d/xdebug.ini && \
|
||||
sed -i "s/xdebug.remote_autostart=0/xdebug.start_with_request=yes/" /usr/local/etc/php/conf.d/xdebug.ini && \
|
||||
sed -i "s/xdebug.remote_enable=0/xdebug.mode=debug/" /usr/local/etc/php/conf.d/xdebug.ini \
|
||||
;else \
|
||||
sed -i "s/xdebug.remote_autostart=0/xdebug.remote_autostart=1/" /usr/local/etc/php/conf.d/xdebug.ini && \
|
||||
sed -i "s/xdebug.remote_enable=0/xdebug.remote_enable=1/" /usr/local/etc/php/conf.d/xdebug.ini \
|
||||
;fi
|
||||
RUN sed -i "s/xdebug.cli_color=0/xdebug.cli_color=1/" /usr/local/etc/php/conf.d/xdebug.ini
|
||||
|
||||
###########################################################################
|
||||
# pcov:
|
||||
|
@ -359,6 +359,9 @@ ARG INSTALL_XDEBUG=false
|
||||
|
||||
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
||||
# Install the xdebug extension
|
||||
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then \
|
||||
pecl install xdebug-3.0.0; \
|
||||
else \
|
||||
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
||||
pecl install xdebug-2.5.5; \
|
||||
else \
|
||||
@ -376,6 +379,7 @@ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
||||
fi \
|
||||
fi \
|
||||
fi \
|
||||
fi \
|
||||
fi && \
|
||||
echo "zend_extension=xdebug.so" >> /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/20-xdebug.ini \
|
||||
;fi
|
||||
@ -383,9 +387,20 @@ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
||||
# ADD for REMOTE debugging
|
||||
COPY ./xdebug.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini
|
||||
|
||||
RUN sed -i "s/xdebug.remote_autostart=0/xdebug.remote_autostart=1/" /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini && \
|
||||
sed -i "s/xdebug.remote_enable=0/xdebug.remote_enable=1/" /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini && \
|
||||
sed -i "s/xdebug.cli_color=0/xdebug.cli_color=1/" /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini
|
||||
RUN if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then \
|
||||
sed -i "s/xdebug.remote_host=/xdebug.client_host=/" /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini && \
|
||||
sed -i "s/xdebug.remote_connect_back=0/xdebug.discover_client_host=false/" /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini && \
|
||||
sed -i "s/xdebug.remote_port=9000/xdebug.client_port=9003/" /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini && \
|
||||
sed -i "s/xdebug.profiler_enable=0/; xdebug.profiler_enable=0/" /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini && \
|
||||
sed -i "s/xdebug.profiler_output_dir=/xdebug.output_dir=/" /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini && \
|
||||
sed -i "s/xdebug.remote_mode=req/; xdebug.remote_mode=req/" /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini && \
|
||||
sed -i "s/xdebug.remote_autostart=0/xdebug.start_with_request=yes/" /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini && \
|
||||
sed -i "s/xdebug.remote_enable=0/xdebug.mode=debug/" /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini \
|
||||
;else \
|
||||
sed -i "s/xdebug.remote_autostart=0/xdebug.remote_autostart=1/" /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini && \
|
||||
sed -i "s/xdebug.remote_enable=0/xdebug.remote_enable=1/" /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini \
|
||||
;fi
|
||||
RUN sed -i "s/xdebug.cli_color=0/xdebug.cli_color=1/" /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini
|
||||
|
||||
###########################################################################
|
||||
# pcov:
|
||||
|
Loading…
Reference in New Issue
Block a user