Skip to content

Commit 96a2715

Browse files
authored
Add Laravel 11 support (#32)
1 parent 572c540 commit 96a2715

File tree

10 files changed

+103
-164
lines changed

10 files changed

+103
-164
lines changed

.docker/nginx/app.laravel-ownership.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.yml

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-ownership` will be documented in this f
44

55
## [Unreleased]
66

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

915
### Added
@@ -129,7 +135,8 @@ All notable changes to `cybercog/laravel-ownership` will be documented in this f
129135

130136
- Initial release
131137

132-
[Unreleased]: https://github.com/cybercog/laravel-ownership/compare/5.5.0...master
138+
[Unreleased]: https://github.com/cybercog/laravel-ownership/compare/5.6.0...master
139+
[5.6.0]: https://github.com/cybercog/laravel-ownership/compare/5.4.0...5.6.0
133140
[5.5.0]: https://github.com/cybercog/laravel-ownership/compare/5.4.0...5.5.0
134141
[5.4.0]: https://github.com/cybercog/laravel-ownership/compare/5.3.0...5.4.0
135142
[5.3.0]: https://github.com/cybercog/laravel-ownership/compare/5.2.0...5.3.0
@@ -144,6 +151,7 @@ All notable changes to `cybercog/laravel-ownership` will be documented in this f
144151
[2.0.0]: https://github.com/cybercog/laravel-ownership/compare/1.0.0...2.0.0
145152
[Upgrade instructions]: UPGRADING.md
146153

154+
[#32]: https://github.com/cybercog/laravel-ownership/pull/32
147155
[#28]: https://github.com/cybercog/laravel-ownership/pull/28
148156
[#27]: https://github.com/cybercog/laravel-ownership/pull/27
149157
[#25]: https://github.com/cybercog/laravel-ownership/pull/25

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@
4141
},
4242
"require": {
4343
"php": "^8.0",
44-
"illuminate/database": "^9.0|^10.0",
45-
"illuminate/support": "^9.0|^10.0"
44+
"illuminate/database": "^9.0|^10.0|^11.0",
45+
"illuminate/support": "^9.0|^10.0|^11.0"
4646
},
4747
"require-dev": {
4848
"mockery/mockery": "^1.0",
49-
"orchestra/testbench": "^7.0|^8.0",
50-
"phpunit/phpunit": "^9.6"
49+
"orchestra/testbench": "^7.0|^8.0|^9.0",
50+
"phpunit/phpunit": "^9.6|^10.5"
5151
},
5252
"autoload": {
5353
"psr-4": {
@@ -75,5 +75,5 @@
7575
}
7676
},
7777
"minimum-stability": "dev",
78-
"prefer-stable" : true
78+
"prefer-stable": true
7979
}

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-ownership-app
5-
image: laravel-ownership-app
3+
php81:
4+
container_name: laravel-ownership-lib-81
5+
image: laravel-ownership-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-ownership
1613

17-
nginx:
18-
container_name: laravel-ownership-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-ownership.localhost
14+
php82:
15+
container_name: laravel-ownership-lib-82
16+
image: laravel-ownership-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-ownership.80.conf:/etc/nginx/conf.d/app.laravel-ownership.80.conf:ro
29-
- ./public:/app/public:ro
30-
networks:
31-
- laravel-ownership
23+
- ./:/app
3224

33-
networks:
34-
laravel-ownership:
35-
driver: bridge
25+
php83:
26+
container_name: laravel-ownership-lib-83
27+
image: laravel-ownership-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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
>
1313
<testsuites>
1414
<testsuite name="Package Test Suite">
15-
<directory suffix=".php">tests/</directory>
16-
<exclude>tests/database/factories/</exclude>
15+
<directory suffix=".php">tests/Unit/</directory>
1716
</testsuite>
1817
</testsuites>
1918
<php>

0 commit comments

Comments
 (0)