Skip to content

Failed to instantiate component or class "diecoding\aws\s3\HandlerResolverInterface" #1

@chunlaw

Description

@chunlaw

I have encountered the below error.

image

After browsing the code, it is resolved by updating the config.php as below,

's3' => [
    'class' => \diecoding\aws\s3\Service::class,
    'endpoint' => getenv('S3_ENDPOINT'),
    'usePathStyleEndpoint' => true,
    'credentials' => [ 
        'key' => getenv('S3_ACCESS_KEY'),
        'secret' => getenv('S3_ACCESS_SECRET'),
    ],
    'region' => getenv('S3_REGION'),
    'defaultBucket' => getenv('S3_BUCKET'),
    'defaultAcl' => 'private',
    'resolver' => \diecoding\aws\s3\HandlerResolver::class, // key of solution
],

Would you update the README? Or, update src/Service.php#260 to point the default component to the Resolver instead of the interface?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions