Skip to content

Commit 76e82d4

Browse files
authored
Merge pull request #226 from GrahamCampbell/sqlite-upgrade
Upgrade sqlite to 3.47.2 for PHP 8.1 and up
2 parents 8112a7e + 56c997e commit 76e82d4

File tree

4 files changed

+31
-8
lines changed

4 files changed

+31
-8
lines changed

php-81/Dockerfile

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,14 +374,34 @@ RUN ./configure --prefix=${INSTALL_DIR}
374374
RUN make && make install
375375

376376

377+
###############################################################################
378+
# SQLite
379+
# Since PHP 7.4, libsqlite must be installed (https://github.com/php/php-src/blob/99b8e67615159fc600a615e1e97f2d1cf18f14cb/UPGRADING#L616-L619)
380+
# Laravel 11 requires SQLite 3.35.0 or higher and Drupal 10 also requires a
381+
# newer version than the system version of 3.7.17.
382+
# https://laravel.com/docs/11.x/upgrade#sqlite-minimum-version
383+
# https://www.sqlite.org/changes.html
384+
# Needed by:
385+
# - php
386+
RUN LD_LIBRARY_PATH= yum install -y tcl
387+
ENV VERSION_SQLITE=3.47.2
388+
ENV SQLITE_BUILD_DIR=${BUILD_DIR}/sqlite
389+
RUN set -xe; \
390+
mkdir -p ${SQLITE_BUILD_DIR}; \
391+
curl -Ls https://github.com/sqlite/sqlite/archive/refs/tags/version-${VERSION_SQLITE}.tar.gz \
392+
| tar xzC ${SQLITE_BUILD_DIR} --strip-components=1
393+
WORKDIR ${SQLITE_BUILD_DIR}
394+
RUN ./configure --prefix=${INSTALL_DIR}
395+
RUN make && make install
396+
397+
377398
###############################################################################
378399
# Install some dev files for using old libraries already on the system
379400
# readline-devel : needed for the readline extension
380401
# gettext-devel : needed for the --with-gettext flag
381402
# libicu-devel : needed for intl
382403
# libxslt-devel : needed for the XSL extension
383-
# sqlite-devel : Since PHP 7.4 this must be installed (https://github.com/php/php-src/blob/99b8e67615159fc600a615e1e97f2d1cf18f14cb/UPGRADING#L616-L619)
384-
RUN LD_LIBRARY_PATH= yum install -y readline-devel gettext-devel libicu-devel libxslt-devel sqlite-devel
404+
RUN LD_LIBRARY_PATH= yum install -y readline-devel gettext-devel libicu-devel libxslt-devel
385405

386406

387407
# Note: this variable is used when building extra/custom extensions, do not remove

php-82/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,13 +377,14 @@ RUN make && make install
377377
###############################################################################
378378
# SQLite
379379
# Since PHP 7.4, libsqlite must be installed (https://github.com/php/php-src/blob/99b8e67615159fc600a615e1e97f2d1cf18f14cb/UPGRADING#L616-L619)
380-
# Laravel 11 requires SQLite 3.35.0 or higher. The system version is 3.7.17.
380+
# Laravel 11 requires SQLite 3.35.0 or higher and Drupal 10 also requires a
381+
# newer version than the system version of 3.7.17.
381382
# https://laravel.com/docs/11.x/upgrade#sqlite-minimum-version
382383
# https://www.sqlite.org/changes.html
383384
# Needed by:
384385
# - php
385386
RUN LD_LIBRARY_PATH= yum install -y tcl
386-
ENV VERSION_SQLITE=3.47.0
387+
ENV VERSION_SQLITE=3.47.2
387388
ENV SQLITE_BUILD_DIR=${BUILD_DIR}/sqlite
388389
RUN set -xe; \
389390
mkdir -p ${SQLITE_BUILD_DIR}; \

php-83/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,13 +377,14 @@ RUN make && make install
377377
###############################################################################
378378
# SQLite
379379
# Since PHP 7.4, libsqlite must be installed (https://github.com/php/php-src/blob/99b8e67615159fc600a615e1e97f2d1cf18f14cb/UPGRADING#L616-L619)
380-
# Laravel 11 requires SQLite 3.35.0 or higher. The system version is 3.7.17.
380+
# Laravel 11 requires SQLite 3.35.0 or higher and Drupal 10 also requires a
381+
# newer version than the system version of 3.7.17.
381382
# https://laravel.com/docs/11.x/upgrade#sqlite-minimum-version
382383
# https://www.sqlite.org/changes.html
383384
# Needed by:
384385
# - php
385386
RUN LD_LIBRARY_PATH= yum install -y tcl
386-
ENV VERSION_SQLITE=3.47.0
387+
ENV VERSION_SQLITE=3.47.2
387388
ENV SQLITE_BUILD_DIR=${BUILD_DIR}/sqlite
388389
RUN set -xe; \
389390
mkdir -p ${SQLITE_BUILD_DIR}; \

php-84/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,13 +380,14 @@ RUN make && make install
380380
# PHP 8.4 requires SQLite 3.13.0 or higher because the build uses the
381381
# `SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION` constant.
382382
# See https://github.com/brefphp/aws-lambda-layers/pull/185
383-
# Moreover, Laravel 11 requires SQLite 3.35.0 or higher. The system version is 3.7.17.
383+
# Laravel 11 requires SQLite 3.35.0 or higher and Drupal 10 also requires a
384+
# newer version than the system version of 3.7.17.
384385
# https://laravel.com/docs/11.x/upgrade#sqlite-minimum-version
385386
# https://www.sqlite.org/changes.html
386387
# Needed by:
387388
# - php
388389
RUN LD_LIBRARY_PATH= yum install -y tcl
389-
ENV VERSION_SQLITE=3.47.0
390+
ENV VERSION_SQLITE=3.47.2
390391
ENV SQLITE_BUILD_DIR=${BUILD_DIR}/sqlite
391392
RUN set -xe; \
392393
mkdir -p ${SQLITE_BUILD_DIR}; \

0 commit comments

Comments
 (0)