Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Cloud Storage - Implement method to check existence of multiple objects in a single operation

Open
#2,337 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
30/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
google-cloud, php
Domain
cloud

Research direction

The requested entry point is the Bucket class; first inspect its existing object-existence methods and check whether the underlying Cloud Storage API supports a batch operation. Done means providing a documented way to check multiple object names with one backend request, rather than issuing one request per object.

Written by the indexing model from the issue text.

Description

api: storage type: feature request

Hello

We are using the PHP cloud storage library, and we are facing a performance issue to check existence of multiple objects in a storage bucket.
Currently, the only way to implement such check is by using a loop such as:

$names=["file1","file2",...,"fileN"];
foreach ($names as $name) 
    {
    $object=$bucket->object($name);
    if (!$object->exists()) {...};
    }

This triggers a REST api call for each of the objects, which is slow. We usually have around 10 object names per loop, so this takes around 0.4s.
As we do this a lot of times, we have a performance issue.

It would be great to have a method in the Bucket class to check multiple object names at once, with a single request to the cloud storage back-end APIs (not sure such method exists in the back-end API).

Thanks !

Dominant language
PHP
Stars
1.2k
Forks
464
Avg merge
2d 2h
Merged PRs (30d)
103

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from googleapis/google-cloud-php

All issues in googleapis/google-cloud-php

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.