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

add deprecation note. #1559

Merged
merged 2 commits into from
Feb 26, 2024
Merged

add deprecation note. #1559

merged 2 commits into from
Feb 26, 2024

Conversation

tacman
Copy link
Contributor

@tacman tacman commented Jan 6, 2024

Having both amazon-s3 and aws-s3 is confusing.

@coveralls
Copy link

coveralls commented Jan 6, 2024

Coverage Status

coverage: 82.018% (+0.02%) from 81.998%
when pulling aad39cd on tacman:patch-2
into 1d42ed1 on liip:2.x.

@dbu
Copy link
Member

dbu commented Jan 6, 2024

do we need an S3 resolver at all in version 3? or could we do all with flysystem? or can flysystem not provide the web URL to a file on S3?

@tacman
Copy link
Contributor Author

tacman commented Jan 6, 2024

Hmm, interesting question. Regardless, we need more documentation and examples.

This is what I use for s3 on production and local filesystem in dev.

# config/packages/flysystem.yaml
# Read the documentation at https://github.com/thephpleague/flysystem-bundle/blob/master/docs/1-getting-started.md
flysystem:
    storages:
        default.storage:
            adapter: 'aws'
            # visibility: public # Make the uploaded file publicly accessible in S3
            options:
                client: 'Aws\S3\S3Client' # The service ID of the Aws\S3\S3Client instance
                bucket: '%env(AWS_S3_BUCKET_NAME)%'
                streamReads: true
                prefix: '%env(S3_STORAGE_PREFIX)%'
when@dev:
    flysystem:
        storages:
            default.storage:
                adapter: 'local'
                options:
                    directory: '%kernel.project_dir%/public/images'

And

# config/packages/liip_imagine.yamn
liip_imagine:
    driver: "gd"
    twig:
        mode: lazy

    loaders:
        flysystem_loader:
            flysystem:
                # this comes from flysystem.yaml
                filesystem_service: default.storage

    # default loader to use for all filter sets
    data_loader: flysystem_loader

@dbu
Copy link
Member

dbu commented Jan 12, 2024

looks like modern versions of flysystem actually support that: https://flysystem.thephpleague.com/docs/usage/public-urls/

i think the way to go for 3.x is to leverage flysystem as much as we can to avoid this bundle having to care about storage and filesystem and such stuff.

@dbu dbu merged commit 6314e7d into liip:2.x Feb 26, 2024
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants