Merge pull request #3291 from da-mask/master

Adding pcov for php 8.x to php-fpm and workspace
This commit is contained in:
Shao Yu-Lung (Allen) 2022-11-02 08:35:59 +08:00 committed by GitHub
commit ba64feda04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 11 deletions

View File

@ -260,11 +260,9 @@ USER root
ARG INSTALL_PCOV=false ARG INSTALL_PCOV=false
RUN if [ ${INSTALL_PCOV} = true ]; then \ RUN if [ ${INSTALL_PCOV} = true ]; then \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ]; then \ if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ] || { [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ] && [ $(php -r "echo PHP_MINOR_VERSION;") != "0" ]; }; then \
if [ $(php -r "echo PHP_MINOR_VERSION;") != "0" ]; then \ pecl install pcov && \
pecl install pcov && \ docker-php-ext-enable pcov \
docker-php-ext-enable pcov \
;fi \
;fi \ ;fi \
;fi ;fi

View File

@ -376,12 +376,10 @@ USER root
ARG INSTALL_PCOV=false ARG INSTALL_PCOV=false
RUN if [ ${INSTALL_PCOV} = true ]; then \ RUN if [ ${INSTALL_PCOV} = true ]; then \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ]; then \ if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ] || { [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ] && [ $(php -r "echo PHP_MINOR_VERSION;") != "0" ]; }; then \
if [ $(php -r "echo PHP_MINOR_VERSION;") != "0" ]; then \ pecl install pcov && \
pecl install pcov && \ echo "extension=pcov.so" >> /etc/php/${LARADOCK_PHP_VERSION}/cli/php.ini && \
echo "extension=pcov.so" >> /etc/php/${LARADOCK_PHP_VERSION}/cli/php.ini && \ echo "pcov.enabled" >> /etc/php/${LARADOCK_PHP_VERSION}/cli/php.ini \
echo "pcov.enabled" >> /etc/php/${LARADOCK_PHP_VERSION}/cli/php.ini \
;fi \
;fi \ ;fi \
;fi ;fi