Skip to content

Commit 1e481b0

Browse files
authored
Add Laravel 11 support (#81)
1 parent e40a5d6 commit 1e481b0

File tree

10 files changed

+102
-162
lines changed

10 files changed

+102
-162
lines changed

.docker/nginx/app.laravel-eloquent-flag.80.conf

Lines changed: 0 additions & 40 deletions
This file was deleted.

.docker/php/Dockerfile renamed to .docker/php/php81/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# ----------------------
22
# The FPM base container
33
# ----------------------
4-
FROM php:8.1-fpm-alpine AS dev
4+
FROM php:8.1-cli-alpine AS dev
5+
6+
RUN apk add --no-cache --virtual .build-deps \
7+
$PHPIZE_DEPS
58

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

.docker/php/php82/Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# ----------------------
2+
# The FPM base container
3+
# ----------------------
4+
FROM php:8.2-cli-alpine AS dev
5+
6+
RUN apk add --no-cache --virtual .build-deps \
7+
$PHPIZE_DEPS
8+
9+
# Cleanup apk cache and temp files
10+
RUN rm -rf /var/cache/apk/* /tmp/*
11+
12+
# ----------------------
13+
# Composer install step
14+
# ----------------------
15+
16+
# Get latest Composer
17+
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
18+
19+
# ----------------------
20+
# The FPM production container
21+
# ----------------------
22+
FROM dev

.docker/php/php83/Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# ----------------------
2+
# The FPM base container
3+
# ----------------------
4+
FROM php:8.3-cli-alpine AS dev
5+
6+
RUN apk add --no-cache --virtual .build-deps \
7+
$PHPIZE_DEPS
8+
9+
# Cleanup apk cache and temp files
10+
RUN rm -rf /var/cache/apk/* /tmp/*
11+
12+
# ----------------------
13+
# Composer install step
14+
# ----------------------
15+
16+
# Get latest Composer
17+
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
18+
19+
# ----------------------
20+
# The FPM production container
21+
# ----------------------
22+
FROM dev

.docker/php/www.conf

Lines changed: 0 additions & 85 deletions
This file was deleted.

.github/workflows/tests.yaml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,38 @@
11
name: tests
22

3-
on: [ push, pull_request ]
3+
on:
4+
- push
5+
- pull_request
46

57
jobs:
68
test:
79
runs-on: ${{ matrix.os }}
10+
811
strategy:
912
fail-fast: true
1013
matrix:
11-
os: [ ubuntu-latest ]
12-
php: [ 8.0, 8.1, 8.2 ]
13-
laravel: [ 9.*, 10.* ]
14-
dependency-version: [ prefer-lowest, prefer-stable ]
14+
os: [ubuntu-latest]
15+
php: [8.0, 8.1, 8.2, 8.3]
16+
laravel: ['9.*', '10.*', '11.*']
17+
dependency-version: [prefer-lowest, prefer-stable]
1518
exclude:
1619
- laravel: 9.*
1720
php: 8.2
21+
- laravel: 9.*
22+
php: 8.3
1823
- laravel: 10.*
1924
php: 8.0
25+
- laravel: 11.*
26+
php: 8.0
27+
- laravel: 11.*
28+
php: 8.1
2029
include:
2130
- laravel: 9.*
2231
testbench: 7.*
2332
- laravel: 10.*
2433
testbench: 8.*
34+
- laravel: 11.*
35+
testbench: 9.*
2536

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

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to `cybercog/laravel-eloquent-flag` will be documented in th
44

55
## [Unreleased]
66

7+
## [6.1.0] - 2024-03-09
8+
9+
### Added
10+
11+
- ([#81]) Added Laravel 11 support
12+
713
## [6.0.0] - 2023-02-24
814

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

320326
- `is_active` boolean flag added.
321327

322-
[Unreleased]: https://github.com/cybercog/laravel-eloquent-flag/compare/6.0.0...master
328+
[Unreleased]: https://github.com/cybercog/laravel-eloquent-flag/compare/6.1.0...master
329+
[6.1.0]: https://github.com/cybercog/laravel-eloquent-flag/compare/6.0.0...6.1.0
323330
[6.0.0]: https://github.com/cybercog/laravel-eloquent-flag/compare/5.4.0...6.0.0
324331
[5.4.0]: https://github.com/cybercog/laravel-eloquent-flag/compare/5.3.0...5.4.0
325332
[5.3.0]: https://github.com/cybercog/laravel-eloquent-flag/compare/5.2.0...5.3.0
@@ -351,6 +358,7 @@ All notable changes to `cybercog/laravel-eloquent-flag` will be documented in th
351358
[1.2.0]: https://github.com/cybercog/laravel-eloquent-flag/compare/1.1.0...1.2.0
352359
[1.1.0]: https://github.com/cybercog/laravel-eloquent-flag/compare/1.0.0...1.1.0
353360

361+
[#81]: https://github.com/cybercog/laravel-eloquent-flag/pull/81
354362
[#77]: https://github.com/cybercog/laravel-eloquent-flag/pull/77
355363
[#74]: https://github.com/cybercog/laravel-eloquent-flag/pull/71
356364
[#71]: https://github.com/cybercog/laravel-eloquent-flag/pull/71

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@
5454
},
5555
"require": {
5656
"php": "^8.0",
57-
"illuminate/database": "^9.0|^10.0"
57+
"illuminate/database": "^9.0|^10.0|^11.0"
5858
},
5959
"require-dev": {
6060
"mockery/mockery": "^1.0",
61-
"orchestra/testbench": "^7.0|^8.0",
62-
"phpunit/phpunit": "^9.6"
61+
"orchestra/testbench": "^7.0|^8.0|^9.0",
62+
"phpunit/phpunit": "^9.6|^10.5"
6363
},
6464
"autoload": {
6565
"psr-4": {
@@ -79,5 +79,5 @@
7979
"sort-packages": true
8080
},
8181
"minimum-stability": "dev",
82-
"prefer-stable" : true
82+
"prefer-stable": true
8383
}

docker-compose.yaml

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,34 @@
11
version: "3.9"
22
services:
3-
app:
4-
container_name: laravel-eloquent-flag-app
5-
image: laravel-eloquent-flag-app
3+
php81:
4+
container_name: laravel-eloquent-flag-lib-81
5+
image: laravel-eloquent-flag-lib-81
66
build:
77
context: ./
8-
dockerfile: ./.docker/php/Dockerfile
9-
restart: unless-stopped
8+
dockerfile: ./.docker/php/php81/Dockerfile
9+
tty: true
1010
working_dir: /app
1111
volumes:
1212
- ./:/app
13-
- ./.docker/php/www.conf:/usr/local/etc/php-fpm.d/www.conf:ro
14-
networks:
15-
- laravel-eloquent-flag
1613

17-
nginx:
18-
container_name: laravel-eloquent-flag-nginx
19-
image: nginx:1.21-alpine
20-
restart: unless-stopped
21-
depends_on:
22-
- app
23-
ports:
24-
- "80:80"
25-
environment:
26-
VIRTUAL_HOST: app.laravel-eloquent-flag.localhost
14+
php82:
15+
container_name: laravel-eloquent-flag-lib-82
16+
image: laravel-eloquent-flag-lib-82
17+
build:
18+
context: ./
19+
dockerfile: ./.docker/php/php82/Dockerfile
20+
tty: true
21+
working_dir: /app
2722
volumes:
28-
- ./.docker/nginx/app.laravel-eloquent-flag.80.conf:/etc/nginx/conf.d/app.laravel-eloquent-flag.80.conf:ro
29-
- ./public:/app/public:ro
30-
networks:
31-
- laravel-eloquent-flag
23+
- ./:/app
3224

33-
networks:
34-
laravel-eloquent-flag:
35-
driver: bridge
25+
php83:
26+
container_name: laravel-eloquent-flag-lib-83
27+
image: laravel-eloquent-flag-lib-83
28+
build:
29+
context: ./
30+
dockerfile: ./.docker/php/php83/Dockerfile
31+
tty: true
32+
working_dir: /app
33+
volumes:
34+
- ./:/app

phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
>
1313
<testsuites>
1414
<testsuite name="Package Test Suite">
15-
<directory suffix=".php">tests/</directory>
15+
<directory suffix=".php">tests/Unit/</directory>
1616
</testsuite>
1717
</testsuites>
1818
<php>

0 commit comments

Comments
 (0)