Failed installation of salesforce-mc/fuel-sdk-php via composer

General Tech Bugs & Fixes 2 years ago

0 2 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (2)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

 

I'm new to SDK-PHP and stuck on installing it via composer. I am currently using WAMP server 3.1.0 for Windows 10 which has 3 versions of PHP included. As documentation said version 5.6.24 is required for SDK-PHP. So I tried available 5.6.31 and got this from composer

composer require salesforce-mc/fuel-sdk-php
Using version ^1.1 for salesforce-mc/fuel-sdk-php
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - doctrine/annotations v1.6.0 requires php ^7.1 -> your PHP version (5.6.31) does not satisfy that requirement.
    - doctrine/annotations v1.6.0 requires php ^7.1 -> your PHP version (5.6.31) does not satisfy that requirement.
    - doctrine/annotations v1.6.0 requires php ^7.1 -> your PHP version (5.6.31) does not satisfy that requirement.
    - Installation request for doctrine/annotations (locked at v1.6.0) -> satisfiable by doctrine/annotations[v1.6.0]. 
Installation failed, reverting ./composer.json to its original content.

Then I changed PHP version to available 7.1.9 but that was not successful as well

composer  require salesforce-mc/fuel-sdk-php

 Using version ^1.1 for salesforce-mc/fuel-sdk-php
 ./composer.json has been updated
 Loading composer repositories with package information
 Updating dependencies (including require-dev)
 Your requirements could not be resolved to an installable set of packages.

   Problem 1
     - Installation request for salesforce-mc/fuel-sdk-php dev-master -> satisfiable by salesforce-mc/fuel-sdk-php[dev-master].
     - Can only install one of: salesforce-mc/fuel-sdk-php[v1.1.0, dev-master].
     - Installation request for salesforce-mc/fuel-sdk-php ^1.1 -> satisfiable by salesforce-mc/fuel-sdk-php[v1.1.0].
 Installation failed, reverting ./composer.json to its original content.

Would anyone be able to help resolving this issue?

profilepic.png
manpreet 2 years ago

Not sure whether I understand situation correctly. So if you mention ours as a require in composer.json like below:

{ "require": { "salesforce-mc/fuel-sdk-php": "1.1.0" } }

Then all you need to do is run this:

$ composer update

So if you download our source code from github, then we dont need to add this in the require section:

"salesforce-mc/fuel-sdk-php": "1.1.0" which is only necessary when you dont download the source code and want to get it from composer where we already released as a package.

So just to be clear, if you download our source code from github, all you should need to do is this:

$ composer update --no-dev

which will download all the dependencies mentioned in our composer.json file and ignore the require-dev section.


0 views   0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.