2

What do I add in my Composer.json file so it downloads version 2.3.5 of the Zend Framework? I've tried reading the Zend docs but it doesn't mention Composer.

{
  "require" : {
    "silex/silex": "~1.1",
    "monolog/monolog": "~1.7",
    "aws/aws-sdk-php": "~2.6",
    "zendframework/zendservice-amazon": "2.3.5"
  },
  "require-dev": {
    "heroku/heroku-buildpack-php": "*"
  },
  "repositories": [
    {
        "type": "composer",
        "url": "https://packages.zendframework.com/"
    }
  ]
}

After I run composer update, it gives me this error message:

C:\Users\Ricky\graffiti-galore>composer update 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 - The requested package zendframework/zendservice-amazon could not be found in any version, there may be a typo in the package name.

Potential causes: - A typo in the package name - The package is not available in a stable-enough version according to your minimum-stability setting see https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion for more details.

Read http://getcomposer.org/doc/articles/troubleshooting.md for further common problems.

3 Answers 3

1

In your require statement, it looks like you're using the wrong include for Zend. In your require statement:

"zendframework/zendservice-amazon": "2.3.5"

should be

"zendframework/zend-config": "2.3.5",
"zendframework/zend-http": "2.3.5"

Or if you want to avoid requiring a specific version number,

"zendframework/zend-config": "2.*",
"zendframework/zend-http": "2.*"

and for the part in minimum stability

"minimum-stability": "dev"
Sign up to request clarification or add additional context in comments.

4 Comments

I found this page here which shows how to do what i want, framework.zend.com/downloads/composer But it doesn't work.
What do you have listed for your minimum-stability? (located near the bottom of your composer.json file)
I did not have a minimum-stability so i created one and everything is working fine now. Oh ya, i had to lower the version. I'm using this and it works { "require" : { "silex/silex": "~1.1", "monolog/monolog": "~1.7", "aws/aws-sdk-php": "~2.6", "zendframework/zend-config": "2.*", "zendframework/zend-http": "2.*", "zendframework/zendservice-amazon": "2.*" }, "require-dev": { "heroku/heroku-buildpack-php": "*" }, "repositories": [ { "type": "composer", "url": "packages.zendframework.com" } ], "minimum-stability": "dev" }
Good to hear. I have had those minimum stabilities cause issues before as well. Especially when I'm just experimenting with a few new modules and don't want to change the minimum stability for my whole project.
0

zendservice-amazon is not part of Zend Framework 2, none of the ZendService libs are. Its latest version is 2.0.3, all versions are listed here: https://packagist.org/packages/zendframework/zendservice-amazon

Comments

0

There is no version 2.3.5 for zendframework/zendservice-amazon, so obviously the install fails. Look at https://packagist.org/packages/zendframework/zendservice-amazon to see the available versions and fix the version selector (I'd suggest ~2.0).

You also don't need the repositories part in your composer.json, all the packages are also on Packagist, Composer's main and default package repository.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.