Skip to content

Commit

Permalink
Add Laravel 11 support (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonkomarev committed Mar 9, 2024
1 parent e40a5d6 commit 1e481b0
Show file tree
Hide file tree
Showing 10 changed files with 102 additions and 162 deletions.
40 changes: 0 additions & 40 deletions .docker/nginx/app.laravel-eloquent-flag.80.conf

This file was deleted.

5 changes: 4 additions & 1 deletion .docker/php/Dockerfile → .docker/php/php81/Dockerfile
@@ -1,7 +1,10 @@
# ----------------------
# The FPM base container
# ----------------------
FROM php:8.1-fpm-alpine AS dev
FROM php:8.1-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/*
Expand Down
22 changes: 22 additions & 0 deletions .docker/php/php82/Dockerfile
@@ -0,0 +1,22 @@
# ----------------------
# The FPM base container
# ----------------------
FROM php:8.2-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/php/php83/Dockerfile
@@ -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
85 changes: 0 additions & 85 deletions .docker/php/www.conf

This file was deleted.

21 changes: 16 additions & 5 deletions .github/workflows/tests.yaml
@@ -1,27 +1,38 @@
name: tests

on: [ push, pull_request ]
on:
- push
- pull_request

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

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

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

Expand Down
10 changes: 9 additions & 1 deletion CHANGELOG.md
Expand Up @@ -4,6 +4,12 @@ All notable changes to `cybercog/laravel-eloquent-flag` will be documented in th

## [Unreleased]

## [6.1.0] - 2024-03-09

### Added

- ([#81]) Added Laravel 11 support

## [6.0.0] - 2023-02-24

### Added
Expand Down Expand Up @@ -319,7 +325,8 @@ All notable changes to `cybercog/laravel-eloquent-flag` will be documented in th

- `is_active` boolean flag added.

[Unreleased]: https://github.com/cybercog/laravel-eloquent-flag/compare/6.0.0...master
[Unreleased]: https://github.com/cybercog/laravel-eloquent-flag/compare/6.1.0...master
[6.1.0]: https://github.com/cybercog/laravel-eloquent-flag/compare/6.0.0...6.1.0
[6.0.0]: https://github.com/cybercog/laravel-eloquent-flag/compare/5.4.0...6.0.0
[5.4.0]: https://github.com/cybercog/laravel-eloquent-flag/compare/5.3.0...5.4.0
[5.3.0]: https://github.com/cybercog/laravel-eloquent-flag/compare/5.2.0...5.3.0
Expand Down Expand Up @@ -351,6 +358,7 @@ All notable changes to `cybercog/laravel-eloquent-flag` will be documented in th
[1.2.0]: https://github.com/cybercog/laravel-eloquent-flag/compare/1.1.0...1.2.0
[1.1.0]: https://github.com/cybercog/laravel-eloquent-flag/compare/1.0.0...1.1.0

[#81]: https://github.com/cybercog/laravel-eloquent-flag/pull/81
[#77]: https://github.com/cybercog/laravel-eloquent-flag/pull/77
[#74]: https://github.com/cybercog/laravel-eloquent-flag/pull/71
[#71]: https://github.com/cybercog/laravel-eloquent-flag/pull/71
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Expand Up @@ -54,12 +54,12 @@
},
"require": {
"php": "^8.0",
"illuminate/database": "^9.0|^10.0"
"illuminate/database": "^9.0|^10.0|^11.0"
},
"require-dev": {
"mockery/mockery": "^1.0",
"orchestra/testbench": "^7.0|^8.0",
"phpunit/phpunit": "^9.6"
"orchestra/testbench": "^7.0|^8.0|^9.0",
"phpunit/phpunit": "^9.6|^10.5"
},
"autoload": {
"psr-4": {
Expand All @@ -79,5 +79,5 @@
"sort-packages": true
},
"minimum-stability": "dev",
"prefer-stable" : true
"prefer-stable": true
}
49 changes: 24 additions & 25 deletions docker-compose.yaml
@@ -1,35 +1,34 @@
version: "3.9"
services:
app:
container_name: laravel-eloquent-flag-app
image: laravel-eloquent-flag-app
php81:
container_name: laravel-eloquent-flag-lib-81
image: laravel-eloquent-flag-lib-81
build:
context: ./
dockerfile: ./.docker/php/Dockerfile
restart: unless-stopped
dockerfile: ./.docker/php/php81/Dockerfile
tty: true
working_dir: /app
volumes:
- ./:/app
- ./.docker/php/www.conf:/usr/local/etc/php-fpm.d/www.conf:ro
networks:
- laravel-eloquent-flag

nginx:
container_name: laravel-eloquent-flag-nginx
image: nginx:1.21-alpine
restart: unless-stopped
depends_on:
- app
ports:
- "80:80"
environment:
VIRTUAL_HOST: app.laravel-eloquent-flag.localhost
php82:
container_name: laravel-eloquent-flag-lib-82
image: laravel-eloquent-flag-lib-82
build:
context: ./
dockerfile: ./.docker/php/php82/Dockerfile
tty: true
working_dir: /app
volumes:
- ./.docker/nginx/app.laravel-eloquent-flag.80.conf:/etc/nginx/conf.d/app.laravel-eloquent-flag.80.conf:ro
- ./public:/app/public:ro
networks:
- laravel-eloquent-flag
- ./:/app

networks:
laravel-eloquent-flag:
driver: bridge
php83:
container_name: laravel-eloquent-flag-lib-83
image: laravel-eloquent-flag-lib-83
build:
context: ./
dockerfile: ./.docker/php/php83/Dockerfile
tty: true
working_dir: /app
volumes:
- ./:/app
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Expand Up @@ -12,7 +12,7 @@
>
<testsuites>
<testsuite name="Package Test Suite">
<directory suffix=".php">tests/</directory>
<directory suffix=".php">tests/Unit/</directory>
</testsuite>
</testsuites>
<php>
Expand Down

0 comments on commit 1e481b0

Please sign in to comment.