laravel 12 upgrade: Checklist — Things I Fix Before Touching Production

laravel 12 upgrade: Things I fix before touching production
Upgrading a live application to a new major release is part technical audit, part risk management. In this guide I share a pragmatic laravel 12 upgrade checklist I use at Prateeksha Web Design when planning a laravel version upgrade or general php framework update. The goal: ship confidently, rollback if necessary, and minimize user impact.
Why this checklist matters
A laravel 12 upgrade touches many layers: PHP version constraints, package compatibility, custom code, middleware and queue behavior. Following a clear laravel migration checklist reduces surprises and supports a smooth production rollout. Prateeksha Web Design applies these steps within our laravel maintenance services to keep client apps secure and performant.
Scope: What we cover
- Code changes and deprecations
- Composer & dependency updates
- Test coverage and integration checks
- Database migrations and data-forward compatibility
- CI/CD and deployment strategy
Preparation: inventory and baseline
- Create a full inventory of composer.json, PHP version, packages and custom packages. This informs the php framework update path.
- Run static analysis (PHPStan/Psalm) and fix current issues before upgrading packages.
- Record baseline metrics: response times, error rates, and database query times.
Tools I run first
- Static analysis (PHPStan, Psalm)
- Dependency checkers (composer outdated, Roave/BackwardCompatibilityCheck)
- Security scanners (composer audit or external scanner)
Compatibility matrix (quick view)
Here’s a short comparison of what changes matter most across environments when planning the laravel 12 upgrade.
| Area | Risk | Action before upgrade |
|---|---|---|
| PHP version | High — Laravel 12 may require newer PHP features | Upgrade PHP on staging, run full test suite |
| Third-party packages | Medium to High — some packages may not support Laravel 12 | Check composer.json, run composer why-not, fork or replace packages |
| Database migrations | Medium — new migrations must be zero-downtime | Use rolling migrations, add backward-compatible changes |
| Middleware/Auth | Medium — behavior changes may affect requests | Add integration tests and verify auth flows |
| CI/CD | Low to Medium — pipelines may need new steps | Update CI images, caching and artifact strategies |
Code-level checklist (developer tasks)
- Search for deprecated APIs in your codebase and address them.
- Replace removed helper functions or methods
- Adjust any changed method signatures
- Ensure typed properties and union types used are compatible with target PHP version
- Update any custom service providers that rely on internal framework behavior
- Review events, jobs and queued listeners for changed dispatch logic
Database & migration checklist
- Review existing migrations for non-reversible destructive operations
- Implement zero-downtime migration patterns (add columns, backfill, switch reads)
- Test migrations on a copy of production data when possible
- Backup and snapshot before running migrations in production
Testing strategy
- Run unit tests, integration tests and end-to-end tests in CI against the upgraded environment
- Add smoke tests for critical pages (login, checkout, API endpoints)
- Use staging with production-like data and traffic replay where possible
CI/CD and deployment
- Update CI runners to the new PHP version and cache directories correctly
- Use feature branches and review apps for complex upgrades
- Deploy to staging and run an automated full-test pipeline before any production push
- Use blue-green or canary releases if available; otherwise use maintenance windows and monitoring
Rollback plan
- Store previous application and database snapshots
- Have an automated rollback job in CI to redeploy the last known-good release
- Verify rollback by running smoke tests automatically post-rollback
Comparison: Rolling vs Blue-Green vs Canary
Below is a short comparison to pick the right deployment style for a laravel version upgrade.
| Deployment Style | Downtime | Risk | Complexity |
|---|---|---|---|
| Rolling | Low to Medium | Medium — partial exposure possible | Medium |
| Blue-Green | Near-zero | Low — easy to switch back | High |
| Canary | Near-zero | Low — limited exposure smaller impact | High |
Real-World Scenarios
Scenario 1: Midnight production crash after dependency update
A midsize ecommerce app upgraded a search package that wasn't compatible with Laravel 12. After deployment, search requests threw fatal errors. The team reverted the release within 20 minutes because they had a tested rollback and a snapshot backup. Post-mortem added a dependency compatibility gate to the laravel migration checklist.
Scenario 2: Silent performance regression after php framework update
An analytics dashboard ran slower after a php framework update. Baseline metrics enabled the team to pinpoint a changed query builder behavior. The fix involved optimizing a few queries and pinning the patch version of a package; this was added to regular health checks in Prateeksha Web Design maintenance plans.
Scenario 3: Auth token handling change (optional)
A B2B API experienced token expiry issues after an upgrade; session serialization semantics changed. The team issued a minor release to adjust token handling and added integration tests to cover auth flows in future laravel version upgrades.
Checklist
- Inventory composer.json and PHP versions
- Run static analysis and fix reported issues
- Pin or replace incompatible packages
- Create staging environment with production-like data
- Run full test suite (unit, integration, E2E)
- Implement zero-downtime migration plan
- Prepare backups and rollback procedure
- Update CI/CD pipelines and runner images
- Deploy to staging, test, then roll out using chosen strategy
- Monitor metrics and logs closely post-deploy
This actionable checklist forms the core of the Prateeksha Web Design approach to laravel migration checklist work and laravel maintenance services.
Latest News & Trends
- The PHP ecosystem continues to push for union types and JIT improvements; always validate PHP feature support before a php framework update.
- Many package maintainers now tag compatibility across major Laravel releases — track package changelogs during a laravel version upgrade.
- Observability and automated rollback practices are becoming standard for framework upgrades to reduce blast radius.
Related authoritative reading
- Google Search Central — for SEO and site health considerations during upgrades
- Google Lighthouse — for performance baseline and regressions
- OWASP — for security checks and best practices
- W3C Web Accessibility Initiative — ensure accessible changes don't regress UX
- NIST Cybersecurity Framework — for governance and risk management guidance
- Mozilla MDN Web Docs — for JS/HTTP/CSS spec references
Deployment checklist (detailed)
- Prepare blue-green or canary deployment setup if possible
- Validate database migrations on staging with sampled production data
- Warm caches and queue workers on the target release before routing traffic
- Monitor error rates, latency, and key business metrics during rollout
Example commands and snippets
- Composer update with dry-run style check:
composer update --dry-run
composer why-not laravel/framework 12.*
- Run static analysis and tests in CI before merge:
vendor/bin/phpstan analyse --level=max
vendor/bin/pest --testsuite=integration
- Example canary deploy strategy using tags and traffic split (CI script excerpt)
# Build and tag
git tag -f release-v12-canary
# Push tag and instruct platform to route 10% traffic to canary
platform deploy --tag release-v12-canary --traffic 10
Observability and post-upgrade checks
- Monitor application errors (Sentry/NewRelic) and set automated alerts
- Check database slow queries and locks
- Verify queue backlog and worker health
- Validate third-party integrations (payment gateways, email providers)
FAQs
- Q: How long does a typical laravel 12 upgrade take?
A: The time varies by project size and complexity. Small apps can be upgraded in hours with good test coverage; larger systems may take days to weeks due to package compatibility checks, migration planning and staged rollouts. Prateeksha Web Design estimates timelines after an initial audit.
- Q: Do I need to upgrade PHP before doing a laravel version upgrade?
A: Often yes. Laravel 12 may require newer PHP features, so you should plan your php framework update in tandem and verify all packages support the PHP target version. Use a staging environment to validate before production.
- Q: What if a package is not compatible with Laravel 12?
A: Options include forking the package, contributing a compatibility fix, replacing it with an alternative, or postponing the laravel version upgrade until a compatible release is available. Document decisions in your laravel migration checklist.
- Q: Can I perform a zero-downtime migration for database schema changes?
A: Yes; use backward-compatible changes (add columns, avoid dropping columns/renaming without a staged approach), backfilling data, and switching reads/writes in a controlled sequence. Always test on a staging copy of production data.
- Q: How do Prateeksha Web Design's laravel maintenance services help with upgrades?
A: Our laravel maintenance services include dependency audits, staging deployments, automated testing pipelines and monitored rollouts to ensure a smooth laravel version upgrade, minimizing downtime and risk.
Key takeaways
Conclusion
A successful laravel 12 upgrade is about careful preparation and automation. Follow a strict laravel migration checklist, validate dependencies, update CI/CD, test thoroughly, and deploy with an execution plan that supports rollback. Prateeksha Web Design applies these principles across our laravel maintenance services and php framework update work to reduce risk and speed up delivery.
About Prateeksha Web Design
Prateeksha Web Design provides Next.js and Laravel services focused on migrations, upgrades and ongoing laravel maintenance services with a process-driven approach to deployments and testing (40 words)
Chat with us now Contact us today.