cakephp3の再インストール
ちょっと環境を一新したので入れ替え
したら動かなくなったw
ログ
[vagrant@localhost htdocs]$ php composer.phar create-project -s dev cakephp/app app Installing cakephp/app (dev-master dc1f18b31df0b29a95a2ec199c6cce5079fd051a) - Installing cakephp/app (dev-master master) Cloning master Created project in app Loading composer repositories with package information Installing dependencies (including require-dev) - Installing ircmaxell/password-compat (1.0.3) Loading from cache - Installing nesbot/carbon (1.8.0) Loading from cache - Installing cakephp/cakephp (3.0.x-dev 92754d0) Cloning 92754d0aff08e783d5161a4cba24a238b6276fbb Failed to download cakephp/cakephp from source: The process "git clone --no-checkout 'git://github.com/cakephp/cakephp.git' '/vagrant/htdocs/app/vendor/cakephp/cakephp' && cd '/vagrant/htdocs/app/vendor/cakephp/cakephp' && git remote add composer 'git://github.com/cakephp/cakephp.git' && git fetch composer" exceeded the timeout of 300 seconds. Now trying to download from dist - Installing cakephp/cakephp (3.0.x-dev 92754d0) Downloading: 100% - Installing mobiledetect/mobiledetectlib (2.8.1) Loading from cache - Installing d11wtq/boris (v1.0.8) Loading from cache Writing lock file Generating autoload files Created `Config/app.php` file Updated Security.salt value in App/Config/app.php Do you want to remove the existing VCS (.git, .svn..) history? [Y,n]? n [vagrant@localhost htdocs]$
なんかエラーでcakephp/cakephpがcomposerより取得できない感じ
Failed to download cakephp/cakephp from source: The process "git clone --no-checkout 'git://github.com/cakephp/cakephp.git' '/vagrant/htdocs/app/vendor/cakephp/cakephp' && cd '/vagrant/htdocs/app/vendor/cakephp/cakephp' && git remote add composer 'git://github.com/cakephp/cakephp.git' && git fetch composer" exceeded the timeout of 300 seconds. Now trying to download from dist
対応方法としては個別にgit cloneしてみた
git clone https://github.com/cakephp/cakephp.git -b 3.0 /vagrant/htdocs/app/vendor/cakephp/cakephp
起動
sh app/App/Console/cake server -H 192.168.33.10 -p 1234
※サーバを用意するのが面倒な場合はこちらでおk
結果
メモ
まとめ
単純にcomposerへのダウンロードに時間がかかってタイムアウトしたのか、バージョンが古いせいか原因は不明ですがなんとかなりました。基本的には手間がかかりましたがいろいろと勉強になったということもある。