[英]How do you handle library dependencies during deployment using PHP?
this is a question on PHP mainly. 这是一个关于PHP的问题。 I was wondering: How do you make sure that all necessary libaries are packaged with your application when you do a deployment to (production) servers?
我想知道:在部署到(生产)服务器时,如何确保所有必需的库都与应用程序打包在一起?
A more concrete example: I have an app running on Zend Framework and each time I roll the application to a server the deployment process creates a fresh "installation" on that system. 一个更具体的例子:我有一个在Zend Framework上运行的应用程序,每次我将应用程序滚动到服务器时,部署过程都会在该系统上创建一个全新的“安装”。 Therefore, I need to bundle Zend Framework together with my application and then copy the files to the right places together (it is done automatically).
因此,我需要将Zend Framework与我的应用程序捆绑在一起,然后将文件一起复制到正确的位置(它会自动完成)。 Currently, I am using a svn:externals definition to get the files out of Zend's SVN system during deployment, however, I don't want to rely on that SVN and I also don't want to put traffic on external SVNs with each deployment.
目前,我正在使用svn:externals定义在部署期间从Zend的SVN系统中获取文件,但是,我不想依赖该SVN,我也不想在每次部署时将流量放在外部SVN上。
In the Java world, I am used to Maven which handles such stuff using central artifact repositries. 在Java世界中,我习惯使用Maven来处理使用中央工件存储库的东西。 I know that there is a Maven4PHP version, however, I am more looking for a PHP-based solution.
我知道有一个Maven4PHP版本,但是,我更喜欢基于PHP的解决方案。 Additionally, I don't believe that PEAR is a good way to go as it doesn't really fulfill my requirement of bundling the applicaiton (incl. libs) into a single deployable.
另外,我不相信PEAR是一个很好的方法,因为它并没有真正满足我将应用程序(包括libs)捆绑到单个可部署中的要求。
Is there some tool available already that I am not aware? 是否有一些我不知道的工具? Or do you have any great technique that I should know?
或者你有什么伟大的技术我应该知道吗?
Thanks much for your help! 非常感谢您的帮助!
Michael 迈克尔
It isn't production ready yet but you might want to keep an eye on the Phark project. 它尚未准备好生产,但您可能需要关注Phark项目。 It is a port of Bundler to PHP.
它是PHP的Bundler端口。
While looking through the Simplify your external dependency management slides I came across a tool called pantr which can be used as a PEAR installer. 在查看简化外部依赖管理幻灯片时,我遇到了一个名为pantr的工具,它可以用作PEAR安装程序。 pantr as PEAR installer which allows you to specify your dependencies in a project specific file.
pantr as PEAR installer ,允许您在项目特定文件中指定依赖项。
The article Version Control != Dependency Management has some information about using the new PEAR installer called Pyrus 文章Version Control!= Dependency Management提供了有关使用名为Pyrus的新PEAR安装程序的一些信息
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.