SlideShare a Scribd company logo
An introduction to Phing the PHP build system
Who?
Jeremy Coates, MD Magma
Digital Ltd

jeremy@phpnw.org.uk

@phpcodemonkey

#phpnw

linkedin.com/in/
jeremycoates

facebook.com/jeremycoates
Content
Phing Build System (basics)

What is it / Why use it

What can it do

Example build files (+ live demo!)

Phing & CI (Jenkins)

Questions
What's this Phing
       about?
                       The TPhing
Build system

- Based    on Ant
 (Apache)

- PHP(5)   based

- No   extra
 dependencies

- Cross   platform
                     flickr.com/photos/
I don't need no
stinking 'Build System'
Do you write PHP Apps or just web pages?

-   Configuration

-   Deployment

-   Committing

-   Testing

-   Documenting
I don't need no
stinking 'Build System'
Do you write PHP Apps or just web pages?

-   Configuration
                     - Preparation
-   Deployment
                     - Predictability
-   Committing
                     - Confidence
-   Testing

-   Documenting
                     - Familiarity
What can this Phing
       do?
Pretty well everything bar make tea!

Anything a shell script can do (FTP, SCP,
Chown, Touch, SSH etc.) for deployment

Integrate with version control (CVS, SVN,
Git)

Code quality checks (phpcs, pdepend,
phpmd etc.)
Oh is that all?
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
What Phings can I
      use?
How's it work?
Phing shell script,
launches Phing PHP
App + your XML build
file

Build file contains:

-   Properties

-   Targets

-   Tasks              flickr.com/photos/jm3/4814208649
Hello World!
Example build
   script
An introduction to Phing the PHP build system
phing clean
prepare
deploy staging
deploy live
Continuous
       Integration
Remove reliance
on Human nature

Regular automated
builds (phing/ant)

Report on build
status
CI Reports

For many of the
tools we're already
familiar with

Phing targets:

- phpcs,   pdepend,
  phpcpd, phpmd,
  phpunit, phpcb etc.
An introduction to Phing the PHP build system
Phing - context

Phing vs. Ant: Ant is inspiration for
Phing. Phing doesn't need JVM & is
LGPL (Ant: Apache v2)

Phing 1: PHP4

Phing 2: PHP5.2+   phing version 2.4.9

Michiel Rook: Project Lead @michieltcs
Resources
http://www.phing.info   @phingofficial

http://www.phing.info/docs/guide/
stable/

http://jenkins-ci.org

http://dbdeploy.com

http://ant.apache.org
Questions?
Feedback?

Jeremy Coates, MD
Magma Digital Ltd

Please provide
feedback:

https://joind.in/4759

More Related Content

KEY
Phing
Jeremy Coates
 
ODP
Owasp owtf the offensive (web) testing framework + ptes penetration testing e...
Mauro Risonho de Paula Assumpcao
 
PPT
PHPUnit Automated Unit Testing Framework
Dave Ross
 
PPTX
Webdevcon pierrejoye-php54-and-other
Pierre Joye
 
PPTX
Integração Contínua com PHPCI
Thiago Paes
 
PPTX
Php test fest
Barry O Sullivan
 
PDF
Enterprise PHP
Mohammad Emran Hasan
 
ODP
Lighning Talk: PHP build process
Bryan Agee
 
Owasp owtf the offensive (web) testing framework + ptes penetration testing e...
Mauro Risonho de Paula Assumpcao
 
PHPUnit Automated Unit Testing Framework
Dave Ross
 
Webdevcon pierrejoye-php54-and-other
Pierre Joye
 
Integração Contínua com PHPCI
Thiago Paes
 
Php test fest
Barry O Sullivan
 
Enterprise PHP
Mohammad Emran Hasan
 
Lighning Talk: PHP build process
Bryan Agee
 

What's hot (20)

PDF
Becoming A Php Ninja
Mohammad Emran Hasan
 
PDF
Organizing Your PHP Projects (2010 ConFoo)
Paul Jones
 
PDF
PHP Files: An Introduction
Jacques Woodcock
 
PPT
Tech talk: PHP
Jen Wei Lee
 
PDF
Using Composer to create manageable WordPress websites
Anna Ladoshkina
 
ODP
Elixir koans
Ruben Amortegui
 
PPTX
Python for web development
Luis Borbon
 
PDF
Best practices-for-production-environments
Artem Kovardin
 
PDF
How to manage an open source project
Juanjo Bazán
 
PPTX
Frontend testing with Codeception
Christian Keuerleber
 
PPTX
JAZOON'13 - Andres Almiray - Spock: boldly go where no test has gone before
jazoon13
 
ZIP
镐京入场培训.Key
Bean Tsang
 
PDF
Surgeons guide plugin development
afragen
 
PPTX
Golang
Michael Blake
 
PPTX
ATO 2014 - So You Think You Know 'Go'? The Go Programming Language
John Potocny
 
PDF
Groovy and noteworthy
Izzet Mustafaiev
 
PPT
FTC Robot C to Java
Jeanne Boyarsky
 
PDF
Solving Cross-Cutting Concerns in PHP - DutchPHP Conference 2016
Alexander Lisachenko
 
PDF
Building New on Top of Old: The Argument for Simplicity
New Relic
 
PPTX
Web to App:作業系統革命 Firefox OS
Veck Hsiao
 
Becoming A Php Ninja
Mohammad Emran Hasan
 
Organizing Your PHP Projects (2010 ConFoo)
Paul Jones
 
PHP Files: An Introduction
Jacques Woodcock
 
Tech talk: PHP
Jen Wei Lee
 
Using Composer to create manageable WordPress websites
Anna Ladoshkina
 
Elixir koans
Ruben Amortegui
 
Python for web development
Luis Borbon
 
Best practices-for-production-environments
Artem Kovardin
 
How to manage an open source project
Juanjo Bazán
 
Frontend testing with Codeception
Christian Keuerleber
 
JAZOON'13 - Andres Almiray - Spock: boldly go where no test has gone before
jazoon13
 
镐京入场培训.Key
Bean Tsang
 
Surgeons guide plugin development
afragen
 
ATO 2014 - So You Think You Know 'Go'? The Go Programming Language
John Potocny
 
Groovy and noteworthy
Izzet Mustafaiev
 
FTC Robot C to Java
Jeanne Boyarsky
 
Solving Cross-Cutting Concerns in PHP - DutchPHP Conference 2016
Alexander Lisachenko
 
Building New on Top of Old: The Argument for Simplicity
New Relic
 
Web to App:作業系統革命 Firefox OS
Veck Hsiao
 
Ad

Similar to An introduction to Phing the PHP build system (20)

KEY
An introduction to Phing the PHP build system (PHPDay, May 2012)
Jeremy Coates
 
PPT
Php Development Stack
shah_neeraj
 
PPT
Php Development Stack
Bipin Upadhyay
 
PPT
Enterprise PHP (PHP London Conference 2008)
Ivo Jansch
 
PDF
Slim PHP when you don't need the kitchen sink
Joe Ferguson
 
PPT
Introduction to PHP - SDPHP
Eric Johnson
 
PPT
Continuous integration php
Lai Hieu
 
PPT
Php day 20 11 e xo continuousintegration php
Quang Anh Le
 
PPTX
Slides from LAX & DEN usergroup meetings
10n Software, LLC
 
PDF
Deploy a PHP App on Google App Engine
Michele Orselli
 
PDF
The why and how of moving to php 8
Wim Godden
 
PDF
Evolution of deploy.sh
Leonid Mamchenkov
 
PDF
Continuous Delivery for Python Developers – PyCon Otto
Peter Bittner
 
PPTX
LVPHP.org
Joshua Copeland
 
PDF
Building a fully API-based platform on top of cPanel
Dominic Lüchinger
 
PDF
Deploy a php app on Google App Engine
Michele Orselli
 
PDF
PHP 4? OMG! A small vademecum for obsolete software migration.
Francesco Fullone
 
PDF
Unleash your Symfony projects with eZ Platform
Sébastien Morel
 
PDF
Behavior & Specification Driven Development in PHP - #OpenWest
Joshua Warren
 
PDF
Agile == Dynamic?
Francesco Fullone
 
An introduction to Phing the PHP build system (PHPDay, May 2012)
Jeremy Coates
 
Php Development Stack
shah_neeraj
 
Php Development Stack
Bipin Upadhyay
 
Enterprise PHP (PHP London Conference 2008)
Ivo Jansch
 
Slim PHP when you don't need the kitchen sink
Joe Ferguson
 
Introduction to PHP - SDPHP
Eric Johnson
 
Continuous integration php
Lai Hieu
 
Php day 20 11 e xo continuousintegration php
Quang Anh Le
 
Slides from LAX & DEN usergroup meetings
10n Software, LLC
 
Deploy a PHP App on Google App Engine
Michele Orselli
 
The why and how of moving to php 8
Wim Godden
 
Evolution of deploy.sh
Leonid Mamchenkov
 
Continuous Delivery for Python Developers – PyCon Otto
Peter Bittner
 
LVPHP.org
Joshua Copeland
 
Building a fully API-based platform on top of cPanel
Dominic Lüchinger
 
Deploy a php app on Google App Engine
Michele Orselli
 
PHP 4? OMG! A small vademecum for obsolete software migration.
Francesco Fullone
 
Unleash your Symfony projects with eZ Platform
Sébastien Morel
 
Behavior & Specification Driven Development in PHP - #OpenWest
Joshua Warren
 
Agile == Dynamic?
Francesco Fullone
 
Ad

More from Jeremy Coates (15)

PPTX
Cyber Security and GDPR
Jeremy Coates
 
PPTX
Aspect Oriented Programming
Jeremy Coates
 
PDF
Why is PHP Awesome
Jeremy Coates
 
PDF
Testing with Codeception
Jeremy Coates
 
KEY
Insects in your mind
Jeremy Coates
 
KEY
Hudson Continuous Integration for PHP
Jeremy Coates
 
PDF
The Uncertainty Principle
Jeremy Coates
 
PPT
Exploiting Php With Php
Jeremy Coates
 
ODP
What's new, what's hot in PHP 5.3
Jeremy Coates
 
PDF
Kiss Phpnw08
Jeremy Coates
 
PPT
Regex Basics
Jeremy Coates
 
ODP
Search Lucene
Jeremy Coates
 
PDF
Mysql Explain Explained
Jeremy Coates
 
ODP
Introduction to Version Control
Jeremy Coates
 
ODP
PHPNW Conference Update
Jeremy Coates
 
Cyber Security and GDPR
Jeremy Coates
 
Aspect Oriented Programming
Jeremy Coates
 
Why is PHP Awesome
Jeremy Coates
 
Testing with Codeception
Jeremy Coates
 
Insects in your mind
Jeremy Coates
 
Hudson Continuous Integration for PHP
Jeremy Coates
 
The Uncertainty Principle
Jeremy Coates
 
Exploiting Php With Php
Jeremy Coates
 
What's new, what's hot in PHP 5.3
Jeremy Coates
 
Kiss Phpnw08
Jeremy Coates
 
Regex Basics
Jeremy Coates
 
Search Lucene
Jeremy Coates
 
Mysql Explain Explained
Jeremy Coates
 
Introduction to Version Control
Jeremy Coates
 
PHPNW Conference Update
Jeremy Coates
 

Recently uploaded (20)

PDF
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
AbdullahSani29
 
PDF
CIFDAQ's Teaching Thursday: Moving Averages Made Simple
CIFDAQ
 
DOCX
Top AI API Alternatives to OpenAI: A Side-by-Side Breakdown
vilush
 
PDF
Software Development Methodologies in 2025
KodekX
 
PPTX
C Programming Basics concept krnppt.pptx
Karan Prajapat
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
Enable Enterprise-Ready Security on IBM i Systems.pdf
Precisely
 
PDF
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Artjoker Software Development Company
 
PDF
CIFDAQ's Token Spotlight: SKY - A Forgotten Giant's Comeback?
CIFDAQ
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PDF
agentic-ai-and-the-future-of-autonomous-systems.pdf
siddharthnetsavvies
 
PDF
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
PDF
Chapter 2 Digital Image Fundamentals.pdf
Getnet Tigabie Askale -(GM)
 
PPTX
How to Build a Scalable Micro-Investing Platform in 2025 - A Founder’s Guide ...
Third Rock Techkno
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PDF
This slide provides an overview Technology
mineshkharadi333
 
PDF
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
AbdullahSani29
 
CIFDAQ's Teaching Thursday: Moving Averages Made Simple
CIFDAQ
 
Top AI API Alternatives to OpenAI: A Side-by-Side Breakdown
vilush
 
Software Development Methodologies in 2025
KodekX
 
C Programming Basics concept krnppt.pptx
Karan Prajapat
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
Enable Enterprise-Ready Security on IBM i Systems.pdf
Precisely
 
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Artjoker Software Development Company
 
CIFDAQ's Token Spotlight: SKY - A Forgotten Giant's Comeback?
CIFDAQ
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
agentic-ai-and-the-future-of-autonomous-systems.pdf
siddharthnetsavvies
 
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
Chapter 2 Digital Image Fundamentals.pdf
Getnet Tigabie Askale -(GM)
 
How to Build a Scalable Micro-Investing Platform in 2025 - A Founder’s Guide ...
Third Rock Techkno
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
This slide provides an overview Technology
mineshkharadi333
 
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 

An introduction to Phing the PHP build system

  • 2. Who? Jeremy Coates, MD Magma Digital Ltd [email protected] @phpcodemonkey #phpnw linkedin.com/in/ jeremycoates facebook.com/jeremycoates
  • 3. Content Phing Build System (basics) What is it / Why use it What can it do Example build files (+ live demo!) Phing & CI (Jenkins) Questions
  • 4. What's this Phing about? The TPhing Build system - Based on Ant (Apache) - PHP(5) based - No extra dependencies - Cross platform flickr.com/photos/
  • 5. I don't need no stinking 'Build System' Do you write PHP Apps or just web pages? - Configuration - Deployment - Committing - Testing - Documenting
  • 6. I don't need no stinking 'Build System' Do you write PHP Apps or just web pages? - Configuration - Preparation - Deployment - Predictability - Committing - Confidence - Testing - Documenting - Familiarity
  • 7. What can this Phing do? Pretty well everything bar make tea! Anything a shell script can do (FTP, SCP, Chown, Touch, SSH etc.) for deployment Integrate with version control (CVS, SVN, Git) Code quality checks (phpcs, pdepend, phpmd etc.)
  • 8. Oh is that all?
  • 9. 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
  • 10. What Phings can I use?
  • 11. How's it work? Phing shell script, launches Phing PHP App + your XML build file Build file contains: - Properties - Targets - Tasks flickr.com/photos/jm3/4814208649
  • 13. Example build script
  • 19. Continuous Integration Remove reliance on Human nature Regular automated builds (phing/ant) Report on build status
  • 20. CI Reports For many of the tools we're already familiar with Phing targets: - phpcs, pdepend, phpcpd, phpmd, phpunit, phpcb etc.
  • 22. Phing - context Phing vs. Ant: Ant is inspiration for Phing. Phing doesn't need JVM & is LGPL (Ant: Apache v2) Phing 1: PHP4 Phing 2: PHP5.2+ phing version 2.4.9 Michiel Rook: Project Lead @michieltcs
  • 23. Resources http://www.phing.info @phingofficial http://www.phing.info/docs/guide/ stable/ http://jenkins-ci.org http://dbdeploy.com http://ant.apache.org
  • 25. Feedback? Jeremy Coates, MD Magma Digital Ltd Please provide feedback: https://joind.in/4759

Editor's Notes

  • #2: \n\n
  • #3: \n\n
  • #4: \n\n
  • #5: 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
  • #6: Web applications require deployment, packaging, testing, setting permissions, configuration, creating log files\nDoing so by hand every time is scary!\n
  • #7: \n\n
  • #8: \n\n
  • #9: \n\n
  • #10: Project: root XML node\nTargets: collection of tasks, together for a reason\nTasks: call to specific action e.g. copy, symlink etc.\n
  • #11: \n\n
  • #12: \n\n
  • #13: 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<php> task - evaluate PHP expression/Fn call result stored in property\nEmbed PHP direct in build file using <adhoc> task (Needs to be <adhoc><![CDATA[...]]></adhoc>\n
  • #14: \n\n
  • #15: \n\n
  • #16: \n\n
  • #17: \n\n
  • #18: CI Tools watch for commits, then kick start the build process, in this case Phing\nAlternatives to Jenkins: CruiseControl (Phing builder), Xinc - PHP CI tool, uses Phing\n
  • #19: \n\n
  • #20: \n\n
  • #21: \n\n
  • #22: \n\n
  • #23: \n\n
  • #24: \n\n