Home » Php » maven 2 – PHP Packaging/Deployment

maven 2 – PHP Packaging/Deployment

Posted by: admin July 12, 2020 Leave a comment


What is a good way to package a web application in PHP for easy deployment? Currently, I am using make to generate a gzipped tar file. In Java, most people use Maven and build WARs. I wonder if there is a similar standard practice in PHP world.

There is a Maven for PHP. I wonder if it’s the way to go.

How to&Answers:

The PHP archive might be of interest to you.

See the manual.

The phar extension provides a way to put entire PHP applications into a single file called a “phar” (PHP Archive) for easy distribution and installation. In addition to providing this service, the phar extension also provides a file-format abstraction method for creating and manipulating tar and zip files through the PharData class, much as PDO provides a unified interface for accessing different databases. Unlike PDO, which cannot convert between different databases, Phar also can convert between tar, zip and phar file formats with a single line of code. see Phar::convertToExecutable() for one example.



PHing Is Not GNU 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 and SimpleTest unit tests (including test result and coverage reports), file transformations (e.g. token replacement, XSLT transformation, Smarty template transformations), file system operations, interactive build support, SQL execution, CVS/SVN operations, tools for creating PEAR packages, and much more.