Install AWS-SDK into Symfony 2












0















I need to use AWS-SDK in my Symfony platform version 2 but getting the error :



Fatal error: Class 'AwsS3S3Client' not found



The steps I followed:




  • composer require aws/aws-sdk-php.


  • Registrer a namespace into the autoload.file:



    'aws-sdk-php'      => __DIR__.'/../vendor/aws'



  • Add to composer.json:



    "autoload": {
    "psr-0": { "": "src/" },
    "classmap": [
    "vendor/aws/aws-sdk-php/src"
    ]
    }



  • Execute composer install.



    In my class code I write:



    use AwsS3S3Client;



And when :



  // Instance an Amazon S3 client.
$p1 = array('version' => 'latest',
'region' => 'us-west-2');
$s3 = new S3Client($p1);


Error appears:



Fatal error: Class 'AwsS3S3Client' not found


Thank you!










share|improve this question


















  • 1





    You should not need to add the autoload information as this is done automatically when you install the package through composer. Have you tried it without that step?

    – dbrumann
    Jan 2 at 9:57











  • Yes I did. What's more, I did that step trying to find solve the same error, because I read it: stackoverflow.com/questions/40763430/… I will get rid these lines off from composer.json.

    – Norman Morell Asensio
    Jan 2 at 10:34













  • Any other suggestion?

    – Norman Morell Asensio
    Jan 2 at 15:56






  • 1





    Did you try $s3Client = (new AwsSdk(....))->createS3();? Check Uploading files to AWS S3 buckets within Symfony application using PHP AWS SDK

    – BentCoder
    Jan 2 at 16:56











  • Still not working. I decided to upgrade Symfony version in order to use packagist.org/packages/aws/aws-sdk-php-symfony. Thank you all!

    – Norman Morell Asensio
    Jan 3 at 9:34
















0















I need to use AWS-SDK in my Symfony platform version 2 but getting the error :



Fatal error: Class 'AwsS3S3Client' not found



The steps I followed:




  • composer require aws/aws-sdk-php.


  • Registrer a namespace into the autoload.file:



    'aws-sdk-php'      => __DIR__.'/../vendor/aws'



  • Add to composer.json:



    "autoload": {
    "psr-0": { "": "src/" },
    "classmap": [
    "vendor/aws/aws-sdk-php/src"
    ]
    }



  • Execute composer install.



    In my class code I write:



    use AwsS3S3Client;



And when :



  // Instance an Amazon S3 client.
$p1 = array('version' => 'latest',
'region' => 'us-west-2');
$s3 = new S3Client($p1);


Error appears:



Fatal error: Class 'AwsS3S3Client' not found


Thank you!










share|improve this question


















  • 1





    You should not need to add the autoload information as this is done automatically when you install the package through composer. Have you tried it without that step?

    – dbrumann
    Jan 2 at 9:57











  • Yes I did. What's more, I did that step trying to find solve the same error, because I read it: stackoverflow.com/questions/40763430/… I will get rid these lines off from composer.json.

    – Norman Morell Asensio
    Jan 2 at 10:34













  • Any other suggestion?

    – Norman Morell Asensio
    Jan 2 at 15:56






  • 1





    Did you try $s3Client = (new AwsSdk(....))->createS3();? Check Uploading files to AWS S3 buckets within Symfony application using PHP AWS SDK

    – BentCoder
    Jan 2 at 16:56











  • Still not working. I decided to upgrade Symfony version in order to use packagist.org/packages/aws/aws-sdk-php-symfony. Thank you all!

    – Norman Morell Asensio
    Jan 3 at 9:34














0












0








0








I need to use AWS-SDK in my Symfony platform version 2 but getting the error :



Fatal error: Class 'AwsS3S3Client' not found



The steps I followed:




  • composer require aws/aws-sdk-php.


  • Registrer a namespace into the autoload.file:



    'aws-sdk-php'      => __DIR__.'/../vendor/aws'



  • Add to composer.json:



    "autoload": {
    "psr-0": { "": "src/" },
    "classmap": [
    "vendor/aws/aws-sdk-php/src"
    ]
    }



  • Execute composer install.



    In my class code I write:



    use AwsS3S3Client;



And when :



  // Instance an Amazon S3 client.
$p1 = array('version' => 'latest',
'region' => 'us-west-2');
$s3 = new S3Client($p1);


Error appears:



Fatal error: Class 'AwsS3S3Client' not found


Thank you!










share|improve this question














I need to use AWS-SDK in my Symfony platform version 2 but getting the error :



Fatal error: Class 'AwsS3S3Client' not found



The steps I followed:




  • composer require aws/aws-sdk-php.


  • Registrer a namespace into the autoload.file:



    'aws-sdk-php'      => __DIR__.'/../vendor/aws'



  • Add to composer.json:



    "autoload": {
    "psr-0": { "": "src/" },
    "classmap": [
    "vendor/aws/aws-sdk-php/src"
    ]
    }



  • Execute composer install.



    In my class code I write:



    use AwsS3S3Client;



And when :



  // Instance an Amazon S3 client.
$p1 = array('version' => 'latest',
'region' => 'us-west-2');
$s3 = new S3Client($p1);


Error appears:



Fatal error: Class 'AwsS3S3Client' not found


Thank you!







symfony aws-sdk






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 2 at 9:52









Norman Morell AsensioNorman Morell Asensio

236




236








  • 1





    You should not need to add the autoload information as this is done automatically when you install the package through composer. Have you tried it without that step?

    – dbrumann
    Jan 2 at 9:57











  • Yes I did. What's more, I did that step trying to find solve the same error, because I read it: stackoverflow.com/questions/40763430/… I will get rid these lines off from composer.json.

    – Norman Morell Asensio
    Jan 2 at 10:34













  • Any other suggestion?

    – Norman Morell Asensio
    Jan 2 at 15:56






  • 1





    Did you try $s3Client = (new AwsSdk(....))->createS3();? Check Uploading files to AWS S3 buckets within Symfony application using PHP AWS SDK

    – BentCoder
    Jan 2 at 16:56











  • Still not working. I decided to upgrade Symfony version in order to use packagist.org/packages/aws/aws-sdk-php-symfony. Thank you all!

    – Norman Morell Asensio
    Jan 3 at 9:34














  • 1





    You should not need to add the autoload information as this is done automatically when you install the package through composer. Have you tried it without that step?

    – dbrumann
    Jan 2 at 9:57











  • Yes I did. What's more, I did that step trying to find solve the same error, because I read it: stackoverflow.com/questions/40763430/… I will get rid these lines off from composer.json.

    – Norman Morell Asensio
    Jan 2 at 10:34













  • Any other suggestion?

    – Norman Morell Asensio
    Jan 2 at 15:56






  • 1





    Did you try $s3Client = (new AwsSdk(....))->createS3();? Check Uploading files to AWS S3 buckets within Symfony application using PHP AWS SDK

    – BentCoder
    Jan 2 at 16:56











  • Still not working. I decided to upgrade Symfony version in order to use packagist.org/packages/aws/aws-sdk-php-symfony. Thank you all!

    – Norman Morell Asensio
    Jan 3 at 9:34








1




1





You should not need to add the autoload information as this is done automatically when you install the package through composer. Have you tried it without that step?

– dbrumann
Jan 2 at 9:57





You should not need to add the autoload information as this is done automatically when you install the package through composer. Have you tried it without that step?

– dbrumann
Jan 2 at 9:57













Yes I did. What's more, I did that step trying to find solve the same error, because I read it: stackoverflow.com/questions/40763430/… I will get rid these lines off from composer.json.

– Norman Morell Asensio
Jan 2 at 10:34







Yes I did. What's more, I did that step trying to find solve the same error, because I read it: stackoverflow.com/questions/40763430/… I will get rid these lines off from composer.json.

– Norman Morell Asensio
Jan 2 at 10:34















Any other suggestion?

– Norman Morell Asensio
Jan 2 at 15:56





Any other suggestion?

– Norman Morell Asensio
Jan 2 at 15:56




1




1





Did you try $s3Client = (new AwsSdk(....))->createS3();? Check Uploading files to AWS S3 buckets within Symfony application using PHP AWS SDK

– BentCoder
Jan 2 at 16:56





Did you try $s3Client = (new AwsSdk(....))->createS3();? Check Uploading files to AWS S3 buckets within Symfony application using PHP AWS SDK

– BentCoder
Jan 2 at 16:56













Still not working. I decided to upgrade Symfony version in order to use packagist.org/packages/aws/aws-sdk-php-symfony. Thank you all!

– Norman Morell Asensio
Jan 3 at 9:34





Still not working. I decided to upgrade Symfony version in order to use packagist.org/packages/aws/aws-sdk-php-symfony. Thank you all!

– Norman Morell Asensio
Jan 3 at 9:34












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54004219%2finstall-aws-sdk-into-symfony-2%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54004219%2finstall-aws-sdk-into-symfony-2%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

MongoDB - Not Authorized To Execute Command

How to fix TextFormField cause rebuild widget in Flutter

in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith