PHPackages                             techdyn/google-storage-meta-bucket - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. techdyn/google-storage-meta-bucket

ActiveLibrary[File &amp; Storage](/categories/file-storage)

techdyn/google-storage-meta-bucket
==================================

A simple GCP storage bucket wrapper to automatically set metadata (cache-control, etc) on uploaded files.

v1.1(5y ago)01.5kMITPHPPHP ^7.2

Since Jun 25Pushed 5y ago1 watchersCompare

[ Source](https://github.com/techdyn/google-storage-meta-bucket)[ Packagist](https://packagist.org/packages/techdyn/google-storage-meta-bucket)[ RSS](/packages/techdyn-google-storage-meta-bucket/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Google Cloud Storage Meta Bucket for PHP
========================================

[](#google-cloud-storage-meta-bucket-for-php)

A simple GCP storage bucket wrapper to automatically set metadata on uploaded files.

Metadata reference:

Created for use with other libraries that may not allow you to configure the metadata (eg Cache-Control) for storage bucket objects.

Works with:

-
-  (using Flysystem)
-  (using Flysystem)

### Installation

[](#installation)

Requires:

To begin, install the preferred dependency manager for PHP, [Composer](https://getcomposer.org/).

Install the wrapper:

```
$ composer require techdyn/google-storage-meta-bucket
```

### Sample

[](#sample)

```
require 'vendor/autoload.php';

use TechDyn\GoogleStorageMetaBucket\Storage\ProxyStorageClient;

$storage = new ProxyStorageClient(); // ProxyStorageClient extends Google\Cloud\Storage\StorageClient;

$bucket = $storage->bucket('my_bucket'); // MetaBucket extends Google\Cloud\Storage\Bucket

// https://cloud.google.com/storage/docs/metadata
$bucket->setOption('cacheControl', 'no-cache, max-age=60'); // $name uses metadata field written as camelCase

// Upload a file to the bucket.
$bucket->upload(
    fopen('/data/file.txt', 'r')
);
```

### Symfony &amp; Flysystem

[](#symfony--flysystem)

```
# services.yaml

parameters:

    gcp_client_options:
        projectId: 'gcp-project-id'
        keyFilePath: '%kernel.project_dir%/config/gcp/service.json' # Optional - if not configured externally

    gcp_storage_bucket: 'name-of-bucket'

services:

  google_cloud_storage.client:
    class: TechDyn\GoogleStorageMetaBucket\Storage\ProxyStorageClient
    arguments: ['%gcp_client_options%']

  google_cloud_storage.bucket:
    class: TechDyn\GoogleStorageMetaBucket\Storage\MetaBucket
    factory: ['@google_cloud_storage.client', bucket]
    arguments: ['%gcp_storage_bucket%']
    calls:
      - method: setOption
        arguments:
          - 'cacheControl'
          - 'no-cache, max-age=60'
```

##### Flysystem

[](#flysystem)

Using:

```
# packages/oneup_flysystem.yaml

# Read the documentation: https://github.com/1up-lab/OneupFlysystemBundle/tree/master/Resources/doc/index.md
oneup_flysystem:
    adapters:
        gcp_storage_adapter:
            googlecloudstorage:
                client: google_cloud_storage.client
                bucket: google_cloud_storage.bucket
                prefix: ~

    filesystems:
        gcp_storage_fs:
            adapter: gcp_storage_adapter
            mount:   gcp_storage_fs
```

##### Vich Uploader

[](#vich-uploader)

Using:

```
# packages/vich_uploader.yaml

vich_uploader:
    db_driver: orm
    storage: flysystem
    mappings:
        uploaded_images:
            uri_prefix:         'https://%gcp_storage_bucket%.storage.googleapis.com' # https://name-of-bucket.storage.googleapis.com or your custom domain
            upload_destination: gcp_storage_fs
            namer:              vich_uploader.namer_uniqid
            inject_on_load:     false
            delete_on_update:   true
            delete_on_remove:   true
```

##### Liip Imagine

[](#liip-imagine)

Using:

```
# packages/liip_imagine.yaml

# See dos how to configure the bundle: https://symfony.com/doc/current/bundles/LiipImagineBundle/basic-usage.html
liip_imagine:
  driver: "gd" # valid drivers options include "gd" or "gmagick" or "imagick"

  loaders:
    gcp_loader:
      flysystem:
        filesystem_service: oneup_flysystem.gcp_storage_fs_filesystem

  data_loader: gcp_loader
  resolvers:
    gcp_cache:
      flysystem:
        root_url: 'https://%gcp_storage_bucket%.storage.googleapis.com'
        filesystem_service: oneup_flysystem.gcp_storage_fs_filesystem

  filter_sets:
    thumb_default:
      data_loader: gcp_loader
      cache: gcp_cache
      quality: 75
      filters:
        downscale: { max: [64, 64], mode: outbound }
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

2154d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b8f09e6fd0a5df529539989195483c7208f77887f3c4aaca835b9c623341b720?d=identicon)[st0nebridge](/maintainers/st0nebridge)

---

Top Contributors

[![st0nebridge](https://avatars.githubusercontent.com/u/23309360?v=4)](https://github.com/st0nebridge "st0nebridge (2 commits)")

---

Tags

cloudflysystemgcpgcp-storagegcp-storage-bucketgoogleliipimaginebundlephpsymfonyvichuploaderbundle

### Embed Badge

![Health badge](/badges/techdyn-google-storage-meta-bucket/health.svg)

```
[![Health](https://phpackages.com/badges/techdyn-google-storage-meta-bucket/health.svg)](https://phpackages.com/packages/techdyn-google-storage-meta-bucket)
```

###  Alternatives

[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[league/flysystem-google-cloud-storage

Google Cloud Storage adapter for Flysystem.

2316.7M45](/packages/league-flysystem-google-cloud-storage)[spatie/flysystem-google-cloud-storage

Flysystem adapter for Google Cloud Storage

25549.6k](/packages/spatie-flysystem-google-cloud-storage)[servd/craft-remote-assets

Move CP assets to an external filesystem such as S3

1215.8k](/packages/servd-craft-remote-assets)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
