Closed leonildojunior closed 1 year ago
You are showing 2 different issues here, one is Unresolvable dependency
and other one is Target class does not exist.
.
Hi @leonildojunior, thanks for opening this issue. I am not able to reproduce the reported behavior, and some details are missing to understand better your implementation. For example, I do not know what the following code means:
use App\Services\Xpi\Client;
$clientXP = $clientXP->getClient('xxxxxx');
For what I see, you are trying to call a method from the same variable that you just declared.
So, could you please let me know if this is a persistent issue for you, if so, could you please provide more clear and specific details about how to reproduce the issue?
For my reproduction I followed the next steps:
console composer create-project laravel/laravel MY-PROJECT-NAME
Then, I created a test controller with a method where I wrote the following code:
$clientAWS = new SecretsManagerClient([
'profile' => 'default',
'version' => 'latest',
'region' => 'us-east-2',
]);
$tokenDevelopment = $clientAWS->getSecretValue([
'SecretId' => 'SECRET-ID',
]);
return response()->json($tokenDevelopment->get('@metadata'));
{
"statusCode": 200,
"effectiveUri": "SERVICE",
"headers": {
"x-amz-id-2": "ID",
"x-amz-request-id": "REQ-ID",
"date": "Mon, 03 Oct 2022 13:25:55 GMT",
"content-type": "application/xml",
"transfer-encoding": "chunked",
"server": "AMAZON-SERVICE"
},
"transferStats": {
"http": [
[]
]
}
}
Thanks!
This issue has not recieved a response in 1 week. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled.
Lol kek cheburek
Confirm by changing [ ] to [x] below to ensure that it's a bug:
Describe the bug After performing the settings indicated in the documentation, I tried to use it in a service, according to the code below, and I got the error:
Unresolvable dependency resolving [Parameter #0 [ <required> array $args ]] in class Aws\AwsClient
my code
And on the controller
Version of AWS SDK for PHP?
Version of AWS Service Provider for Laravel?
Version of Laravel (
php artisan --version
)? 3.185.2Version of PHP (
php -v
)? 7.3.22Screenshots