Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Laravel 12 #494

Merged
merged 8 commits into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .examples/laravel/.env.example
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:OHd3Mzh0M25nNnFlczJnYWVuNjcwejJxNnl3eXBnMG0=
APP_KEY=base64:BwuZAzyu5OBaUExGnOWk5Ox+u4AP6YFY/A/MrKlvhb0=
APP_DEBUG=true
APP_TIMEZONE=UTC
APP_URL=http://localhost

APP_LOCALE=en
APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_US

APP_MAINTENANCE_DRIVER=file
APP_MAINTENANCE_STORE=database
# APP_MAINTENANCE_STORE=database

PHP_CLI_SERVER_WORKERS=4

BCRYPT_ROUNDS=12

Expand All @@ -37,7 +38,7 @@ FILESYSTEM_DISK=local
QUEUE_CONNECTION=database

CACHE_STORE=database
CACHE_PREFIX=
# CACHE_PREFIX=

MEMCACHED_HOST=127.0.0.1

Expand All @@ -47,11 +48,11 @@ REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_MAILER=log
MAIL_SCHEME=null
MAIL_HOST=127.0.0.1
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="[email protected]"
MAIL_FROM_NAME="${APP_NAME}"

Expand Down
9 changes: 5 additions & 4 deletions .examples/laravel/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,20 @@
/public/hot
/public/storage
/storage/*.key
/storage/pail
/vendor
.env
.env.backup
.env.production
.phpactor.json
.phpunit.result.cache
Homestead.json
Homestead.yaml
auth.json
npm-debug.log
yarn-error.log
/auth.json
/.fleet
/.idea
/.nova
/.vscode

/.php-cs-fixer.cache
/phpstan.neon
/.zed
9 changes: 3 additions & 6 deletions .examples/laravel/app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,21 @@

namespace App\Models;

use Database\Factories\UserFactory;
// use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;

class User extends Authenticatable
{
/**
* @phpstan-use HasFactory<UserFactory>
*/
/** @use HasFactory<\Database\Factories\UserFactory> */
use HasFactory;
use Notifiable;

/**
* The attributes that are mass assignable.
*
* @var array<int, string>
* @var list<string>
*/
protected $fillable = [
'name',
Expand All @@ -32,7 +29,7 @@ class User extends Authenticatable
/**
* The attributes that should be hidden for serialization.
*
* @var array<int, string>
* @var list<string>
*/
protected $hidden = [
'password',
Expand Down
7 changes: 5 additions & 2 deletions .examples/laravel/artisan
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env php
<?php

use Illuminate\Foundation\Application;
use Symfony\Component\Console\Input\ArgvInput;

define('LARAVEL_START', microtime(true));
Expand All @@ -9,7 +10,9 @@ define('LARAVEL_START', microtime(true));
require __DIR__.'/vendor/autoload.php';

// Bootstrap Laravel and handle the command...
$status = (require_once __DIR__.'/bootstrap/app.php')
->handleCommand(new ArgvInput);
/** @var Application $app */
$app = require_once __DIR__.'/bootstrap/app.php';

$status = $app->handleCommand(new ArgvInput);

exit($status);
26 changes: 14 additions & 12 deletions .examples/laravel/composer.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
{
"$schema": "https://getcomposer.org/schema.json",
"name": "laravel/laravel",
"type": "project",
"description": "The skeleton application for the Laravel framework.",
"keywords": ["laravel", "framework"],
"license": "MIT",
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": "^8.2",
"laravel/framework": "^11.0",
"laravel/tinker": "^2.9",
"laravel/framework": "^12.0",
"laravel/tinker": "^2.10.1",
"cmsig/seal": "^0.7",
"cmsig/seal-laravel-package": "^0.7"
},
"require-dev": {
"fakerphp/faker": "^1.23",
"laravel/pail": "^1.2.2",
"laravel/pint": "^1.13",
"laravel/sail": "^1.26",
"laravel/sail": "^1.41",
"mockery/mockery": "^1.6",
"nunomaduro/collision": "^8.0",
"phpunit/phpunit": "^10.5",
"pestphp/pest": "^2.16",
"nunomaduro/collision": "^8.6",
"pestphp/pest": "^3.7",
"php-cs-fixer/shim": "^3.51",
"phpstan/extension-installer": "^1.2",
"phpstan/phpstan": "^1.10",
Expand Down Expand Up @@ -90,10 +89,11 @@
"@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"",
"@php artisan migrate --graceful --ansi"
],
"post-install-cmd": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\"",
"@php artisan key:generate --ansi"
"dev": [
"Composer\\Config::disableProcessTimeout",
"npx concurrently -c \"#93c5fd,#c4b5fd,#fb7185,#fdba74\" \"php artisan serve\" \"php artisan queue:listen --tries=1\" \"php artisan pail --timeout=0\" \"npm run dev\" --names=server,queue,logs,vite"
],
"serve": "@php artisan serve",
"test": [
"Composer\\Config::disableProcessTimeout",
"vendor/bin/pest"
Expand Down Expand Up @@ -129,5 +129,7 @@
"php-http/discovery": true,
"phpstan/extension-installer": true
}
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
Loading
Loading