Skip to content

Commit

Permalink
Add Laravel 12.x support (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonkomarev authored Feb 22, 2025
1 parent 65a8258 commit 2b76b16
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 10 deletions.
22 changes: 22 additions & 0 deletions .docker/php83/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# ----------------------
# The FPM base container
# ----------------------
FROM php:8.3-cli-alpine AS dev

RUN apk add --no-cache --virtual .build-deps \
$PHPIZE_DEPS

# Cleanup apk cache and temp files
RUN rm -rf /var/cache/apk/* /tmp/*

# ----------------------
# Composer install step
# ----------------------

# Get latest Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer

# ----------------------
# The FPM production container
# ----------------------
FROM dev
22 changes: 22 additions & 0 deletions .docker/php84/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# ----------------------
# The FPM base container
# ----------------------
FROM php:8.4-cli-alpine AS dev

RUN apk add --no-cache --virtual .build-deps \
$PHPIZE_DEPS

# Cleanup apk cache and temp files
RUN rm -rf /var/cache/apk/* /tmp/*

# ----------------------
# Composer install step
# ----------------------

# Get latest Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer

# ----------------------
# The FPM production container
# ----------------------
FROM dev
17 changes: 13 additions & 4 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,41 @@ on:

jobs:
test:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}

strategy:
#fail-fast: true
fail-fast: true
matrix:
php: [8.0, 8.1, 8.2, 8.3]
laravel: ['9.*', '10.*', '11.*']
os: [ubuntu-latest]
php: [8.0, 8.1, 8.2, 8.3, 8.4]
laravel: ['9.*', '10.*', '11.*', '12.*']
dependency-version: [prefer-lowest, prefer-stable]
exclude:
- laravel: 9.*
php: 8.2
- laravel: 9.*
php: 8.3
- laravel: 9.*
php: 8.4
- laravel: 10.*
php: 8.0
- laravel: 11.*
php: 8.0
- laravel: 11.*
php: 8.1
- laravel: 12.*
php: 8.0
- laravel: 12.*
php: 8.1
include:
- laravel: 9.*
testbench: 7.*
- laravel: 10.*
testbench: 8.*
- laravel: 11.*
testbench: 9.*
- laravel: 12.*
testbench: 10.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}

Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Changelog

All notable changes to `cybercog/laravel-clickhouse` are documented in [Laravel ClickHouse releases] page.

[Laravel ClickHouse releases]: https://github.com/cybercog/laravel-clickhouse/releases
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
},
"require": {
"php": "^7.4|^8.0",
"illuminate/console": "^8.0|^9.0|^10.1.3|^11.0",
"illuminate/contracts": "^8.0|^9.0|^10.1.3|^11.0",
"illuminate/filesystem": "^8.0|^9.0|^10.1.3|^11.0",
"illuminate/support": "^8.0|^9.0|^10.1.3|^11.0",
"illuminate/console": "^8.0|^9.0|^10.1.3|^11.0|^12.0",
"illuminate/contracts": "^8.0|^9.0|^10.1.3|^11.0|^12.0",
"illuminate/filesystem": "^8.0|^9.0|^10.1.3|^11.0|^12.0",
"illuminate/support": "^8.0|^9.0|^10.1.3|^11.0|^12.0",
"smi2/phpclickhouse": "^1.5.3"
},
"require-dev": {
"orchestra/testbench": "^7.0|^8.0|^9.0",
"phpunit/phpunit": "^9.6|^10.5"
"orchestra/testbench": "^7.0|^8.0|^9.0|^10.0",
"phpunit/phpunit": "^9.6|^10.5|^11.5"
},
"autoload": {
"psr-4": {
Expand Down
22 changes: 22 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,28 @@ services:
volumes:
- ./:/app

php83:
container_name: laravel-clickhouse-lib-83
image: laravel-clickhouse-lib-83
build:
context: ./
dockerfile: ./.docker/php83/Dockerfile
tty: true
working_dir: /app
volumes:
- ./:/app

php84:
container_name: laravel-clickhouse-lib-84
image: laravel-clickhouse-lib-84
build:
context: ./
dockerfile: ./.docker/php84/Dockerfile
tty: true
working_dir: /app
volumes:
- ./:/app

clickhouse:
container_name: laravel-clickhouse-clickhouse
image: yandex/clickhouse-server:21.8-alpine
Expand Down

0 comments on commit 2b76b16

Please sign in to comment.