你用Phing吗 [英] Do you use Phing?

查看:213
本文介绍了你用Phing吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人使用 Phing 部署PHP应用程序,如果是,您如何使用它?我们目前有一个手写的设置脚本,我们在部署我们的项目的新实例时运行。我们只是从SVN检出并运行它。它设置一些基本配置变量,安装或重新加载数据库,并为站点实例生成v主机。



我经常以为可能我们应该使用< a href =http://phing.info/trac/ =noreferrer> Phing 。我没有使用太多,所以我没有真正意义上的 Phing 应该做的除了脚本将文件从一个地方复制到另一个,就像我们的安装脚本一样。什么是一些更高级的用途,您可以举个例子来帮助我了解为什么我们会或不想将 Phing 进入我们的过程。

从Federico Cargnelutti的博客



<功能包括文件转换(例如令牌
替换,XSLT转换,
Smarty模板转换),文件
系统操作,交互式构建
支持, SQL执行,CVS
操作,用于创建PEAR
包的工具等等。


当然你可以为上述所有的书写自定义脚本。然而,使用专门的构建工具,如Phing,您可以获得许多好处。您将使用经过验证的框架,而不必担心设置基础设施,您可以专注于需要编写的代码。使用Phing也可以使新成员加入您的团队变得更容易,如果他们使用Phing(或Ant,这是Phing所基于的),他们将能够了解发生了什么。


Does anyone use Phing to deploy PHP applications, and if so how do you use it? We currently have a hand-written "setup" script that we run whenever we deploy a new instance of our project. We just checkout from SVN and run it. It sets some basic configuration variables, installs or reloads the database, and generates a v-host for the site instance.

I have often thought that maybe we should be using Phing. I haven't used ant much, so I don't have a real sense of what Phing is supposed to do other than script the copying of files from one place to another much as our setup script does. What are some more advanced uses that you can give examples of to help me understand why we would or would not want to integrate Phing into our process.

解决方案

From Federico Cargnelutti's blog post:

Features include file transformations (e.g. token replacement, XSLT transformation, Smarty template transformations), file system operations, interactive build support, SQL execution, CVS operations, tools for creating PEAR packages, and much more.

Of course you could write custom scripts for all of the above. However, using a specialized build tool like Phing gives you a number of benefits. You'll be using a proven framework so instead of having to worry about setting up "infrastructure" you can focus on the code you need to write. Using Phing will also make it easier for when new members join your team, they'll be able to understand what is going on if they've used Phing (or Ant, which is what Phing is based on) before.

这篇关于你用Phing吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆