roave/backward-compatibility-check
Checks your PHP library for backward compatibility breaks between git tags/versions. Designed for CI: compares the last SemVer tag to current HEAD, reports API breaks, and exits non-zero on failure. Install via Composer or run in Docker.
spatie/laravel-*, laravel/breeze).laravel/framework).User::findOrFail() in v10.0").Adopt if:
v1.2.3).Look elsewhere if:
2023.1.0).*"This tool automates API compatibility checks in our CI pipeline, ensuring minor/patch releases never break downstream users—like Laravel packages or third-party integrations. By failing builds early when BC breaks occur, we:
spatie/laravel-permission, this tool would catch if we removed Permission::findByName() without a deprecation cycle, saving hours of bug triage.
Cost: Zero—it’s a one-line CI addition. ROI: Fewer fire drills, happier users."**"Problem: Manual BC checks are error-prone, slow, and often skipped. Even small changes (e.g., adding a required param to a Laravel package’s method) can break hundreds of apps.
Solution: roave/backward-compatibility-check is a PHP-native, Git-aware tool that:
v1.2.0 → v1.3.0) to detect BC breaks.Illuminate\Support\Facades\*).spatie/laravel-* and laravel/breeze CI pipelines..roave-backward-compatibility-check.xml to ignore intentional BC changes (e.g., deprecated methods).BC Breaks:
User::findOrFail()removed (usefirstOrFail()). Effort: Low (1–2 hours setup). Impact: Zero BC breakouts in minor releases."*
How can I help you explore Laravel packages today?