sebastian/git-state
Describe the state of a Git checkout from PHP. Detect origin URL, current branch and commit hash, and whether the working directory is clean; otherwise return the git status output. Useful for build metadata and diagnostics.
App\Exceptions\Handler to inject Git state into error payloads (e.g., Sentry/Telescope).git:status) using Laravel’s Artisan scaffolding.Builder as a singleton for reusable Git state checks across the application.Deploying).feature-flags/v1.2.0) via Laravel’s configuration system.Cache::remember()).false for non-Git repos or missing origins, requiring custom exception handling (e.g., GitRepositoryException). Laravel applications must implement robust error recovery.build() call spawns a Git process, which could introduce latency in high-frequency scenarios (e.g., API rate-limiting by commit hash). Mitigation: Cache results using Laravel’s cache system.false returns (e.g., missing .git) be handled? Custom exceptions or graceful degradation?symfony/process) be implemented for critical paths?Builder as a singleton for dependency injection.php artisan git:status) using Laravel’s scaffolding.App\Exceptions\Handler to include Git state in error payloads.spatie/laravel-feature-flags for Git-aware toggles.App\Exceptions\Handler.git:status Artisan command for local debugging..git, detached HEAD, submodules) in staging.Log facade to include Git metadata.Cache::remember()).symfony/process).origin configured (local dev, CI, Docker).composer validate.DIRECTORY_SEPARATOR).git:status Artisan command for local DX.false returns require manual exception handling (e.g., GitRepositoryException).Cache::remember()).Builder::build()) is straightforward. Complex integrations (e.g., feature flags) require Laravel expertise.How can I help you explore Laravel packages today?