Add PHP Decimal extension support
This commit is contained in:
parent
29f3d6a671
commit
ed649993ca
@ -2291,6 +2291,20 @@ AST exposes the abstract syntax tree generated by PHP 7+. This extension is requ
|
|||||||
**Note** If you need a specific version of AST then search for the `WORKSPACE_AST_VERSION` argument under the Workspace Container and set it to the desired version and continue step 4.
|
**Note** If you need a specific version of AST then search for the `WORKSPACE_AST_VERSION` argument under the Workspace Container and set it to the desired version and continue step 4.
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<a name="Install-PHP-Decimal"></a>
|
||||||
|
## Install PHP Decimal extension
|
||||||
|
The PHP Decimal extension adds support for correctly-rounded, arbitrary-precision decimal floating point arithmetic. Applications that rely on accurate numbers (ie. money, measurements, or mathematics) can use Decimal instead of float or string to represent numerical values.
|
||||||
|
|
||||||
|
For more information visit the [PHP Decimal website](https://php-decimal.io).
|
||||||
|
|
||||||
|
2 - Search for the `WORKSPACE_INSTALL_PHPDECIMAL` argument under the Workspace Container
|
||||||
|
|
||||||
|
2 - Search for the `PHP_FPM_INSTALL_PHPDECIMAL` argument under the PHP-FPM container
|
||||||
|
|
||||||
|
3 - Set it to `true`
|
||||||
|
|
||||||
|
4 - Re-build the container `docker-compose build workspace php-fpm`
|
||||||
|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
@ -163,6 +163,7 @@ services:
|
|||||||
- INSTALL_GNU_PARALLEL=${WORKSPACE_INSTALL_GNU_PARALLEL}
|
- INSTALL_GNU_PARALLEL=${WORKSPACE_INSTALL_GNU_PARALLEL}
|
||||||
- INSTALL_LNAV=${WORKSPACE_INSTALL_LNAV}
|
- INSTALL_LNAV=${WORKSPACE_INSTALL_LNAV}
|
||||||
- INSTALL_PROTOC=${WORKSPACE_INSTALL_PROTOC}
|
- INSTALL_PROTOC=${WORKSPACE_INSTALL_PROTOC}
|
||||||
|
- INSTALL_PHPDECIMAL=${WORKSPACE_INSTALL_PHPDECIMAL}
|
||||||
- PROTOC_VERSION=${WORKSPACE_PROTOC_VERSION}
|
- PROTOC_VERSION=${WORKSPACE_PROTOC_VERSION}
|
||||||
- INSTALL_DOCKER_CLIENT=${WORKSPACE_INSTALL_DOCKER_CLIENT}
|
- INSTALL_DOCKER_CLIENT=${WORKSPACE_INSTALL_DOCKER_CLIENT}
|
||||||
- http_proxy
|
- http_proxy
|
||||||
@ -258,6 +259,7 @@ services:
|
|||||||
- INSTALL_WKHTMLTOPDF=${PHP_FPM_INSTALL_WKHTMLTOPDF}
|
- INSTALL_WKHTMLTOPDF=${PHP_FPM_INSTALL_WKHTMLTOPDF}
|
||||||
- INSTALL_XHPROF=${PHP_FPM_INSTALL_XHPROF}
|
- INSTALL_XHPROF=${PHP_FPM_INSTALL_XHPROF}
|
||||||
- INSTALL_XMLRPC=${PHP_FPM_INSTALL_XMLRPC}
|
- INSTALL_XMLRPC=${PHP_FPM_INSTALL_XMLRPC}
|
||||||
|
- INSTALL_PHPDECIMAL=${PHP_FPM_INSTALL_PHPDECIMAL}
|
||||||
- DOWNGRADE_OPENSSL_TLS_AND_SECLEVEL=${PHP_DOWNGRADE_OPENSSL_TLS_AND_SECLEVEL}
|
- DOWNGRADE_OPENSSL_TLS_AND_SECLEVEL=${PHP_DOWNGRADE_OPENSSL_TLS_AND_SECLEVEL}
|
||||||
- PUID=${PHP_FPM_PUID}
|
- PUID=${PHP_FPM_PUID}
|
||||||
- PGID=${PHP_FPM_PGID}
|
- PGID=${PHP_FPM_PGID}
|
||||||
|
@ -195,6 +195,7 @@ WORKSPACE_INSTALL_GIT_PROMPT=false
|
|||||||
WORKSPACE_INSTALL_DOCKER_CLIENT=false
|
WORKSPACE_INSTALL_DOCKER_CLIENT=false
|
||||||
WORKSPACE_INSTALL_LNAV=false
|
WORKSPACE_INSTALL_LNAV=false
|
||||||
WORKSPACE_INSTALL_PROTOC=false
|
WORKSPACE_INSTALL_PROTOC=false
|
||||||
|
WORKSPACE_INSTALL_PHPDECIMAL=false
|
||||||
WORKSPACE_PROTOC_VERSION=latest
|
WORKSPACE_PROTOC_VERSION=latest
|
||||||
|
|
||||||
### PHP_FPM ###############################################
|
### PHP_FPM ###############################################
|
||||||
@ -252,6 +253,7 @@ PHP_FPM_INSTALL_PING=false
|
|||||||
PHP_FPM_INSTALL_SSHPASS=false
|
PHP_FPM_INSTALL_SSHPASS=false
|
||||||
PHP_FPM_INSTALL_MAILPARSE=false
|
PHP_FPM_INSTALL_MAILPARSE=false
|
||||||
PHP_FPM_INSTALL_WKHTMLTOPDF=false
|
PHP_FPM_INSTALL_WKHTMLTOPDF=false
|
||||||
|
PHP_FPM_INSTALL_PHPDECIMAL=false
|
||||||
PHP_FPM_FFMPEG=false
|
PHP_FPM_FFMPEG=false
|
||||||
PHP_FPM_AUDIOWAVEFORM=false
|
PHP_FPM_AUDIOWAVEFORM=false
|
||||||
PHP_FPM_ADDITIONAL_LOCALES="en_US.UTF-8 es_ES.UTF-8 fr_FR.UTF-8"
|
PHP_FPM_ADDITIONAL_LOCALES="en_US.UTF-8 es_ES.UTF-8 fr_FR.UTF-8"
|
||||||
|
@ -977,6 +977,21 @@ RUN if [ ${INSTALL_XMLRPC} = true ]; then \
|
|||||||
docker-php-ext-install xmlrpc \
|
docker-php-ext-install xmlrpc \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# PHP DECIMAL:
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
USER root
|
||||||
|
|
||||||
|
ARG INSTALL_PHPDECIMAL=false
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_PHPDECIMAL} = true ]; then \
|
||||||
|
apt-get update -yqq \
|
||||||
|
&& apt-get install -y libmpdec-dev \
|
||||||
|
&& pecl install decimal \
|
||||||
|
&& docker-php-ext-enable decimal \
|
||||||
|
;fi
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
# New Relic for PHP:
|
# New Relic for PHP:
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
@ -1601,6 +1601,24 @@ RUN if [ ${SHELL_OH_MY_ZSH} = true ]; then \
|
|||||||
|
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# PHP DECIMAL:
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
USER root
|
||||||
|
|
||||||
|
ARG INSTALL_PHPDECIMAL=false
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_PHPDECIMAL} = true ]; then \
|
||||||
|
apt-get update -yqq \
|
||||||
|
&& apt-get install -y libmpdec-dev \
|
||||||
|
&& pecl install decimal \
|
||||||
|
&& echo "extension=decimal.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/decimal.ini \
|
||||||
|
&& ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/decimal.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/30-decimal.ini \
|
||||||
|
&& php -m | grep -q 'decimal' \
|
||||||
|
;fi
|
||||||
|
|
||||||
#
|
#
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
# Final Touch
|
# Final Touch
|
||||||
|
Loading…
Reference in New Issue
Block a user