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

Argument 2 passed to LocalFilesystemAdapter::__construct() is a string, not an object #243

Closed
ksaveras opened this issue Jul 13, 2021 · 1 comment · Fixed by #247
Closed
Assignees
Labels

Comments

@ksaveras
Copy link

Bug Report

Q A
BC Break yes
Version 4.0.7

Summary

Argument 2 passed to League\Flysystem\Local\LocalFilesystemAdapter::__construct() must implement interface League\Flysystem\UnixVisibility\VisibilityConverter or be null, string given.

How to reproduce

Use the following configuration

# Read the documentation: https://github.com/1up-lab/OneupFlysystemBundle
oneup_flysystem:
    adapters:
        cdn_images:
            local:
                location: '%kernel.project_dir%/public/media'
                visibilityConverter: '@filesystem.local.visibility_converter'

    filesystems:
        images:
            adapter: cdn_images
            visibility: public

services:
    filesystem.local.visibility_converter:
        class: League\Flysystem\UnixVisibility\PortableVisibilityConverter
        arguments:
            - 0644
            - 0644
            - 0755
            - 0755
            - 'visible'

It does not check if visibilityConverter is a service. It always passes a string value to the constructor. Useless option.
Same if service is provided with @ or without @.

@bytehead
Copy link
Member

Can you check 4.1.1 if it fixes your problem? I've also updated the doc: https://github.com/1up-lab/OneupFlysystemBundle/blob/4.1.1/doc/adapter_local.md

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

Successfully merging a pull request may close this issue.

2 participants