Comments (6)
Is MyApp\PromoBundle\EndpointProvider
autoloadable by composer?
from aws-sdk-php-symfony.
I think so
composer.json
`"autoload": {
"psr-4": {
"MyApp\PromoBundle": "src/MyApp/PromoBundle/",
"MyApp\UserBundle": "src/MyApp/UserBundle/",
"MyApp\PromoBundle\EndpointProvider":"src/MyApp/PromoBundle/EndpointProvider/",
"AppBundle": "src/AppBundle/"},
"files": [ "app/AppKernel.php" ]
},
`
from aws-sdk-php-symfony.
Do you get the same error if you run a script like the following in your project root?
<?php
require 'vendor/autoload';
var_dump(MyApp\PromoBundle\EndpointProvider::getEndPoint(['region' => 'us-east-1']));
from aws-sdk-php-symfony.
First, I change "app\config\services.yml" with a value for the key "endpoint". If not, I cannot run the application.
aws_s3.client:
class: Aws\S3\S3Client
factory_class: Aws\S3\S3Client
factory_method: 'factory'
arguments:
options:
region: '%aws.region%'
version: '%aws.version%'
base_url: '%aws.base_url%'
endpoint: '%aws.base_url%'
endpoint_provider: MyApp\PromoBundle\EndpointProvider::getEndPoint
credentials:
key: %aws.key%
secret: %aws.secret%
Then, I could run the application and request test.1.php
<?php
require '../vendor/autoload.php';
var_dump(MyApp\PromoBundle\EndpointProvider::getEndPoint(['region' => 'us-east-1']));
Dump:
C:\_proyectos\TestAws\public\test.1.php:5:
array (size=1)
'endpoint' => string 'us-east-1.example.com' (length=21)
Thank you
from aws-sdk-php-symfony.
I was able to reproduce this on OS X with PHP 5.6.17, where supplying '\Fully\Namespaced\Class::staticMethod'
produced a fatal error, whereas ['\Fully\Namespaced\Class', 'staticMethod']
did not. php.net states that both forms should work, but that does not seem to be the case on all systems.
The SDK invokes the endpoint provider by assigning it to a variable ($provider
) and calling $result = $provider($args);
, so I don't believe this is an issue with the SDK.
from aws-sdk-php-symfony.
Arg! ok , now all works correctly .
thanks all
from aws-sdk-php-symfony.
Related Issues (20)
- SQS Bulks issue HOT 1
- Symfony 7 support HOT 5
- aws-sdk-php in composer.json is very out of date HOT 1
- [RFC] EnvVarProcessor using AWS Secrets Manager HOT 7
- Handle merging of multiple configuration files HOT 2
- Word Press | Missing required client configuration options : AWS PHP SDK 3.X HOT 1
- Support for upcomming Symfony 5 HOT 3
- Non-negligible memory usage when not even using the client HOT 2
- Cache client credentials HOT 3
- Issue with console lint:container HOT 1
- configure guzzle logger HOT 1
- AWS Cognito implementation
- Cannot read credentials from /Users/<myUser>/.aws/credentials HOT 1
- Warnings creating ConfigBuilder HOT 12
- Symfony 6.0 support HOT 5
- SDK not retrieving the instance role HOT 2
- Add Symfony 6 compability HOT 11
- Add support Symfony ^6.0 HOT 2
- As initial service config is in YAML format `symfony/yaml` should be required package
- how do you use IAM roles HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-sdk-php-symfony.