From ae6363e91580d30b628d31e4acfdbcce13953176 Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Sat, 20 Jul 2024 19:03:18 +0100 Subject: [PATCH 1/2] Upgrade SQLite on both PHP 8.2 and 8.3 --- php-82/Dockerfile | 22 +++++++++++++++++++++- php-83/Dockerfile | 22 +++++++++++++++++++++- php-84/Dockerfile | 3 ++- 3 files changed, 44 insertions(+), 3 deletions(-) diff --git a/php-82/Dockerfile b/php-82/Dockerfile index 7b93e0e..cbf37f9 100644 --- a/php-82/Dockerfile +++ b/php-82/Dockerfile @@ -374,6 +374,26 @@ RUN ./configure --prefix=${INSTALL_DIR} RUN make && make install +############################################################################### +# SQLite +# Since PHP 7.4, libsqlite must be installed (https://github.com/php/php-src/blob/99b8e67615159fc600a615e1e97f2d1cf18f14cb/UPGRADING#L616-L619) +# Laravel 11 requires SQLite 3.35.0 or higher. The system version is 3.7.17. +# See https://github.com/brefphp/aws-lambda-layers/pull/185 +# https://www.sqlite.org/changes.html +# Needed by: +# - php +RUN LD_LIBRARY_PATH= yum install -y tcl +ENV VERSION_SQLITE=3.46.0 +ENV SQLITE_BUILD_DIR=${BUILD_DIR}/sqlite +RUN set -xe; \ + mkdir -p ${SQLITE_BUILD_DIR}; \ + curl -Ls https://github.com/sqlite/sqlite/archive/refs/tags/version-${VERSION_SQLITE}.tar.gz \ + | tar xzC ${SQLITE_BUILD_DIR} --strip-components=1 +WORKDIR ${SQLITE_BUILD_DIR} +RUN ./configure --prefix=${INSTALL_DIR} +RUN make && make install + + ############################################################################### # Install some dev files for using old libraries already on the system # readline-devel : needed for the readline extension @@ -381,7 +401,7 @@ RUN make && make install # libicu-devel : needed for intl # libxslt-devel : needed for the XSL extension # sqlite-devel : Since PHP 7.4 this must be installed (https://github.com/php/php-src/blob/99b8e67615159fc600a615e1e97f2d1cf18f14cb/UPGRADING#L616-L619) -RUN LD_LIBRARY_PATH= yum install -y readline-devel gettext-devel libicu-devel libxslt-devel sqlite-devel +RUN LD_LIBRARY_PATH= yum install -y readline-devel gettext-devel libicu-devel libxslt-devel # Note: this variable is used when building extra/custom extensions, do not remove diff --git a/php-83/Dockerfile b/php-83/Dockerfile index 59f2441..655fd07 100644 --- a/php-83/Dockerfile +++ b/php-83/Dockerfile @@ -374,6 +374,26 @@ RUN ./configure --prefix=${INSTALL_DIR} RUN make && make install +############################################################################### +# SQLite +# Since PHP 7.4, libsqlite must be installed (https://github.com/php/php-src/blob/99b8e67615159fc600a615e1e97f2d1cf18f14cb/UPGRADING#L616-L619) +# Laravel 11 requires SQLite 3.35.0 or higher. The system version is 3.7.17. +# See https://github.com/brefphp/aws-lambda-layers/pull/185 +# https://www.sqlite.org/changes.html +# Needed by: +# - php +RUN LD_LIBRARY_PATH= yum install -y tcl +ENV VERSION_SQLITE=3.46.0 +ENV SQLITE_BUILD_DIR=${BUILD_DIR}/sqlite +RUN set -xe; \ + mkdir -p ${SQLITE_BUILD_DIR}; \ + curl -Ls https://github.com/sqlite/sqlite/archive/refs/tags/version-${VERSION_SQLITE}.tar.gz \ + | tar xzC ${SQLITE_BUILD_DIR} --strip-components=1 +WORKDIR ${SQLITE_BUILD_DIR} +RUN ./configure --prefix=${INSTALL_DIR} +RUN make && make install + + ############################################################################### # Install some dev files for using old libraries already on the system # readline-devel : needed for the readline extension @@ -381,7 +401,7 @@ RUN make && make install # libicu-devel : needed for intl # libxslt-devel : needed for the XSL extension # sqlite-devel : Since PHP 7.4 this must be installed (https://github.com/php/php-src/blob/99b8e67615159fc600a615e1e97f2d1cf18f14cb/UPGRADING#L616-L619) -RUN LD_LIBRARY_PATH= yum install -y readline-devel gettext-devel libicu-devel libxslt-devel sqlite-devel +RUN LD_LIBRARY_PATH= yum install -y readline-devel gettext-devel libicu-devel libxslt-devel # Note: this variable is used when building extra/custom extensions, do not remove diff --git a/php-84/Dockerfile b/php-84/Dockerfile index 21faa09..cb60f2f 100644 --- a/php-84/Dockerfile +++ b/php-84/Dockerfile @@ -378,7 +378,8 @@ RUN make && make install # SQLite # Since PHP 7.4, libsqlite must be installed (https://github.com/php/php-src/blob/99b8e67615159fc600a615e1e97f2d1cf18f14cb/UPGRADING#L616-L619) # PHP 8.4 requires SQLite 3.13.0 or higher because the build uses the -# `SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION` constant. The system version is 3.7.17. +# `SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION` constant. Moreover, Laravel 11 +# requires SQLite 3.35.0 or higher. The system version is 3.7.17. # See https://github.com/brefphp/aws-lambda-layers/pull/185 # https://www.sqlite.org/changes.html # Needed by: From 838cffe7648fcbd10fb1ee4ae9f8c884b8f6c7fa Mon Sep 17 00:00:00 2001 From: Matthieu Napoli Date: Mon, 22 Jul 2024 10:29:04 +0200 Subject: [PATCH 2/2] Update documentation regarding SQLite --- php-82/Dockerfile | 3 +-- php-83/Dockerfile | 3 +-- php-84/Dockerfile | 5 +++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/php-82/Dockerfile b/php-82/Dockerfile index cbf37f9..8ece368 100644 --- a/php-82/Dockerfile +++ b/php-82/Dockerfile @@ -378,7 +378,7 @@ RUN make && make install # SQLite # Since PHP 7.4, libsqlite must be installed (https://github.com/php/php-src/blob/99b8e67615159fc600a615e1e97f2d1cf18f14cb/UPGRADING#L616-L619) # Laravel 11 requires SQLite 3.35.0 or higher. The system version is 3.7.17. -# See https://github.com/brefphp/aws-lambda-layers/pull/185 +# https://laravel.com/docs/11.x/upgrade#sqlite-minimum-version # https://www.sqlite.org/changes.html # Needed by: # - php @@ -400,7 +400,6 @@ RUN make && make install # gettext-devel : needed for the --with-gettext flag # libicu-devel : needed for intl # libxslt-devel : needed for the XSL extension -# sqlite-devel : Since PHP 7.4 this must be installed (https://github.com/php/php-src/blob/99b8e67615159fc600a615e1e97f2d1cf18f14cb/UPGRADING#L616-L619) RUN LD_LIBRARY_PATH= yum install -y readline-devel gettext-devel libicu-devel libxslt-devel diff --git a/php-83/Dockerfile b/php-83/Dockerfile index 655fd07..28f1321 100644 --- a/php-83/Dockerfile +++ b/php-83/Dockerfile @@ -378,7 +378,7 @@ RUN make && make install # SQLite # Since PHP 7.4, libsqlite must be installed (https://github.com/php/php-src/blob/99b8e67615159fc600a615e1e97f2d1cf18f14cb/UPGRADING#L616-L619) # Laravel 11 requires SQLite 3.35.0 or higher. The system version is 3.7.17. -# See https://github.com/brefphp/aws-lambda-layers/pull/185 +# https://laravel.com/docs/11.x/upgrade#sqlite-minimum-version # https://www.sqlite.org/changes.html # Needed by: # - php @@ -400,7 +400,6 @@ RUN make && make install # gettext-devel : needed for the --with-gettext flag # libicu-devel : needed for intl # libxslt-devel : needed for the XSL extension -# sqlite-devel : Since PHP 7.4 this must be installed (https://github.com/php/php-src/blob/99b8e67615159fc600a615e1e97f2d1cf18f14cb/UPGRADING#L616-L619) RUN LD_LIBRARY_PATH= yum install -y readline-devel gettext-devel libicu-devel libxslt-devel diff --git a/php-84/Dockerfile b/php-84/Dockerfile index cb60f2f..50baecd 100644 --- a/php-84/Dockerfile +++ b/php-84/Dockerfile @@ -378,9 +378,10 @@ RUN make && make install # SQLite # Since PHP 7.4, libsqlite must be installed (https://github.com/php/php-src/blob/99b8e67615159fc600a615e1e97f2d1cf18f14cb/UPGRADING#L616-L619) # PHP 8.4 requires SQLite 3.13.0 or higher because the build uses the -# `SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION` constant. Moreover, Laravel 11 -# requires SQLite 3.35.0 or higher. The system version is 3.7.17. +# `SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION` constant. # See https://github.com/brefphp/aws-lambda-layers/pull/185 +# Moreover, Laravel 11 requires SQLite 3.35.0 or higher. The system version is 3.7.17. +# https://laravel.com/docs/11.x/upgrade#sqlite-minimum-version # https://www.sqlite.org/changes.html # Needed by: # - php