54178f6d70
實作 cloud-ready-s3-storage 的程式碼部分(tasks 1-3):
- config/filesystems.php:public disk 的 driver 改吃 FILESYSTEM_DISK env,
切換為 s3 時不需改動既有 6 個 Storage::disk('public') 呼叫點
- .env.example:FILESYSTEM_DISK 維持 local 預設(本機無 S3 服務),補齊
AWS_ENDPOINT/AWS_URL/AWS_USE_PATH_STYLE_ENDPOINT 供 R2 等服務使用
- 新增 storage:migrate-to-s3 指令:一次性把 storage/app/public 既有檔案
上傳到 S3,來源固定讀本機磁碟(不受 FILESYSTEM_DISK 影響),支援
--dry-run,失敗不中斷且不刪除本機檔案
- 新增測試:遷移指令(上傳/dry-run/部分失敗)+ public disk 在 local
driver 下零 AWS credentials 也能正常運作
239 tests passed / 578 assertions,容器內驗證無回歸。
R2 環境準備、VPS 部署與實際切換(tasks 4-6)待 Hank 自行處理。
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011LpcY9b7y9x4fusHBTXciQ
78 lines
2.3 KiB
JSON
78 lines
2.3 KiB
JSON
{
|
|
"name": "laravel/laravel",
|
|
"type": "project",
|
|
"description": "The skeleton application for the Laravel framework.",
|
|
"keywords": ["laravel", "framework"],
|
|
"license": "MIT",
|
|
"require": {
|
|
"php": "^8.2",
|
|
"darkaonline/l5-swagger": "^9.0",
|
|
"intervention/image": "^3.11",
|
|
"laravel/framework": "^11.0",
|
|
"laravel/reverb": "^1.10",
|
|
"laravel/sanctum": "^4.1",
|
|
"laravel/socialite": "^5.20",
|
|
"laravel/tinker": "^2.9",
|
|
"league/flysystem-aws-s3-v3": "^3.35",
|
|
"predis/predis": "^3.4",
|
|
"sentry/sentry-laravel": "^4.25"
|
|
},
|
|
"require-dev": {
|
|
"fakerphp/faker": "^1.23",
|
|
"laravel/pint": "^1.13",
|
|
"laravel/sail": "^1.26",
|
|
"mockery/mockery": "^1.6",
|
|
"nunomaduro/collision": "^8.0",
|
|
"phpunit/phpunit": "^10.5",
|
|
"spatie/laravel-ignition": "^2.4"
|
|
},
|
|
"autoload": {
|
|
"psr-4": {
|
|
"App\\": "app/",
|
|
"Database\\Factories\\": "database/factories/",
|
|
"Database\\Seeders\\": "database/seeders/"
|
|
}
|
|
},
|
|
"autoload-dev": {
|
|
"psr-4": {
|
|
"Tests\\": "tests/"
|
|
}
|
|
},
|
|
"scripts": {
|
|
"post-autoload-dump": [
|
|
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
|
|
"@php artisan package:discover --ansi"
|
|
],
|
|
"post-update-cmd": [
|
|
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
|
|
],
|
|
"post-root-package-install": [
|
|
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
|
|
],
|
|
"post-create-project-cmd": [
|
|
"@php artisan key:generate --ansi",
|
|
"@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"",
|
|
"@php artisan migrate --ansi"
|
|
]
|
|
},
|
|
"extra": {
|
|
"branch-alias": {
|
|
"dev-master": "11.x-dev"
|
|
},
|
|
"laravel": {
|
|
"dont-discover": []
|
|
}
|
|
},
|
|
"config": {
|
|
"optimize-autoloader": true,
|
|
"preferred-install": "dist",
|
|
"sort-packages": true,
|
|
"allow-plugins": {
|
|
"pestphp/pest-plugin": true,
|
|
"php-http/discovery": true
|
|
}
|
|
},
|
|
"minimum-stability": "stable",
|
|
"prefer-stable": true
|
|
}
|