Skip to content
← Back to activity

Public problem

fake-gcs-server omits the generation field, breaking the official PHP storage client

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

Uploading a file to fake-gcs-server with the official Google PHP storage client broke because the upload response omitted the generation field entirely. The PHP client's Bucket.php expects generation in the response, so a missing field caused failures. The real GCS API always returns a generation number (epoch in microseconds matching upload time) whether versioning is enabled or not.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

The filesystem backend did not serialize a generation field when none was set. The maintainer fixed it in PR #812 so the fake server always returns a generation number (based on the current time), matching the real GCS API, and the reporter confirmed uploads now work with the PHP client. Upgrade fake-gcs-server to a build containing the #812 fix and update the Docker image.

Source: https://github.com/fsouza/fake-gcs-server/issues/701