1up-lab / OneupFlysystemBundle

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

Rackspace configuration #151

Closed amirmab closed 7 years ago

amirmab commented 7 years ago

I am trying to configure for rackspace and getting this:

Type error: Argument 1 passed to League\Flysystem\Rackspace\RackspaceAdapter::__construct() must be an instance of OpenCloud\ObjectStore\Resource\Container, instance of OpenCloud\Rackspace given, called in /app/var/cache/dev/appDevDebugProjectContainer.php on line 3545

My trace is :

at RackspaceAdapter ->__construct (object(Rackspace), null, '') 
in var/cache/dev/appDevDebugProjectContainer.php at line 3545   + 
at appDevDebugProjectContainer ->getOneupFlysystem_RackFilesystemService () 
in vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php at line 274   + 
at Container ->get ('oneup_flysystem.rack_filesystem') 
in src/AppBundle/Controller/DefaultController.php at line 35   + 
at DefaultController ->indexAction (object(Request)) 
at call_user_func_array (array(object(DefaultController), 'indexAction'), array(object(Request))) 
in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php at line 153   + 

base on this : 'https://github.com/1up-lab/OneupFlysystemBundle/blob/master/Resources/doc/adapter_rackspace.md' and this is my config :

oneup_flysystem:
    adapters:
        local_adapter:
            local:
                directory: %kernel.root_dir%/cache
        rack_adapter:
            rackspace:
                container: acme.rackspace_client
    filesystems:
        local:
            adapter: local_adapter
        rack:
            adapter: rack_adapter

and my service :

acme.rackspace_client:
    class: OpenCloud\Rackspace
    arguments:
        - "https://identity.api.rackspacecloud.com/v2.0/"
        - username: "xxxx"
          password: "yyyy"
bytehead commented 7 years ago

What was the problem?