Skip to content

Commit e9b9f35

Browse files
committed
Allow to build with PHP 8.5
1 parent e6cf59d commit e9b9f35

File tree

8 files changed

+19
-14
lines changed

8 files changed

+19
-14
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ services:
4646
- NGINX_PHP_FPM_HOST=app_php.local_beach
4747

4848
php:
49-
image: flownative/php:8.3
49+
image: flownative/php:8.4
5050
volumes:
5151
- application:/application
5252
environment:
@@ -117,7 +117,7 @@ container runs as a user with uid 1000, but in fact that user does not
117117
even exist.
118118

119119
```
120-
$ docker run -ti --name php --rm flownative/php:8.2 bash
120+
$ docker run -ti --name php --rm flownative/php:8.4 bash
121121
I have no name!@5a0adf17e426:/$ whoami
122122
whoami: cannot find name for user ID 1000
123123
```
@@ -129,7 +129,7 @@ version for some of the tools as build arguments:
129129

130130
```bash
131131
docker build \
132-
--build-arg PHP_VERSION=8.3.11 \
132+
--build-arg PHP_VERSION=8.4.13 \
133133
-t flownative/php:latest .
134134
```
135135

root-files/build.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,11 @@ build_get_unnecessary_packages() {
113113
build_compile_php() {
114114
local php_source_url
115115

116-
php_source_url="https://www.php.net/distributions/php-${PHP_VERSION}.tar.gz"
116+
if [[ "${PHP_VERSION}" =~ ^8.[5] ]]; then
117+
php_source_url="https://downloads.php.net/~daniels/php-${PHP_VERSION}.tar.gz"
118+
else
119+
php_source_url="https://www.php.net/distributions/php-${PHP_VERSION}.tar.gz"
120+
fi
117121

118122
info "🛠 Downloading source code for PHP ${PHP_VERSION} from ${php_source_url} ..."
119123
with_backoff "curl -sfSL ${php_source_url} -o php.tar.gz" "15" || (
@@ -140,7 +144,7 @@ build_compile_php() {
140144
# For GCC warning options see: https://gcc.gnu.org/onlinedocs/gcc-3.4.4/gcc/Warning-Options.html
141145
export CFLAGS='-Wno-deprecated-declarations -Wno-stringop-overflow -Wno-implicit-function-declaration'
142146

143-
if [[ "${PHP_VERSION}" =~ ^8.[1-4] ]]; then
147+
if [[ "${PHP_VERSION}" =~ ^8.[1-5] ]]; then
144148
./configure \
145149
--prefix=${PHP_BASE_PATH} \
146150
--with-config-file-path="${PHP_BASE_PATH}/etc" \
@@ -394,7 +398,7 @@ case $1 in
394398
init)
395399
banner_flownative 'PHP'
396400

397-
if [[ ! "${PHP_VERSION}" =~ ^8.[1-4] ]]; then
401+
if [[ ! "${PHP_VERSION}" =~ ^8.[1-5] ]]; then
398402
error "🛠 Unsupported PHP version '${PHP_VERSION}'"
399403
exit 1
400404
fi

root-files/opt/flownative/php/build/extensions/igbinary/igbinary.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ extensions_igbinary_runtime_packages() {
3535
# @return string
3636
#
3737
extensions_igbinary_url() {
38-
echo "https://github.com/igbinary/igbinary/archive/refs/tags/3.2.15.tar.gz"
38+
# echo "https://github.com/igbinary/igbinary/archive/refs/tags/3.2.15.tar.gz"
39+
echo "https://github.com/igbinary/igbinary/archive/refs/heads/master.tar.gz"
3940
}
4041

4142
# ---------------------------------------------------------------------------------------

root-files/opt/flownative/php/build/extensions/imagick/imagick.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ extensions_imagick_runtime_packages() {
4444
# @return string
4545
#
4646
extensions_imagick_url() {
47-
echo "https://pecl.php.net/get/imagick-3.8.0.tgz"
47+
# echo "https://pecl.php.net/get/imagick-3.8.0.tgz"
48+
echo "https://github.com/imagick/imagick/archive/refs/heads/master.tar.gz"
4849
}
4950

5051
# ---------------------------------------------------------------------------------------

root-files/opt/flownative/php/build/extensions/php-spx/php-spx.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ extensions_php-spx_runtime_packages() {
3838
# @return string
3939
#
4040
extensions_php-spx_url() {
41-
echo "https://github.com/NoiseByNorthwest/php-spx/archive/refs/tags/v0.4.20.tar.gz"
41+
echo "https://github.com/NoiseByNorthwest/php-spx/archive/refs/tags/v0.4.22.tar.gz"
4242
}
4343

4444
# ---------------------------------------------------------------------------------------

root-files/opt/flownative/php/build/extensions/phpredis/phpredis.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ extensions_phpredis_runtime_packages() {
3939
# @return string
4040
#
4141
extensions_phpredis_url() {
42-
echo "https://github.com/phpredis/phpredis/archive/6.2.0.tar.gz"
42+
# echo "https://github.com/phpredis/phpredis/archive/6.2.0.tar.gz"
43+
echo "https://github.com/phpredis/phpredis/archive/refs/heads/develop.tar.gz"
4344
}
4445

4546
# ---------------------------------------------------------------------------------------

root-files/opt/flownative/php/build/extensions/xdebug/xdebug.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ extensions_xdebug_runtime_packages() {
3838
# @return string
3939
#
4040
extensions_xdebug_url() {
41-
echo "https://xdebug.org/files/xdebug-3.4.5.tgz"
41+
# echo "https://xdebug.org/files/xdebug-3.4.5.tgz"
42+
echo "https://github.com/xdebug/xdebug/archive/refs/heads/master.tar.gz"
4243
}
4344

4445
# ---------------------------------------------------------------------------------------

root-files/opt/flownative/php/etc/php.ini

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,6 @@ date.timezone = ${PHP_DATE_TIMEZONE}
160160

161161

162162
[opcache]
163-
; Load the opcache extension
164-
zend_extension=opcache.so
165-
166163
; Determines if Zend OPCache is enabled
167164
opcache.enable=1
168165

0 commit comments

Comments
 (0)