Skip to content

Commit a2fd1ef

Browse files
DariaKunoichijonnott
authored andcommitted
Add Laravel 12 support (#553)
* Laravel 12 support * Update composer.json * Update unit-tests.yml * Update maze-runner-tests.yml * Add Laravel12 test fixture * Remove named arguments in data provider in unit tests --------- Co-authored-by: Jonny Nott <jonnott@gmail.com>
1 parent 4052bf0 commit a2fd1ef

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+2758
-58
lines changed

.github/workflows/maze-runner-tests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ jobs:
3131
laravel-fixture: laravel11
3232
- php-version: '8.4'
3333
laravel-fixture: laravel11
34+
- php-version: '8.3'
35+
laravel-fixture: laravel12
36+
- php-version: '8.4'
37+
laravel-fixture: laravel12
3438
- php-version: '8.0'
3539
laravel-fixture: lumen8
3640

.github/workflows/unit-tests.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,18 @@ jobs:
110110
laravel-version: '10.*'
111111
- php-version: '8.2'
112112
laravel-version: '10.*'
113+
- php-version: '8.2'
114+
laravel-version: '11.*'
113115
- php-version: '8.3'
114116
laravel-version: '11.*'
115117
- php-version: '8.4'
116118
laravel-version: '11.*'
119+
- php-version: '8.2'
120+
laravel-version: '12.*'
121+
- php-version: '8.3'
122+
laravel-version: '12.*'
123+
- php-version: '8.4'
124+
laravel-version: '12.*'
117125

118126
steps:
119127
- uses: actions/checkout@v2

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
"php": ">=5.5",
1515
"bugsnag/bugsnag": "^3.29.0",
1616
"bugsnag/bugsnag-psr-logger": "^1.4|^2.0",
17-
"illuminate/contracts": "^5.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0",
18-
"illuminate/support": "^5.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0",
17+
"illuminate/contracts": "^5.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0",
18+
"illuminate/support": "^5.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0",
1919
"monolog/monolog": "^1.12|^2.0|^3.0"
2020
},
2121
"require-dev": {
22-
"orchestra/testbench": "^3.1|^4.0|^5.0|^6.0|^7.0|^8.0|^9.0",
23-
"phpunit/phpunit": "^4.8.36|^6.3.1|^7.5.15|^8.3.5|^9.3.10|^10.0"
22+
"orchestra/testbench": "^3.1|^4.0|^5.0|^6.0|^7.0|^8.0|^9.0|^10.0",
23+
"phpunit/phpunit": "^4.8.36|^6.3.1|^7.5.15|^8.3.5|^9.3.10|^10.0|^11.0"
2424
},
2525
"autoload": {
2626
"psr-4": {

features/fixtures/docker-compose.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,26 @@ services:
224224
- target: 8000
225225
published: 61311 # must be the same as laravel11
226226

227+
laravel12:
228+
build:
229+
context: laravel12
230+
args:
231+
- PHP_VERSION
232+
environment:
233+
- BUGSNAG_API_KEY
234+
- BUGSNAG_ENDPOINT
235+
- BUGSNAG_SESSION_ENDPOINT
236+
- BUGSNAG_CAPTURE_SESSIONS
237+
- BUGSNAG_USE_CUSTOM_GUZZLE
238+
- BUGSNAG_REGISTER_OOM_BOOTSTRAPPER
239+
- BUGSNAG_DISCARD_CLASSES
240+
- BUGSNAG_REDACTED_KEYS
241+
- BUGSNAG_QUERY
242+
restart: "no"
243+
ports:
244+
- target: 8000
245+
published: 61312
246+
227247
laravel-latest:
228248
build:
229249
context: laravel-latest
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 4
7+
indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false
13+
14+
[*.{yml,yaml}]
15+
indent_size = 2
16+
17+
[docker-compose.yml]
18+
indent_size = 4
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
APP_NAME=Laravel
2+
APP_ENV=local
3+
APP_KEY=
4+
APP_DEBUG=true
5+
APP_URL=http://localhost
6+
7+
APP_LOCALE=en
8+
APP_FALLBACK_LOCALE=en
9+
APP_FAKER_LOCALE=en_US
10+
11+
APP_MAINTENANCE_DRIVER=file
12+
# APP_MAINTENANCE_STORE=database
13+
14+
PHP_CLI_SERVER_WORKERS=4
15+
16+
BCRYPT_ROUNDS=12
17+
18+
LOG_CHANNEL=stack
19+
LOG_STACK=single
20+
LOG_DEPRECATIONS_CHANNEL=null
21+
LOG_LEVEL=debug
22+
23+
DB_CONNECTION=sqlite
24+
# DB_HOST=127.0.0.1
25+
# DB_PORT=3306
26+
# DB_DATABASE=laravel
27+
# DB_USERNAME=root
28+
# DB_PASSWORD=
29+
30+
SESSION_DRIVER=database
31+
SESSION_LIFETIME=120
32+
SESSION_ENCRYPT=false
33+
SESSION_PATH=/
34+
SESSION_DOMAIN=null
35+
36+
BROADCAST_CONNECTION=log
37+
FILESYSTEM_DISK=local
38+
QUEUE_CONNECTION=database
39+
40+
CACHE_STORE=database
41+
# CACHE_PREFIX=
42+
43+
MEMCACHED_HOST=127.0.0.1
44+
45+
REDIS_CLIENT=phpredis
46+
REDIS_HOST=127.0.0.1
47+
REDIS_PASSWORD=null
48+
REDIS_PORT=6379
49+
50+
MAIL_MAILER=log
51+
MAIL_SCHEME=null
52+
MAIL_HOST=127.0.0.1
53+
MAIL_PORT=2525
54+
MAIL_USERNAME=null
55+
MAIL_PASSWORD=null
56+
MAIL_FROM_ADDRESS="hello@example.com"
57+
MAIL_FROM_NAME="${APP_NAME}"
58+
59+
AWS_ACCESS_KEY_ID=
60+
AWS_SECRET_ACCESS_KEY=
61+
AWS_DEFAULT_REGION=us-east-1
62+
AWS_BUCKET=
63+
AWS_USE_PATH_STYLE_ENDPOINT=false
64+
65+
VITE_APP_NAME="${APP_NAME}"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
* text=auto eol=lf
2+
3+
*.blade.php diff=html
4+
*.css diff=css
5+
*.html diff=html
6+
*.md diff=markdown
7+
*.php diff=php
8+
9+
/.github export-ignore
10+
CHANGELOG.md export-ignore
11+
.styleci.yml export-ignore
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/.phpunit.cache
2+
/node_modules
3+
/public/build
4+
/public/hot
5+
/public/storage
6+
/storage/*.key
7+
/storage/pail
8+
/vendor
9+
.env
10+
.env.backup
11+
.env.production
12+
.phpactor.json
13+
.phpunit.result.cache
14+
Homestead.json
15+
Homestead.yaml
16+
npm-debug.log
17+
yarn-error.log
18+
/auth.json
19+
/.fleet
20+
/.idea
21+
/.nova
22+
/.vscode
23+
/.zed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
ARG PHP_VERSION
2+
FROM php:$PHP_VERSION
3+
4+
RUN apt-get update && \
5+
apt-get install -y --no-install-recommends \
6+
git \
7+
unzip \
8+
wget \
9+
zip
10+
11+
WORKDIR /app
12+
13+
COPY . .
14+
COPY --from=composer /usr/bin/composer /usr/local/bin/composer
15+
16+
RUN cp .env.example .env
17+
RUN composer install --no-dev
18+
RUN php artisan key:generate
19+
20+
# create database & apply migrations
21+
RUN touch database/database.sqlite && php artisan migrate --no-interaction
22+
23+
CMD php -S 0.0.0.0:8000 -t public
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400" alt="Laravel Logo"></a></p>
2+
3+
<p align="center">
4+
<a href="https://github.com/laravel/framework/actions"><img src="https://github.com/laravel/framework/workflows/tests/badge.svg" alt="Build Status"></a>
5+
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/dt/laravel/framework" alt="Total Downloads"></a>
6+
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/v/laravel/framework" alt="Latest Stable Version"></a>
7+
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/l/laravel/framework" alt="License"></a>
8+
</p>
9+
10+
## About Laravel
11+
12+
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:
13+
14+
- [Simple, fast routing engine](https://laravel.com/docs/routing).
15+
- [Powerful dependency injection container](https://laravel.com/docs/container).
16+
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
17+
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
18+
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
19+
- [Robust background job processing](https://laravel.com/docs/queues).
20+
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).
21+
22+
Laravel is accessible, powerful, and provides tools required for large, robust applications.
23+
24+
## Learning Laravel
25+
26+
Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
27+
28+
You may also try the [Laravel Bootcamp](https://bootcamp.laravel.com), where you will be guided through building a modern Laravel application from scratch.
29+
30+
If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains thousands of video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
31+
32+
## Laravel Sponsors
33+
34+
We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the [Laravel Partners program](https://partners.laravel.com).
35+
36+
### Premium Partners
37+
38+
- **[Vehikl](https://vehikl.com/)**
39+
- **[Tighten Co.](https://tighten.co)**
40+
- **[WebReinvent](https://webreinvent.com/)**
41+
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
42+
- **[64 Robots](https://64robots.com)**
43+
- **[Curotec](https://www.curotec.com/services/technologies/laravel/)**
44+
- **[Cyber-Duck](https://cyber-duck.co.uk)**
45+
- **[DevSquad](https://devsquad.com/hire-laravel-developers)**
46+
- **[Jump24](https://jump24.co.uk)**
47+
- **[Redberry](https://redberry.international/laravel/)**
48+
- **[Active Logic](https://activelogic.com)**
49+
- **[byte5](https://byte5.de)**
50+
- **[OP.GG](https://op.gg)**
51+
52+
## Contributing
53+
54+
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).
55+
56+
## Code of Conduct
57+
58+
In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).
59+
60+
## Security Vulnerabilities
61+
62+
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed.
63+
64+
## License
65+
66+
The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

0 commit comments

Comments
 (0)