laravel-verification
Verification loop for Laravel projects: env checks, linting, static analysis, tests with coverage, security scans, and deployment readiness.
Target: Cloud, operations & security. Automatically collected · unverified.
Excerpt from the author’s documentation
Extracted from a fixed version of SKILL.md in its original language. This is the author’s documentation; installation, compatibility and runtime results have not been verified by this site.
Read the original Chinese text
Topics in the source
- Laravel 验证循环
- 使用时机
- 工作原理
- 第一阶段:环境检查
- 第一阶段补充:Composer 和自动加载
- 第二阶段:代码检查和静态分析
- 第三阶段:测试和覆盖率
- 第四阶段:安全和依赖项检查
在发起 PR 前、进行重大更改后以及部署前运行。 在为一个 Laravel 项目开启拉取请求之前 在重大重构或依赖升级之后 为预生产或生产环境进行部署前验证 运行完整的 代码检查 -> 测试 -> 安全检查 -> 部署就绪 流水线 按顺序运行从环境检查到部署就绪的各个阶段,每一层都建立在前一层的基础上。 环境和 Composer 检查是所有其他步骤的关卡;如果它们失败,立即停止。 代码检查/静态分析应在运行完整测试和覆盖率检查前确保通过。 安全性和迁移审查在测试之后进行,以便在涉及数据或发布步骤之前验证行为。 构建/部署就绪以及队列/调度器检查是最后的关卡;任何失败都会阻止发布。 验证 .env 文件存在且包含必需的键 确认生产环境已设置 APPDEBUG=false 确认 APPENV 与目标部署环境匹配(production、staging) 如果在本地使用 Laravel Sail: 如果你的项目使用 Psalm 而不是 PHPStan: 覆盖率(CI 环境): CI 示例(格式化 -> 静态分析 -> 测试): 仔细审查破坏性迁移 确保迁移文件名遵循 YmdHis 格式(例如,20250314154210createorderstable.php)并清晰地描述变更 确保可以执行回滚 验证 down() 方法,避免在没有明确备份的情况下造成不可逆的数据丢失 确保在生产配置下缓存预热成功 验证队列工作者和调度器已配置 确认在目标环境中 storage/ 和 bootstrap/cache/ 目录可写 如果使用了 Horizon: 如果 queue:monitor 命令可用,可以用它来检查积压作业而无需处理它们: 主动验证(仅限预生产环境):向一个专用队列分发一个无操作作业,并运行一个单独的工作者来处理它(确保配置了一个非 sync 的队列连接)。 验证该作业产生了预期的副作用(日志条目、健康检查表行或指标)。 仅在处理测试作业是安全的非生产环境中运行此检查。 最小流程: CI 风格流水线:
- Source repository
- affaan-m/ECC
- Source file
- docs/zh-CN/skills/laravel-verification/SKILL.md
- Fixed revision
- d2ef2680594f9a17526a6e1a2e18b3d242c5d17b
Sources and evidence
This record was collected automatically. Its documentation, suitability and runtime behavior have not been manually verified.
Author: affaan-m/ECC · original repository metadata. Documentation review: Not reviewed. Last source check: 2026-11-09T15:01:42.430Z.
Categories are inferred from names, descriptions and paths. They do not establish compatibility.
License and attribution
MIT. Third-party content and copyright remain with their authors. Refer to the original license and terms.
Original license ↗Synchronization, copying and user-reported success do not mark a resource as runtime-tested.
Limitations and notes
- Collecting metadata does not mean this site has installed, adapted, runtime-tested or security-reviewed the resource.