Skip to content

Commit

Permalink
maint/php84 (#26)
Browse files Browse the repository at this point in the history
* maint/php84 Updated `.github/workflows/test.yml`.

* maint/php84 Updated `.gitignore`.

* maint/php84 Updated `docker-compose.yml`.

* maint/php84 Created `docker/php84/Dockerfile`.

* maint/php84 Created `docker/php84/php.ini`.

* maint/php84 Updated `test.sh`.

* maint/php84 Updated `SECURITY.md`.

* maint/php84 Updated `composer.json`.

---------

Co-authored-by: david_smith <[email protected]>
  • Loading branch information
zero-to-prod and david_smith authored Jan 5, 2025
1 parent b64b35b commit cb80904
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

strategy:
matrix:
php-version: [php81, php82, php83]
php-version: [php81, php82, php83, php84]

steps:
- uses: actions/checkout@v4
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ composer.lock
/.phpunit.cache/
/vendor-php81/
/vendor-php82/
/vendor-php83/
/vendor-php83/
/vendor-php84/
1 change: 1 addition & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
| 8.1.x | :white_check_mark: |
| 8.2.x | :white_check_mark: |
| 8.3.x | :white_check_mark: |
| 8.4.x | :white_check_mark: |

## Reporting a Vulnerability

Expand Down
7 changes: 7 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
"data-model-helper"
],
"homepage": "https://github.com/zero-to-prod/data-model-helper",
"support": {
"email": "[email protected]",
"issues": "https://github.com/zero-to-prod/data-model-helper/issues",
"source": "https://github.com/zero-to-prod/data-model",
"docs": "https://zero-to-prod.github.io/data-model-helper/",
"security": "https://github.com/zero-to-prod/data-model-helper/blob/main/SECURITY.md"
},
"license": "MIT",
"readme": "./README.md",
"authors": [
Expand Down
27 changes: 26 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,29 @@ services:
target: composer
volumes:
- ./:/app
- ./vendor-php83:/app/vendor
- ./vendor-php83:/app/vendor

php84:
build:
context: docker/php84
target: base
volumes:
- ./:/app
- ./vendor-php84:/app/vendor

php84debug:
build:
context: docker/php84
target: debug
volumes:
- ./:/app
- ./docker/php84:/usr/local/etc/php
- ./vendor-php84:/app/vendor

php84composer:
build:
context: docker/php84
target: composer
volumes:
- ./:/app
- ./vendor-php84:/app/vendor
23 changes: 23 additions & 0 deletions docker/php84/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM php:8.4-cli AS base

WORKDIR /app

RUN apt-get update && apt-get install -y \
git \
unzip \
&& rm -rf /var/lib/apt/lists/*

FROM base AS composer

RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

FROM base AS debug

RUN pecl channel-update pecl.php.net && \
pecl install xdebug && \
docker-php-ext-enable xdebug && \
echo "xdebug.mode=coverage" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini

WORKDIR /app

CMD ["bash"]
2 changes: 2 additions & 0 deletions docker/php84/php.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
zend_extension=xdebug.so
xdebug.mode=coverage
2 changes: 1 addition & 1 deletion test.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -e

php_versions=("php83" "php82" "php81")
php_versions=("php84" "php83" "php82" "php81")

for version in "${php_versions[@]}"; do
docker compose run --rm "${version}composer" composer update --no-cache
Expand Down

0 comments on commit cb80904

Please sign in to comment.