Skip to content

issue #186 - php 8.4 support #203

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
- "8.1"
- "8.2"
- "8.3"
- "8.4"
postgres-version:
- "16"
extension:
Expand Down Expand Up @@ -66,7 +67,7 @@ jobs:
ini-values: "zend.assertions=1"

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v2"
uses: "ramsey/composer-install@v3"
with:
dependency-versions: "${{ matrix.dependencies }}"
composer-options: "--ignore-platform-req=php+"
Expand Down Expand Up @@ -130,7 +131,7 @@ jobs:
ini-values: "zend.assertions=1"

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v2"
uses: "ramsey/composer-install@v3"
with:
composer-options: "--ignore-platform-req=php+"

Expand Down Expand Up @@ -196,7 +197,7 @@ jobs:
extensions: "${{ matrix.extension }}"

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v2"
uses: "ramsey/composer-install@v3"
with:
composer-options: "--ignore-platform-req=php+"

Expand Down Expand Up @@ -259,7 +260,7 @@ jobs:
extensions: "${{ matrix.extension }}"

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v2"
uses: "ramsey/composer-install@v3"
with:
composer-options: "--ignore-platform-req=php+"

Expand Down Expand Up @@ -323,7 +324,7 @@ jobs:
# extensions: "${{ matrix.extension }}-5.10.0"

# - name: "Install dependencies with Composer"
# uses: "ramsey/composer-install@v2"
# uses: "ramsey/composer-install@v3"
# with:
# composer-options: "--ignore-platform-req=php+"

Expand Down Expand Up @@ -372,7 +373,7 @@ jobs:
ini-values: "zend.assertions=1"

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v2"
uses: "ramsey/composer-install@v3"
with:
composer-options: "--ignore-platform-req=php+"

Expand Down
10 changes: 8 additions & 2 deletions dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ GREEN='\033[0;32m'
NC='\033[0m' # No Color

# PHP version.
PHPVER="8-2"
PHPVER="8-4"
# Extra parameters passed to all docker command lines.
EXTRA_DOCKER_ENV=""

Expand All @@ -24,11 +24,17 @@ while getopts ":xp:l" opt; do
"8.1")
PHPVER="8-1"
;;
"8.2")
PHPVER="8-2"
;;
"8.3")
PHPVER="8-3"
;;
"8.4")
PHPVER="8-4"
;;
*)
PHPVER="8-2"
PHPVER="8-4"
;;
esac
;;
Expand Down
12 changes: 12 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@ services:
XDEBUG_MODE: "${XDEBUG_MODE:-debug}"
extra_hosts:
- "host.docker.internal:host-gateway"
phpunit-8-4:
build: ./docker/php-8.4
networks:
- db-tools-test
volumes:
- ./:/var/www
environment:
PHP_IDE_CONFIG: ${PHP_IDE_CONFIG:-serverName=dbtoolsbundle}
XDEBUG_CONFIG: "client_host=host.docker.internal client_port=9000 log=/tmp/xdebug/xdebug.log output_dir=/tmp/xdebug start_with_request=trigger"
XDEBUG_MODE: "${XDEBUG_MODE:-debug}"
extra_hosts:
- "host.docker.internal:host-gateway"
mysql57:
image: mysql:5.7
restart: 'no'
Expand Down
36 changes: 36 additions & 0 deletions docker/php-8.4/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
FROM php:8.4-fpm-bookworm

# Basic requirements
RUN apt-get update
RUN apt-get install -yqq --no-install-recommends default-mysql-client acl iproute2 zip zlib1g-dev libzip-dev \
libxml2-dev libpng-dev libghc-curl-dev libldb-dev libldap2-dev gnupg2 libpq-dev sqlite3

# Instaling postgresql-client-16
RUN curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc| gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg && \
sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt bookworm-pgdg main" > /etc/apt/sources.list.d/pgdg.list' && \
apt-get update && apt-get install -y postgresql-16

# PHP required extensions
RUN docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql
RUN docker-php-ext-install -j$(nproc) pgsql pdo_pgsql pdo mysqli pdo_mysql zip xml gd curl bcmath
RUN docker-php-ext-enable pdo_pgsql pdo_mysql sodium

# SQL Server support
ENV ACCEPT_EULA=Y
RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
RUN curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list > /etc/apt/sources.list.d/mssql-release.list
RUN apt-get update
RUN apt-get -y --no-install-recommends install msodbcsql18 unixodbc-dev
RUN pecl install sqlsrv
RUN pecl install pdo_sqlsrv
RUN docker-php-ext-enable sqlsrv pdo_sqlsrv

# Install Xdebug
RUN pecl install xdebug-3.4.0beta1 && docker-php-ext-enable xdebug

# Cleanup.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

COPY --from=composer /usr/bin/composer /usr/bin/composer

WORKDIR /var/www