10
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

composerでZend Framework 2のコンポーネントを個別に利用する

Last updated at Posted at 2012-07-28

Zend Framework 2 の最新版では
1の頃から要望の多かったMVC以外のライブラリ(ZendServiceAmazonなど)について個別にソースが利用できるようになっています。
https://github.com/zendframework/repositories

これらのコンポーネントをcomposerで利用するには、
composer.jsonにhttp://packages.zendframework.com/ のリポジトリを記載する必要があります。

以下はzendservice-recaptchaを使う場合です。

composer.json
{
    "repositories": [
        {
            "type": "composer",
            "url": "http://packages.zendframework.com/"
        }
    ],
    "require": {
        "php": ">=5.3.3",
        "zendframework/zend-stdlib": ">=2.0.0beta5",
        "zendframework/zend-version": ">=2.0.0beta5",
        "zendframework/zend-loader": ">=2.0.0beta5",
        "zendframework/zend-validator": ">=2.0.0beta5",
        "zendframework/zend-uri": ">=2.0.0beta5",
        "zendframework/zend-http": ">=2.0.0beta5",
        "zendframework/zendservice-recaptcha": ">=2.0.0beta5"
    }
}

なお、これまでZend_Service(Zend\Service)だった名前空間だったものはZendServiceに変更されていますので注意してください。

10
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?