项目基于 Laravel 13,运行环境要求 PHP 8.3+。Composer 按 PHP 8.3 解析依赖,以便 PHP 8.3 和 8.4 环境使用同一份锁文件。
composer install
composer check-platform-reqs
php artisan test测试使用内存 SQLite 隔离论坛和排行榜数据,需要启用 pdo_sqlite 扩展。
先确认 Web 服务和命令行均使用 PHP 8.3+,然后在发布目录执行:
composer install --no-dev --prefer-dist --optimize-autoloader
composer check-platform-reqs --no-dev
php artisan config:cache
php artisan route:cache
php artisan view:cache本次升级不新增数据库迁移。保留现有应用密钥、缓存前缀、会话 Cookie 名称及 PHP 会话序列化格式。缓存驱动优先读取 CACHE_STORE,未设置时兼容原有 CACHE_DRIVER;若同时配置了两者,请确认期望的驱动。缓存负载使用数组和字符串,禁止反序列化 PHP 对象。
管理后台继续使用锁文件中的 encore/laravel-admin 1.8.19。该版本有尚无上游修复版本的文件上传漏洞 CVE-2023-24249,本次框架升级未修复该旧依赖问题;composer audit 会继续报告该项,未关闭安全审计或添加忽略规则。生产环境需单独处理后台依赖,并确保上传目录不执行 PHP。
在替换该后台依赖前,可使用定向更新维护框架及测试依赖(完整 composer update 会被该旧依赖的安全公告阻止):
composer update "laravel/*" livewire/livewire phpunit/phpunit nunomaduro/collision --with-all-dependencies升级依据:Laravel 12 升级指南、Laravel 13 升级指南。
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:
- Simple, fast routing engine.
- Powerful dependency injection container.
- Multiple back-ends for session and cache storage.
- Expressive, intuitive database ORM.
- Database agnostic schema migrations.
- Robust background job processing.
- Real-time event broadcasting.
Laravel is accessible, powerful, and provides tools required for large, robust applications.
Laravel has the most extensive and thorough documentation and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
You may also try the Laravel Bootcamp, where you will be guided through building a modern Laravel application from scratch.
If you don't feel like reading, Laracasts 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.
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.
- Vehikl
- Tighten Co.
- WebReinvent
- Kirschbaum Development Group
- 64 Robots
- Curotec
- Cyber-Duck
- DevSquad
- Jump24
- Redberry
- Active Logic
- byte5
- OP.GG
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the Laravel documentation.
In order to ensure that the Laravel community is welcoming to all, please review and abide by the Code of Conduct.
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via taylor@laravel.com. All security vulnerabilities will be promptly addressed.
The Laravel framework is open-sourced software licensed under the MIT license.