简体   繁体   English

Phalcon PhP-如何升级

[英]Phalcon PhP - how to upgrade

I run phalcon php and its devtools in a macbook. 我在Macbook中运行phalcon php及其devtools。 My current version is 2.0.13 and I want to upgrade to version 3. 我当前的版本是2.0.13,我想升级到版本3。

I would like to confirm (and also make a useful post to people with the same problem) if to upgrade it I just need to compile again: 我想确认一下(也向有同样问题的人做一个有用的帖子)是否要升级它,我只需要再次编译即可:

git clone --depth=1 git://github.com/phalcon/cphalcon.git
cd cphalcon/build
sudo ./install

Also for the devtools do I just have to follow this guide again? 另外对于devtools,我是否需要再次遵循本指南

Thanks 谢谢

Yes, you posted exactly what you need to do in order to update your Phalcon. 是的,您发布的正是您要更新Phalcon所需做的事情。 If you have already installed phalcon using github you can go to the same directory and make a simple git checkout master && git pull origin master 如果您已经使用github安装了phalcon,则可以转到同一目录并进行简单的git checkout master && git pull origin master

Sometimes install command doesn't work properly (doesn't recognize your php.ini path or picks the wrong one if you have many) and you need to update your php.ini with extension path manually. 有时install命令无法正常工作(无法识别您的php.ini路径,或者如果您有很多,则选择错误的路径),并且您需要手动使用扩展路径更新php.ini If newly compiled library is in different directory than it was before you need to fix it by yourself. 如果新编译的库位于与您自己进行修复之前的目录不同的目录中。

Phalcon is also available from linux (at least for sure on ubuntu and debian) repositories so you don't need to compile it from sources if you don't want to. Phalcon也可从linux(至少在ubuntu和debian上肯定)存储库中获得,因此,如果您不想从源代码中编译它,就可以使用。 Read more here. 在这里阅读更多。

You can use phalcon-switcher . 您可以使用phalcon-switcher It helps to switch/upgrade from one version of phalcon to the other seamlessly. 它有助于从一个版本的Phalcon无缝切换/升级到另一个版本。

The steps I described in my questions are the right ones to follow (I was asking to be a reference to people facing the same problem). 我在问题中描述的步骤是应遵循的正确步骤(我想作为对面临相同问题的人员的参考)。 But during the process I had some small issues and I will be adding the link to the answers that helped me solve those issues: 但是在此过程中,我遇到了一些小问题,我将在帮助我解决这些问题的答案中添加链接:

Also, at the end of the installation you will see this: 此外,在安装结束时,您将看到以下内容:

Installing shared extensions:     /usr/local/Cellar/php56/5.6.23/lib/php/extensions/xxxxx/
Installing header files:           /usr/local/Cellar/php56/5.6.23/include/php/

You may need to update the extension=/path/to/phalcon.so in your php.ini. 您可能需要在php.ini中更新extension=/path/to/phalcon.so The same will happen when you run php composer.phar install during the phalcon devtools install. 在phalcon devtools安装期间运行php composer.phar install时,也会发生同样的情况。 Just update the path in the files indicated. 只需更新指示文件中的路径即可。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM