Upcoming SlideShare
Loading in...5

Like this? Share it with your network



Uploaded on

Slides from my Phing talk given at PHPNW June 2011.

Slides from my Phing talk given at PHPNW June 2011.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads


Total Views
On Slideshare
From Embeds
Number of Embeds



Embeds 414 393
http://localhost 12
http://craniac 4
url_unknown 3 2

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

    No notes for slide
  • \n\n
  • \n\n
  • Phing = PHing Is Not Gnu make\n\nDeveloper build toolkit - tool for every job (almost)!\nLGPL Licensed\n\nMy knowledge of Phing about 20%, however there's great documentation!\n
  • Web applications require deployment, packaging, testing, setting permissions, configuration, creating log files\nDoing so by hand every time is scary!\n
  • \n\n
  • \n\n
  • Project: root XML node\nTargets: collection of tasks, together for a reason\nTasks: call to specific action e.g. copy, symlink etc.\n
  • \n\n
  • \n\n
  • Fileset selectors - powerful matching, as well as **\ndate based, size, file/dir, related files present\nMapper - also a good tool, convert filenames during build\nFilters (filterchains) - transform data during build, e.g. strip comments, replace values in config files (via regex)\n
  • \n\n
  • \n\n
  • \n\n
  • \n\n
  • \n\n
  • \n\n
  • \n\n
  • \n\n
  • \n\n
  • \n\n


  • 1. ContentPhing Build System (basics)What is it / Why use itWhat can it doExample build filesPhing & CI (Jenkins)Questions
  • 2. Whats this Phing about? The TPhingBuild system- Based on Ant (Apache)- PHP(5) based- No extra dependencies- Cross platform
  • 3. I dont need nostinking Build SystemDo you write PHP Apps or just web pages?- Configuration- Deployment- Committing- Testing- Documenting
  • 4. I dont need nostinking Build SystemDo you write PHP Apps or just web pages?- Configuration - Preparation- Deployment - Predictability- Committing - Confidence- Testing - Familiarity- Documenting - Loggable
  • 5. 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.)
  • 6. Oh is that all?
  • 7. 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
  • 8. Hows it work?Phing shell script,launches Phing PHPApp + your XML buildfileBuild file contains:- Properties- Targets- Tasks
  • 9. Hello World!
  • 10. Example build script
  • 11. phing clean
  • 12. prepare
  • 13. deploy staging
  • 14. deploy live
  • 15. Continuous IntegrationRemove reliance onHuman natureRegular automatedbuilds (phing/ant)Report on build status
  • 16. CI ReportsFor many of the toolsin the Back to BasicsseriesPhing targets:- phpcs, pdepend, phpcpd, phpmd, phpunit, phpcb etc.
  • 17. Resourceshttp://www.phing.info
  • 18. Questions?
  • 19. Contact?Jeremy Coates, MD MagmaDigital