PHing

PHing不是GNU make; 它是一个基于Apache Ant的PHP项目构建系统或构建工具。(PHing Is Not GNU make; it's a PHP project build system or build tool based on Apache Ant.)

Github stars Tracking Chart

P H I N G

(PH)ing(I)s(N)ot(G)NU make;这是一个PHP项目构建系统或构建基于Apache Ant的工具。你可以用它做任何事情:使用像GNU make这样的传统构建系统,以及使用简单的XML构建文件和可扩展PHP“任务”类使其变得易于使用和高度灵活的构建框架。

功能包括运行PHPUnit测试(包括测试结果和覆盖率报告),文件转换(例如代币替换,XSLT转换,Smarty模板转换),文件系统操作,交互式构建支持,SQL执行,SVN/GIT操作,创建PEAR包的工具,文档(DocBlox,PhpDocumentor)以及更多。

如果您发现自己正在编写自定义脚本来处理包装,部署或测试您的应用程序,那么我们建议您查看Phing。Phing带有许多开箱即用的操作模块(任务),和一个易于使用的OO模型来扩展或添加您自己的自定义任务。

Phing提供以下功能:

  • 简单的XML构建文件
  • 丰富的提供任务
  • 通过PHP类轻松扩展
  • 平台无关:适用于UNIX,Windows,Mac OSX

最新版本

最新版本的详细信息可以在Phing主页上找到 https://www.phing.info/

支持的PHP版本

Phing 3.x与PHP 7.1及更高版本兼容。

安装

  1. Composer
  2. 安装Phing的首选方法是通过Composer。 将 phing/phing 添加到你项目的 composer.json 配置文件的 require-dev或require 部分,然后运行'composer install':

         {
             "require-dev": {
                 "phing/phing": "3.0.x-dev"
             }
         }
    
  3. Phar
  4. 下载 Phar存档。然后可以通过运行以下命令来执行存档:

    $ php phing-latest.phar        
  5. Docker (试验性)
  6. 官方的Phing Docker图像可以在Docker Hub上找到。 要在容器内执行Phing并执行位于/home/user中的build.xml,请运行以下命令:

    $ docker run --rm phing/phing:3.0 -v /home/foo:/opt -f /opt/build.xml
    

运行(单元)测试

要成功运行所有Phing测试,必须满足以下条件:

  • 安装了PEAR,发现了“pear.phing.info”频道
  • 安装了“python-docutils”和“subversion”软件包
  • php.ini将“phar.readonly”设置为“关”
然后,执行以下步骤(在Phing的克隆/分支上):

$ composer install
$ cd test
$ ../bin/phing
        

文档

文档可在 docs/docbook5/en/output 中以各种格式获得 目录(由位于 docs/docbook5/en/source 的DocBook来源生成)。

有关在线文档,您还可以访问Phing网站: https://www.phing.info/

许可

本软件按照您在文件中可能找到的条款获得许可 在这个目录中命名为“LICENSE”。

感谢您使用PHING!

联系

贡献

我们欢迎贡献!请保持您的拉动要求干净简洁:压扁提交, 不要引入不必要的(空白)更改,请使用详细的提交消息。

Phing的源代码是根据PSR-2标准格式化的。

Main metrics

Overview
Name With Ownerphingofficial/phing
Primary LanguagePHP
Program languagePHP (Language Count: 11)
PlatformLinux, Mac, Windows
License:GNU Lesser General Public License v3.0
所有者活动
Created At2012-01-03 22:21:54
Pushed At2025-06-07 07:15:55
Last Commit At
Release Count69
Last Release Name3.0.1 (Posted on )
First Release Name2.2.0RC1 (Posted on 2006-02-13 15:05:27)
用户参与
Stargazers Count1.2k
Watchers Count55
Fork Count318
Commits Count4.7k
Has Issues Enabled
Issues Count363
Issue Open Count10
Pull Requests Count1155
Pull Requests Open Count3
Pull Requests Close Count397
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private

P H I N G

Build Status
Scrutinizer Code Quality
codecov
Build status

Thank you for using PHING!

(PH)ing (I)s (N)ot (G)NU make; it's a PHP project build system or build tool based on Apache Ant. You can do anything with it that you could do with a traditional build system like GNU make, and its use of simple XML build files and extensible PHP "task" classes make it an easy-to-use and highly flexible build framework.

Features include running PHPUnit unit tests (including test result and coverage reports), file transformations (e.g. token replacement, XSLT transformation, template transformations), file system operations, interactive build support, SQL execution, Git/Subversion operations, tools for creating PEAR packages, documentation generation (PhpDocumentor, ApiGen) and much, much more.

If you find yourself writing custom scripts to handle the packaging, deploying, or testing of your applications, then we suggest looking at Phing. Pre-packaged with numerous out-of-the-box operation modules (tasks), and an easy-to-use OO model to extend or add your own custom tasks.

Phing provides the following features:

  • Simple XML buildfiles
  • Rich set of provided tasks
  • Easily extendable via PHP classes
  • Works on Linux, Mac & Windows
  • No required external dependencies
  • Runs great on PHP 7

The Latest Version

Details of the latest version can be found on the Phing homepage
https://www.phing.info/.

Supported PHP versions

Phing 3.x is compatible with PHP 7.1 and higher.

Installation

  1. Composer

The preferred method to install Phing is through Composer.
Add phing/phing to the
require-dev or require section of your project's composer.json
configuration file, and run 'composer install':

     {
         "require-dev": {
             "phing/phing": "3.0.x-dev"
         }
     }
  1. Phar

Download the Phar archive.
The archive can then be executed by running:

     $ php phing-latest.phar
  1. Docker (experimental)

The official Phing Docker image can be found on Docker Hub.

To execute Phing inside a container and execute build.xml located in /home/user, run the following:

     $ docker run --rm -v /home/user:/opt phing/phing:3.0 -f /opt/build.xml

Documentation

Documentation is available in various formats in the docs/docbook5/en/output
directory (generated from DocBook sources located in docs/docbook5/en/source).

For online documentation, you can also visit the Phing website: https://www.phing.info/

Contact

Donations

Developing and maintaining Phing has cost many hours over the years. If you want to show your appreciation, you can use one of the following methods to donate something to the project maintainer, Michiel Rook:

Thank you!

Contributing

We love contributions!

Help us spot & fix bugs

We greatly appreciate it when users report issues or come up with feature requests. However, there are a few guidelines you should observe before submitting a new issue:

  • Make sure the issue has not already been submitted, by searching through the list of (closed) issues.
  • Support and installation questions should be asked on Twitter, Slack or IRC, not filed as issues.
  • Give a good description of the problem, this also includes the necessary steps to reproduce the problem!
  • If you have a solution - please tell us! This doesn't have to be code. We appreciate any snippets, thoughts, ideas, etc that can help us resolve the issue.

Issues can be reported on GitHub.

Pull requests

The best way to submit code to Phing is to make a Pull Request on GitHub.
Please help us merge your contribution quickly and keep your pull requests clean and concise: squash commits and don't introduce unnecessary (whitespace) changes.

Phing's source code is formatted according to the PSR-2 standard.

Running the (unit) tests

If you'd like to contribute code to Phing, please make sure you run the tests before submitting your pull request. To successfully run all Phing tests, the following conditions have to be met:

  • PEAR installed, channel "pear.phing.info" discovered
  • Packages "python-docutils" and "subversion" installed
  • php.ini setting "phar.readonly" set to "Off"

Then, perform the following steps (on a clone/fork of Phing):

     $ composer install
     $ cd test
     $ ../bin/phing

Licensing

This software is licensed under the terms you may find in the file
named "LICENSE" in this directory.

Proud to use:

PhpStorm Logo