News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Josh Adell's Blog:
Phar Flung Phing
September 26, 2011 @ 10:05:37

Josh Adell has posted about a bit of automation he set up with Phing and PHP's phar packaging to create an archive as a part of his build system. It's a simple five step process mad even easier by the fact that Phing already has a PharPackage task.

One of the cooler features of PHP 5.3 is the ability to package up a set of PHP class files and scripts into a single archive, known as a PHAR ("PHp ARchive"). [...] I decided to see how easy it would be to wrap up Neo4jPHP in a PHAR for distribution. [...] Since I also started playing with Phing recently, I decided to see if I could incorporate packaging a project as a PHAR into my build system. It turns out, it's pretty easy, given that Phing has a built-in PharPackage task.

He points you towards Phing's PEAR channel to get the tool installed and includes a command-line call to update your php.ini to allow PHP to generate phar files. Code is included to create the phar-generation stub as well as the XML for the Phing build file. You can find his end result here.

0 comments voice your opinion now!
phar package archive neo4jphp tutorial build task phing


blog comments powered by Disqus

Similar Posts

SitePoint PHP Blog: Drupal 8 Hooks and the Symfony Event Dispatcher

DevShed: Validating Boolean Values and Float Numbers with Filters in PHP 5

Robert Basic's Blog: Listening to Dbus signals with PHP

XpertDeveloper.com: PHP clearstatecache() Explained

Christoph Dorn's Blog: Zend Server + FirePHP on AWS


Community Events

Don't see your event here?
Let us know!


voicesoftheelephpant laravel5 series php7 podcast language framework library example introduction version opinion release unittest extension api laravel interview community list

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework