google/cloud-core
google/cloud-core provides shared infrastructure for Google Cloud PHP client libraries, including authentication, transport, and request handling. It is installed automatically as a dependency and is not intended for direct use. This GA component offers stable APIs for the rest of the Google Cloud P...
RetryOptions + transport abstraction now yields safe retries for write operations (object create/update/delete/compose), which previously required Laravel-side deduplication. This makes the package a stronger fit for queue-driven write paths.GOOGLE_APPLICATION_CREDENTIALS in .env).RetryOptions) can replace custom retry logic in Laravel jobs/queues, improving resilience for GCP API calls.WithoutOverlapping, DB-backed idempotency keys, Cache::lock).OptionsValidator trait enforces Google API constraints early, reducing runtime errors in Laravel’s request pipelines (e.g., validation middleware for GCP API inputs).Trace or Logging) may require updates to dependent Laravel packages (e.g., google/cloud-storage).DEBUG.md guide). Token values should be surfaced in logs to correlate retried operations..env credentials (e.g., GOOGLE_APPLICATION_CREDENTIALS) be managed alongside ADC? Will a facade or service provider abstract this?Illuminate\Queue) defer to Google’s retry logic and reduce $tries/backoff on GCS-touching jobs, or keep both layers?App\Exceptions\Handler) translate Google Cloud errors (e.g., Google\ApiCore\ApiException) into user-friendly messages?Trace) to avoid breaking Laravel integrations? Current pin should move v1.72.1 → v1.74.0.google/cloud-core's ADC support, reducing boilerplate in Laravel’s AuthServiceProvider.Illuminate\Support\Facades\Http) via the package’s transport layer, enabling consistent retry/timeout policies.ShouldQueue jobs calling GCP APIs). With v1.74.0, retryable write jobs no longer need WithoutOverlapping or manual dedupe middleware for the GCS-duplicate case.Monolog to include Google Cloud’s structured logging (e.g., trace IDs, resource labels, idempotency token values).google/cloud-storage, google/cloud-bigquery, etc., to inherit shared auth, retries, and validation while keeping service-specific logic modular. The idempotency gain is realized through google/cloud-storage on top of this core release.WithoutOverlapping) as candidates for removal.google/cloud-core's ADC (e.g., via a GcpAuthService facade).RetryOptions in Laravel jobs/queues.google/cloud-storage) for new features.google/cloud-storage/google/cloud-core to pull v1.74.0, then remove redundant dedupe middleware on GCS write jobs after a validation window.keyFile/keyFilePath options as a temporary bridge during migration.DetectProjectIdTrait) to auto-detect project IDs, reducing Laravel config complexity.google/cloud-core as a dev dependency initially, then promote to require after validation.composer require google/cloud-core --dev
composer require google/cloud-storage # Example service package
^1.74 to guarantee idempotency-token support across the Storage surface..env includes:
GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json
GOOGLE_CLOUD_PROJECT=your-project-id
RetryOptions into Laravel’s queue workers.Google\ApiCore\ApiException.google/cloud-* packages (e.g., Storage, BigQuery).google/cloud-core/google/cloud-storage to ^1.74 in a staging environment.{
"scripts": {
"update:gcp": "composer update google/cloud-* --with-dependencies"
}
}
.env + ADC to simplify service account key rotation (no code changes needed).DEBUG.md guide).GRPC_TRACE, HTTP_TRACE).telescope or laravel-debugbar can be extended to display GCP-specific metrics.412/409, or token rejection), capture request headers before escalating upstream.parallel helper or pest concurrency testing. Safe parallel writes to the same object are now more predictable, though application-level ordering guarantees remain the team’s responsibility.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| ADC credential expiration | API calls fail with auth errors | Use ADC with workload identity / auto-rotated service accounts; alert on 401/403 rate |
| Duplicate object writes on retry (improved in v1.74.0) | Orphaned objects, storage cost, downstream duplication | Rely on built-in idempotency tokens; retire custom dedupe middleware after validation |
| Idempotency token not honored on a given operation | Silent duplicate write on retry | Verify per-operation behavior in staging with fault injection; keep dedupe for unverified paths |
| Emulator/local env diverges from token behavior | Tests pass locally, duplicates in prod | Run at least one fault-injected GCS integration test against real GCS in CI |
| Major version bump (v1 → v2 promotions) | Breaking changes in dependent Laravel packages | Pin to ^1.74, review upstream changelogs, gate upgrades behind staging runs |
| Retry storm after transient GCS outage | Queue backlog, elevated latency | Cap RetryOptions attempts; tune queue backoff/maxExceptions; monitor queue depth |
| Debug log volume from structured logging | Log storage cost, noisy traces | Sample debug logs; log tokens only at info for failed/retried operations |
How can I help you explore Laravel packages today?