Skip to content

Migrate to Laravel 13 with API customizations and test suite - #15

Merged
jorgemudry merged 4 commits into
masterfrom
laravel_13.x_migration
Mar 30, 2026
Merged

jorgemudry merged 4 commits into
masterfrom
laravel_13.x_migration

Conversation

@jorgemudry

@jorgemudry jorgemudry commented Mar 30, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Migrated all API-oriented customizations from master onto a clean Laravel 13 installation
  • Upgraded dependencies for Laravel 13 compatibility: treblle ^6.0.1, Pest v4, Tinker v3
  • Added comprehensive test suite with 51 tests (92 assertions) covering all custom components
  • Skipped bugsnag/bugsnag-laravel (no Laravel 13 support yet)

What's included

  • Exception handling pipeline: ApiException, FlattenException, ExceptionMapper, ErrorResponseBuilder, ExceptionResource
  • Middleware: ForceJsonResponse (forces JSON on all API requests)
  • Controllers: ServiceAlive, ServiceReady (K8s probes), PrometheusMetrics
  • Models: UnGuardedModel (ULIDs, no mass assignment guard)
  • Traits/Enums: HasApiResponse, HasToArrayEnum, Status enum
  • Routes: API v1 structure with service and metrics groups
  • Config: API auth guard, Sanctum, rate limiting (60 req/min)
  • Dev tooling: PHPStan, Pint, Rector, PHPInsights, git hooks, CI/CD workflows

Incompatibilities

Package Issue Action
bugsnag/bugsnag-laravel No Laravel 13 support Skipped — revisit when updated
treblle/treblle-laravel Master had ^4.6 Upgraded to ^6.0.1
pestphp/pest Master had v3 Upgraded to v4
laravel/tinker Master had v2 Upgraded to v3

Test plan

  • php artisan test --compact — 51 tests, 92 assertions, all passing
  • vendor/bin/phpstan analyse — 0 errors
  • vendor/bin/pint --dirty — no formatting issues
  • Verify health endpoints manually: GET /v1/service/alive, GET /v1/service/ready
  • Decide on Bugsnag alternative or wait for Laravel 13 support

Re-apply all custom API-oriented modifications from master onto a clean
Laravel 13 installation. This includes the exception handling pipeline,
ForceJsonResponse middleware, health check and Prometheus endpoints,
UnGuardedModel with ULIDs, API routing structure, rate limiting, and
all dev tooling configs.

Skipped bugsnag/bugsnag-laravel (no Laravel 13 support yet). Upgraded
treblle to ^6.0.1, Pest to v4, and Tinker to v3 for compatibility.
51 tests covering all custom components: exception handling pipeline,
health check endpoints, Prometheus metrics, ForceJsonResponse middleware,
API routing, models, enums, traits, and architecture constraints.
@jorgemudry
jorgemudry merged commit 465afb9 into master Mar 30, 2026
2 checks passed
@jorgemudry
jorgemudry deleted the laravel_13.x_migration branch March 30, 2026 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant