Vagrant, Composer, Unit Testing – A look into the new PHP environment



Vagrant, Composer, Unit Testing – A look into the new PHP environment

0 0


devfest2014

Reveal.JS IDMS Dev Fest 2014 presentation

On Github jsundquist / devfest2014

Vagrant, Composer, Unit Testing

A look into the new PHP environment

Created by Jonathan Sundquist / @jsundquist

Who am I and why trust me

  • Developing php applications for the past 10 years
  • Active within the php community.
  • Father of two

What's being covered

  • New PHP Project structure
  • Vagrant
  • Composer
  • Unit Testing
  • What's Next

Why the change

  • PHP 5.5
  • Different versions of php, apache, etc
  • Dev environment to match production
  • No more symlinks
Previous PHP environment was three years behind. PHP 5.6 will be released soon. No developer had the same php or apache environment. Develoeprs could be developing on environments that didn't match what it would be deployed in Biggest reason, no more symlinks

Project Structure

  • Vagrant
  • Composer
  • MODULES!
  • Unit tests
Vagrant environment that is similar to production Composer to pull in dependancies. Dependancies could be the new Fellbeast library, zend framework, etc Dependancies could even be modules Code is now unit tested

Vagrant

  • What is it?
  • Why the change?
  • Not restricted to php
  • How do you use it?
Virtual machine that will mimic the server being deployed to No more WAMP. No more HOST modifications Haven't experimented yet but is possible

DEMO TIME

Composer

  • Dependancy management tool
  • How do we benefit from it?
similar to npm, ruby gems, maven. No more sym links or include paths in your config

How about another demo

Unit Testing

  • Different types
  • Focus on BDD and TDD
  • But what is being tested
Business Driven Development, Domain Driven Development, Test Driven Development. Focus on BDD and TDD

Where do I see us going

  • PHP running through team city
  • Continuous Delivery

Further Reading