Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Storage Bucket - Symfony 5 #226

Closed
On5-Repos opened this issue Jan 15, 2021 · 5 comments
Closed

Google Storage Bucket - Symfony 5 #226

On5-Repos opened this issue Jan 15, 2021 · 5 comments

Comments

@On5-Repos
Copy link

On5-Repos commented Jan 15, 2021

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:
- projectId: "xxxxxxxx"
keyFilePath: '../xxxxxx.json' # optional

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

image

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

@bytehead
Copy link
Member

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

@On5-Repos
Copy link
Author

thanks, 👍

@bytehead
Copy link
Member

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
Copy link
Author

yes, auto wiring is working now. cheers

@bytehead
Copy link
Member

I've updated the documentation 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants