Skip to content

Cannot generate lazy proxy for service "aws.s3" #111

@orlandothoeny

Description

@orlandothoeny

Describe the bug

When running any Symfony command, the following error happens:

In LazyServiceDumper.php line 138:
                                                    
  Cannot generate lazy proxy for service "aws.s3".  
                                                    

In ProxyHelper.php line 268:
                                                                                          
  Cannot generate lazy proxy: method "Aws\S3\S3Client::getSignatureProvider()" is final.  
                                                                                          

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

aws.s3 Symfony service is loaded without any errors.

Current Behavior

When running any Symfony command, the following error happens:

In LazyServiceDumper.php line 138:
                                                    
  Cannot generate lazy proxy for service "aws.s3".  
                                                    

In ProxyHelper.php line 268:
                                                                                          
  Cannot generate lazy proxy: method "Aws\S3\S3Client::getSignatureProvider()" is final.  

Reproduction Steps

Install the following versions inside a Symfony 6.4 project with PHP 8.4:

  • aws/aws-sdk-php (3.356.9)
  • aws/aws-sdk-php-symfony (2.8.0)

Inject the @aws.s3 service as argument to any Symfony service.

Run bin/console debug:container

Possible Solution

Make Aws\S3\S3Client::getSignatureProvider() (Code) non-final

Additional Information/Context

No response

SDK version used

3.356.9

Environment details (OS name and version, etc.)

Ubuntu 24.04, PHP 8.4, Symfony 6.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.needs-triageThis issue or PR still needs to be triaged.potential-regressionMarking this issue as a potential regression to be checked by team member

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions