Skip to content

Commit

Permalink
Merge pull request #189 from brefphp/upgrade-sqlite
Browse files Browse the repository at this point in the history
Upgrade SQLite on both PHP 8.2 and 8.3
  • Loading branch information
mnapoli authored Jul 22, 2024
2 parents d2250f4 + 838cffe commit 2e5eec0
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 5 deletions.
23 changes: 21 additions & 2 deletions php-82/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -374,14 +374,33 @@ 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.
# https://laravel.com/docs/11.x/upgrade#sqlite-minimum-version
# 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
# 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 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
Expand Down
23 changes: 21 additions & 2 deletions php-83/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -374,14 +374,33 @@ 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.
# https://laravel.com/docs/11.x/upgrade#sqlite-minimum-version
# 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
# 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 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
Expand Down
4 changes: 3 additions & 1 deletion php-84/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,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. 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
Expand Down

0 comments on commit 2e5eec0

Please sign in to comment.