Goke Obasa
Goke Obasa

Reputation: 4898

How to install phalcon version 2

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.

Upvotes: 1

Views: 666

Answers (1)

Goke Obasa
Goke Obasa

Reputation: 4898

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.

Upvotes: 3

Related Questions