How to install phalcon version 2

落爺英雄遲暮 提交于 2019-12-12 22:36:48

问题


I have some applications built on phalcon version 2, but since the release of the version 3, new installations of phalcon default to version 3.


回答1:


You need to install phalcon from source, but instead of build from the master branch switch the branch to the 2.0.x branch.

git clone --depth 1 https://github.com/phalcon/cphalcon.git
cd cphalcon
git remote set-branches origin '2.0.x'
git fetch --depth 1 origin 2.0.x
git checkout 2.0.x
cd build
./install

I created this gist to make this easier - https://gist.github.com/goke-epapa/c325da217296ec4880850972be955bf0

UPDATE

I've been told that the above snippet installs version 2.0.10, so the snippet below is specifically for version 2.0.13

git clone --depth 1 https://github.com/phalcon/cphalcon.git
cd cphalcon
git remote set-branches origin 'phalcon-v2.0.13'
git fetch --depth 1 origin phalcon-v2.0.13
git checkout phalcon-v2.0.13
cd build
./install

Update Both code snippets were missing the cd cphalcon command so I modified the snippets.



来源:https://stackoverflow.com/questions/39259735/how-to-install-phalcon-version-2

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!