AWS SDK for PHPをインストールするならComposerでしょ!
Upcoming SlideShare
Loading in...5
×
 

AWS SDK for PHPをインストールするならComposerでしょ!

on

  • 4,714 views

 

Statistics

Views

Total Views
4,714
Views on SlideShare
2,899
Embed Views
1,815

Actions

Likes
6
Downloads
2
Comments
0

10 Embeds 1,815

http://slywalker.hateblo.jp 1306
http://maezono.info 362
http://maechanblog.com 95
http://mikaduki.info 31
http://s.deeeki.com 5
http://cloud.feedly.com 4
http://www.feedspot.com 4
http://webcache.googleusercontent.com 3
http://translate.googleusercontent.com 3
http://feedly.com 2
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

AWS SDK for PHPをインストールするならComposerでしょ! AWS SDK for PHPをインストールするならComposerでしょ! Presentation Transcript

  • Composer @slywalker(YasuoHarada) のインストールなら AWSSDKforPHP でしょ!
  • aboutme
  • 大阪で AWS+PHP(CakePHP) +MySQLを主に使って開発を 行っています。
  • @slywalker
  • @slywalkerfollowme!
  • github.com/slywalker
  • github.com/slywalker forkme!
  • PHPエンジニア 養成読本
  • PHPエンジニア 養成読本 buynow!
  • Composerを使ったほうがいいのか? なぜ?
  • AWS SDK for PHP 2 を使用して、AWS の使用を迅 速に開始します。 この SDK は、Amazon S3、Amazon Glacier、 DynamoDB、CloudFront など、多くの AWS サービ ス向けの Ruby クラスを提供するため、コーディン グの複雑さが軽減されます。 ダウンロード可能な 1 つのパッケージに、AWS PHP ライブラリとドキュメントが含まれます。 AWSSDKforPHPhttp://aws.amazon.com/jp/sdkforphp/ より引用(原文まま) 2013年9月27日現在
  • インストール方法は いくつかある AWSSDKforPHP
  • ZiporPhar Pear Composer& Packagist
  • ZiporPhar バージョン管理は目視、手動 バグフィックスなど追いかける手間 呼び出しは、ファイルをrequire
  • ZiporPhar 救い?CUIでの操作が不要 どこでも好きなところに設置OK だがそれが不幸の原因に!?
  • ZiporPhar なにもかもが手動
  • ZiporPhar 安宅船 なにもかもが手動
  • ZiporPhar 安宅船 なにもかもが手動 手 漕 ぎ !!
  • バージョン管理OK でも、依存性解消までは無理 呼び出しは、pearのディレクトリを include_pathに設定 いままで本当にありがとう! Pear
  • 1サーバ=1バージョン ひとつの環境上で複数アプリを違った バージョンで運用できない 複数運用しようとZipへ逆戻り… いままで本当にありがとう! Pear
  • 華々しい戦績も… Pear
  • 重巡愛宕 華々しい戦績も… Pear
  • 重巡愛宕 華々しい戦績も… 轟 沈 !!Pear
  • バージョン管理OK アプリごとに別バージョンOK 依存性解消OK 呼び出しは、autoloader Composer&Packagist
  • Composer&Packagist 最新鋭
  • 護衛艦あたご Composer&Packagist 最新鋭
  • 操作 バージョン管理 インストール先 呼び出し GUI なし アプリ require CUI あり (依存性解消なし) 環境 include_path CUI あり (依存性解消あり) アプリ autoloader
  • Onemorething...
  • どうしてこうなった… gitcloneorgitsubmodule
  • どうしてこうなった… gitcloneorgitsubmodule
  • どうしてこうなった… gitcloneorgitsubmodule 何 こ れ !!
  • Composer依存性解消のしくみ 実録
  • $ vim composer.json { "require": { "aws/aws-sdk-php": "2.*" } } $ php composer.phar install
  • Loading composer repositories with package information Installing dependencies (including require-dev) - Installing symfony/event-dispatcher (v2.3.5) Downloading: 100% - Installing guzzle/guzzle (v3.7.3) Loading from cache - Installing aws/aws-sdk-php (2.4.6) Loading from cache symfony/event-dispatcher suggests installing symfony/dependency-injection () symfony/event-dispatcher suggests installing symfony/http-kernel () aws/aws-sdk-php suggests installing doctrine/cache (Adds support for caching of credentials and responses) aws/aws-sdk-php suggests installing monolog/monolog (Adds support for logging HTTP requests and responses) aws/aws-sdk-php suggests installing symfony/yaml (Eases the ability to write manifests for creating jobs in AWS Import/Export) Writing lock file Generating autoload files
  • Loading composer repositories with package information Installing dependencies (including require-dev) - Installing symfony/event-dispatcher (v2.3.5) Downloading: 100% - Installing guzzle/guzzle (v3.7.3) Loading from cache - Installing aws/aws-sdk-php (2.4.6) Loading from cache symfony/event-dispatcher suggests installing symfony/dependency-injection () symfony/event-dispatcher suggests installing symfony/http-kernel () aws/aws-sdk-php suggests installing doctrine/cache (Adds support for caching of credentials and responses) aws/aws-sdk-php suggests installing monolog/monolog (Adds support for logging HTTP requests and responses) aws/aws-sdk-php suggests installing symfony/yaml (Eases the ability to write manifests for creating jobs in AWS Import/Export) Writing lock file Generating autoload files 依存関係にある パッケージが インストールされる
  • Loading composer repositories with package information Installing dependencies (including require-dev) - Installing symfony/event-dispatcher (v2.3.5) Downloading: 100% - Installing guzzle/guzzle (v3.7.3) Loading from cache - Installing aws/aws-sdk-php (2.4.6) Loading from cache symfony/event-dispatcher suggests installing symfony/dependency-injection () symfony/event-dispatcher suggests installing symfony/http-kernel () aws/aws-sdk-php suggests installing doctrine/cache (Adds support for caching of credentials and responses) aws/aws-sdk-php suggests installing monolog/monolog (Adds support for logging HTTP requests and responses) aws/aws-sdk-php suggests installing symfony/yaml (Eases the ability to write manifests for creating jobs in AWS Import/Export) Writing lock file Generating autoload files 依存関係にある パッケージが インストールされる aws-sdk-php (2.4.6) guzzle(3.7.3)
  • $ vim composer.json { "require": { "aws/aws-sdk-php": "2.*", "guzzle/guzzle": "3.6.*" } } $ php composer.phar update アプリがguzzle(3.6)までの対応だった場合
  • Loading composer repositories with package information Updating dependencies (including require-dev) - Removing guzzle/guzzle (v3.7.3) - Installing guzzle/guzzle (v3.6.0) Loading from cache - Removing aws/aws-sdk-php (2.4.6) - Installing aws/aws-sdk-php (2.3.4) Loading from cache Writing lock file Generating autoload files
  • Loading composer repositories with package information Updating dependencies (including require-dev) - Removing guzzle/guzzle (v3.7.3) - Installing guzzle/guzzle (v3.6.0) Loading from cache - Removing aws/aws-sdk-php (2.4.6) - Installing aws/aws-sdk-php (2.3.4) Loading from cache Writing lock file Generating autoload files 設定された バージョンの範囲内で インストールされる
  • Loading composer repositories with package information Updating dependencies (including require-dev) - Removing guzzle/guzzle (v3.7.3) - Installing guzzle/guzzle (v3.6.0) Loading from cache - Removing aws/aws-sdk-php (2.4.6) - Installing aws/aws-sdk-php (2.3.4) Loading from cache Writing lock file Generating autoload files 設定された バージョンの範囲内で インストールされる aws-sdk-php (2.3.4) guzzle(3.6.0)
  • $ vim composer.json { "require": { "aws/aws-sdk-php": "2.4.*", "guzzle/guzzle": "3.6.*" } } $ php composer.phar 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 - Conclusion: don't install aws/aws-sdk-php 2.4.6 - Conclusion: don't install aws/aws-sdk-php 2.4.5 - Conclusion: don't install aws/aws-sdk-php 2.4.4 - Conclusion: don't install aws/aws-sdk-php 2.4.3 - Conclusion: don't install aws/aws-sdk-php 2.4.2 - Conclusion: don't install aws/aws-sdk-php 2.4.1 - Conclusion: don't install guzzle/guzzle v3.7.3 - Installation request for aws/aws-sdk-php 2.4.* -> satisfiable by aws/ aws-sdk-php[2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 2.4.5, 2.4.6]. - Conclusion: remove guzzle/guzzle v3.6.0 - aws/aws-sdk-php 2.4.0 requires guzzle/guzzle ~3.7.0 -> satisfiable by guzzle/guzzle[v3.7.0, v3.7.1, v3.7.2, v3.7.3]. - Can only install one of: guzzle/guzzle[v3.7.0, v3.6.0]. - Can only install one of: guzzle/guzzle[v3.7.1, v3.6.0]. - Can only install one of: guzzle/guzzle[v3.7.2, v3.6.0]. - Installation request for guzzle/guzzle 3.6.* -> satisfiable by guzzle/ guzzle[v3.6.0].
  • 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 - Conclusion: don't install aws/aws-sdk-php 2.4.6 - Conclusion: don't install aws/aws-sdk-php 2.4.5 - Conclusion: don't install aws/aws-sdk-php 2.4.4 - Conclusion: don't install aws/aws-sdk-php 2.4.3 - Conclusion: don't install aws/aws-sdk-php 2.4.2 - Conclusion: don't install aws/aws-sdk-php 2.4.1 - Conclusion: don't install guzzle/guzzle v3.7.3 - Installation request for aws/aws-sdk-php 2.4.* -> satisfiable by aws/ aws-sdk-php[2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 2.4.5, 2.4.6]. - Conclusion: remove guzzle/guzzle v3.6.0 - aws/aws-sdk-php 2.4.0 requires guzzle/guzzle ~3.7.0 -> satisfiable by guzzle/guzzle[v3.7.0, v3.7.1, v3.7.2, v3.7.3]. - Can only install one of: guzzle/guzzle[v3.7.0, v3.6.0]. - Can only install one of: guzzle/guzzle[v3.7.1, v3.6.0]. - Can only install one of: guzzle/guzzle[v3.7.2, v3.6.0]. - Installation request for guzzle/guzzle 3.6.* -> satisfiable by guzzle/ guzzle[v3.6.0]. 頑張って組み合わせをさがしてみた結果
  • 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 - Conclusion: don't install aws/aws-sdk-php 2.4.6 - Conclusion: don't install aws/aws-sdk-php 2.4.5 - Conclusion: don't install aws/aws-sdk-php 2.4.4 - Conclusion: don't install aws/aws-sdk-php 2.4.3 - Conclusion: don't install aws/aws-sdk-php 2.4.2 - Conclusion: don't install aws/aws-sdk-php 2.4.1 - Conclusion: don't install guzzle/guzzle v3.7.3 - Installation request for aws/aws-sdk-php 2.4.* -> satisfiable by aws/ aws-sdk-php[2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 2.4.5, 2.4.6]. - Conclusion: remove guzzle/guzzle v3.6.0 - aws/aws-sdk-php 2.4.0 requires guzzle/guzzle ~3.7.0 -> satisfiable by guzzle/guzzle[v3.7.0, v3.7.1, v3.7.2, v3.7.3]. - Can only install one of: guzzle/guzzle[v3.7.0, v3.6.0]. - Can only install one of: guzzle/guzzle[v3.7.1, v3.6.0]. - Can only install one of: guzzle/guzzle[v3.7.2, v3.6.0]. - Installation request for guzzle/guzzle 3.6.* -> satisfiable by guzzle/ guzzle[v3.6.0]. 頑張って組み合わせをさがしてみた結果 インストール 失敗
  • $ vim composer.json { "require": { "aws/aws-sdk-php": "2.*", "guzzle/guzzle": "2.*" } } $ php composer.phar update バージョンの組み合わせの範囲が広いと…
  • Loading composer repositories with package information Updating dependencies (including require-dev)
  • Loading composer repositories with package information Updating dependencies (including require-dev) なかなか終わらない…
  • { "require": { "aws/aws-sdk-php": "2.4.*", "guzzle/guzzle": "3.7.*" } } 開発で使用するときは マイナーバージョンまで 指定しておいたほうがいいかも
  • Composer使うべき最大の理由?! そして
  • 公式ドキュメント http://docs.aws.amazon.com/aws-sdk-php-2/guide/latest/installation.html
  • 冒頭で解説!! Composer
  • amazon様が 使えと!! Composer
  • ありがとうございます