Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

An introduction to Phing the PHP build system

5,511 views

Published on

Talk given on 27th January 2012 at PHP Benelux 2012 conference in Antwerp, Belgium.

An insight into the Phing build system for PHP, why and how you might use it along with where it sits with related tools such as PHPUnit, PHP Code Sniffer, PHP Mess Detector etc. We will also take a brief look at how Phing can integrate with Continuous Integration, taking Jenkins as our example. We will also be including some simple practical demos of Phing in action!

Published in: Technology
  • Sex in your area is here: ♥♥♥ http://bit.ly/369VOVb ♥♥♥
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Follow the link, new dating source: ❤❤❤ http://bit.ly/369VOVb ❤❤❤
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

An introduction to Phing the PHP build system

  1. 1. Who?Jeremy Coates, MD MagmaDigital Ltdjeremy@phpnw.org.uk@phpcodemonkey#phpnwlinkedin.com/in/jeremycoatesfacebook.com/jeremycoates
  2. 2. ContentPhing Build System (basics)What is it / Why use itWhat can it doExample build files (+ live demo!)Phing & CI (Jenkins)Questions
  3. 3. Whats this Phing about? The TPhingBuild system- Based on Ant (Apache)- PHP(5) based- No extra dependencies- Cross platform flickr.com/photos/
  4. 4. I dont need nostinking Build SystemDo you write PHP Apps or just web pages?- Configuration- Deployment- Committing- Testing- Documenting
  5. 5. I dont need nostinking Build SystemDo you write PHP Apps or just web pages?- Configuration - Preparation- Deployment - Predictability- Committing - Confidence- Testing- Documenting - Familiarity
  6. 6. What can this Phing do?Pretty well everything bar make tea!Anything a shell script can do (FTP, SCP,Chown, Touch, SSH etc.) for deploymentIntegrate with version control (CVS, SVN,Git)Code quality checks (phpcs, pdepend,phpmd etc.)
  7. 7. Oh is that all?
  8. 8. Oh is that all?Unit tests (phpunit, simpletest)Database deployment (dbdeploy)Lint (PHP, JS, XML)Reporting (code coverage, PHPDoc,DocBLox)Not enough? Write your own Tasks or Exec
  9. 9. What Phings can I use?
  10. 10. Hows it work?Phing shell script,launches Phing PHPApp + your XML buildfileBuild file contains:- Properties- Targets- Tasks flickr.com/photos/jm3/4814208649
  11. 11. Hello World!
  12. 12. Example build script
  13. 13. phing clean
  14. 14. prepare
  15. 15. deploy staging
  16. 16. deploy live
  17. 17. Continuous IntegrationRemove relianceon Human natureRegular automatedbuilds (phing/ant)Report on buildstatus
  18. 18. CI ReportsFor many of thetools were alreadyfamiliar withPhing targets:- phpcs, pdepend, phpcpd, phpmd, phpunit, phpcb etc.
  19. 19. Phing - contextPhing vs. Ant: Ant is inspiration forPhing. Phing doesnt need JVM & isLGPL (Ant: Apache v2)Phing 1: PHP4Phing 2: PHP5.2+ phing version 2.4.9Michiel Rook: Project Lead @michieltcs
  20. 20. Resourceshttp://www.phing.info @phingofficialhttp://www.phing.info/docs/guide/stable/http://jenkins-ci.orghttp://dbdeploy.comhttp://ant.apache.org
  21. 21. Questions?
  22. 22. Feedback?Jeremy Coates, MDMagma Digital LtdPlease providefeedback:https://joind.in/4759

×