1up-lab / OneupFlysystemBundle

A Flysystem integration for your Symfony projects.
MIT License
630 stars 118 forks source link

Google Storage Bucket - Symfony 5 #226

Closed On5-Repos closed 3 years ago

On5-Repos commented 3 years ago

Bug Report

Following documentation to integrate with Google Storage Bucket, everything is ok but i am unable to register filesystem Please see below.

acme.google_storage_client: class: Google\Cloud\Storage\StorageClient arguments:

image

Error: Invalid service "acme.google_storage_bucket": function "acme.google_storage_client:bucket" does not exist.

bytehead commented 3 years ago

This seems to be a documentation issue. Let me check.

On5-Repos commented 3 years ago

thanks, 👍

bytehead commented 3 years ago

try this:

services:
    acme.google_storage_client:
        class: Google\Cloud\Storage\StorageClient
        arguments:
            - projectId: "your-project-id"
              keyFilePath: '/path/to/service-account.json' # optional

    acme.google_storage_bucket:
        class: Google\Cloud\Storage\Bucket
        factory: ['@acme.google_storage_client', 'bucket']
        arguments:
            - 'your-bucket-name'

Does this work in your case?

On5-Repos commented 3 years ago

yes, auto wiring is working now. cheers

bytehead commented 3 years ago

I've updated the documentation 👍