Skip to content

Commit

Permalink
feat: Add php 8.4 support and default to UTC (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
thislg authored Nov 29, 2024
1 parent 95fd53f commit 5b4b5bd
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 7 deletions.
9 changes: 7 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
ARG PHP_VERSION

FROM mlocati/php-extension-installer:2 as extension-installer
FROM php:${PHP_VERSION}-fpm as base
FROM mlocati/php-extension-installer:2 AS extension-installer
FROM php:${PHP_VERSION}-fpm AS base
FROM base
ARG PHP_EXTENSIONS
ARG PHP_TIMEZONE=UTC

WORKDIR /usr/local/etc/php
COPY --link symfony.ini ./conf.d/

# override symfony.ini timezone placeholder
RUN sed -i "s@PHP_TIMEZONE@${PHP_TIMEZONE}@g" /usr/local/etc/php/conf.d/symfony.ini

COPY --link symfony.pool.conf ./pool.d/

COPY --from=extension-installer /usr/bin/install-php-extensions /usr/local/bin
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ Pre-configured Docker image that follows [Le Phare](https://www.lephare.com) pro

| Version | Supported until |
|---------|-----------------|
| 8.3 | |
| 8.2 | |
| 8.1 | |
| 8.4 | 31 Dec. 2028 |
| 8.3 | 31 Dec. 2027 |
| 8.2 | 31 Dec. 2026 |
| 8.1 | 31 Dec. 2025 |
| 8.0 | 12 Mar. 2024 |
| 7.4 | 14 Dec. 2023 |
| 7.3 | 14 Dec. 2022 |
Expand Down
13 changes: 12 additions & 1 deletion compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ services:
args: &build-args
PHP_VERSION: "8.1"
PHP_EXTENSIONS: "@composer apcu exif gd imagick intl memcached opcache pdo_mysql pdo_pgsql pgsql soap xdebug zip"
PHP_TIMEZONE: "Europe/Paris"
x-bake: &build-x-bake
platforms:
- linux/amd64
Expand All @@ -26,7 +27,17 @@ services:
PHP_VERSION: "8.3"
PHP_EXTENSIONS: "@composer apcu exif gd intl memcached opcache pdo_mysql pdo_pgsql pgsql soap xdebug zip" # Disable Imagick for PHP 8.3 until https://github.com/Imagick/imagick/issues/640 is fixed
x-bake: *build-x-bake

php_84:
image: lephare/php:8.4
build:
args:
<<: *build-args
PHP_VERSION: "8.4"
PHP_EXTENSIONS: "@composer apcu exif gd intl memcached opcache pdo_mysql pdo_pgsql pgsql soap xdebug zip" # Disable Imagick until https://github.com/Imagick/imagick/issues/640 is fixed
PHP_TIMEZONE: "UTC"
x-bake: *build-x-bake
tags:
- lephare/php:8.3
- lephare/php:8.4
- lephare/php:8
- lephare/php:latest
2 changes: 1 addition & 1 deletion symfony.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ short_open_tag = Off
magic_quotes_gpc = Off
register_globals = Off
session.autostart = Off
date.timezone = Europe/Paris
date.timezone = PHP_TIMEZONE
upload_max_filesize = 32M
post_max_size = 33M
session.save_handler = "memcached"
Expand Down

0 comments on commit 5b4b5bd

Please sign in to comment.