News Feed
Sections




News Archive
feed this:

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

Geshan Manandhar:
Getting started with PHP (LEMP) on Vagrant, the easiest way
August 11, 2014 @ 12:06:11

Geshan Manandhar has posted a "getting started" guide to getting a LEMP environment up and running (LEMP being Linux, Nginx, MySQL and PHP) through a Vagrant setup.

A software engineer tells to a colleague in his team "Man, it is working on your machine, but why is it not working on mine?", then they both find out that one has Ubuntu 12.04 LTS with PHP 5.3 and the other software engineer on which the code is working is Ubuntu 14.04 with PHP 5.5 after some investigation. If you have ever faced this or similar problem its high time to switch to a portable and a reproducible virtual development environment shared among all team members. This is a context where Vagrant comes into play.

He introduces Vagrant and some of the problems it can help with for development groups. He includes some of the basic terminology and mentions some of the alternatives, including Docker and some of the Google popularity results comparing the two. Finally, he gets down to creating the Vagrant configuration with the PuPHPet service with screenshots of each step of the way. He wraps up the post with a look at how you can determine if things are working and how to add records to your hosts file to make the machine easier to reference.

0 comments voice your opinion now!
lemp vagrant puphpet configure install tutorial automate environment

Link: http://geshan.blogspot.ae/2014/07/getting-started-with-php-lemp-on-vagrant.html#sthash.fPMXLkWP.dpuf

SitePoint PHP Blog:
Automate PHP with Phake - Real World Examples
July 10, 2014 @ 12:51:07

The SitePoint PHP blog has posted part two of their series looking at using Phake for automation in your applications. In this second part they take some of the basics they shared in part one and apply them in some more practical examples.

In part one, we covered the basics of Phake and demonstrated ways of executing tasks with it, covering groups, dependencies, and arguments. In this part, we'll look at some sample real world applications of Phake. Note that the following examples are largely based on things that I usually do manually that need some sort of automation.

He includes three different task examples, each with the code to make them happen (and descriptions of what it's doing):

  • Uploading Files to Server with a Phake task
  • Seeding the Database
  • Syncing Data

You can find out more about Phake on the project's GitHub page (including grouping, aborting and describing tasks).

0 comments voice your opinion now!
phake automate library tutorial part2 practical example

Link: http://www.sitepoint.com/automate-php-phake-real-world-examples/

A
July 07, 2014 @ 16:08:46

On the SitePoint PHP blog there's a new tutorial showing you how to automate your PHP development and deployment with Phake.

As developers, we often have to do repetitive tasks such as updating the database structure, seeding the database, writing CRUD code, running tests, and uploading files to a server. Wouldn't it be great if we could automate these mundane tasks and proceed with solving the more important problems such as making our app more secure or more usable to our users? Phake, an automation tool written for PHP, can do those tasks for you.

They show you how to use Phake (not to be confused with this Phake) including getting it installed via Composer and the creation of a first Phakefile. The include examples of simple tasks, dependencies, grouping, adding descriptions and passing arguments. The command to run the tasks and the resulting output is also included.

0 comments voice your opinion now!
phake automate introduction library

Link: http://www.sitepoint.com/automate-php-phake-introduction/

Lorna Mitchell:
GitHub-Powered Changelog Scripts
January 28, 2014 @ 09:29:20

In her latest post Lorna Mitchell has shared some scripts she uses to automate the creation of a changelog based on the GitHub issue comments and fixes.

My current project does periodic releases, we build a few things, then we work on getting a bunch of user feedback and changing/fixing things before we actually release. [...] When a branch merges in to the main line, we use the "fixes #42" notation to simultaneously close off the issue that it relates to. This has been working pretty well, and today I got the question "what's new since I last saw this project?" - so I created a changelog. It's rather rough-and-ready but I had fun so I thought I'd share.

The script operates off of a local git cloned version of the repository and grabs all commit messages with the tern "fixes" in it. The script then takes the log file, matches the issue ID and then makes a cur call out to the GitHub API to get that issue's description. This is then taken, formatted and dropped into the output.

0 comments voice your opinion now!
changelog script automate changelog generate issue

Link: http://www.lornajane.net/posts/2014/github-powered-changelog-scripts

Konstantin Kudryashov:
Autohosts for Symfony projects on Mac
October 18, 2012 @ 10:39:43

Konstantin Kudryashov has posted a helpful hint for any web developer out there that knows the pain of constantly setting up VirtualHosts and local hostnames during their development. His suggestion makes setting them up simple using Apache2's "autohosts" support.

We all know, that web development is not as easy as it sounds and that it involves lot of different and sometimes really complex tools to just run or test stuff. We also know, that bootstrap (setup) of the project could take more time than you want it to. It's not a big deal if you're working on single project full time, but at KnpLabs, i'm bootstraping new sf2 project every 2 weeks. So this manual crafting of virtual host, edition of /etc/hosts and maintaining of those temp hosts everywhere made me really sick. So, at some point i've started to look for an elegant solution. Here is it.

He gives you all the commands, file contents and software you'll need to install (he uses Homebrew) to install dnsmasq and get it configured. The only Symfony-specific part of the process is the last step - getting the latest version of the framework and installing it.

0 comments voice your opinion now!
autohost apache2 configuration virtualhost localhost automate


Grzegorz Godlewski's Blog:
Automating software development and deployment
June 21, 2012 @ 11:10:17

Grzegorz Godlewski has a new post to his blog that looks at some of the concepts and practices around automated software deployment and development (specifically with Phing).

Phing is a tool designed for automated project building based on Apache Ant distributed as a PEAR extension. It provides the user with the possibility of building the project / application in the same manner as make does with its Makefiles, making complex process execution (which is commonly human error prone) much easier.

He walks you through the steps for getting Phing set up, the directory structure you'll need for your project and a sample build and property files as well as an example of the output from the build execution. He talks about filters, execution control, extensibility and looks at some of the things that he suggests automating.

0 comments voice your opinion now!
automate deployment development phing tutorial


Brian Swan's Blog:
Automating PHPUnit Tests in Windows Azure
January 05, 2012 @ 11:58:46

Brian Swan has posted another tutorial in a series looking at testing applications on the Azure platform. In this latest post he talks about how to automate your PHPUnit tests as a part of the start up of the instance.

In this post, I'll show you how to deploy your PHPUnit tests with your application, have the tests run as a start up task, and have the results written to your storage account for analysis. Attached to this post is a .zip file that contains a skeleton project that you can use to automatically run PHPUnit tests when you deploy a PHP application to Azure. I'll walk you though how to use the skeleton project, then provide a bit more detail as to how it all works (so you can make modifications where necessary).

He has it broken up into a few easy-to-follow steps:

  • Download the AzurePHPWebRole zip archive and unpack it
  • Copy your application, tests and PHP installation into the resulting file structure
  • Create a skeleton "ServiceConfiguration.cscfg" file with the "cspack" command and edit it to change the "osfamily" and "osversion" settings
  • Use "cspack" to package up the application and deploy the application

He walks you through the "how it works" steps too - the things that happen for you automatically on the server side to do things like set up the file to log to, configure the PHP environment and execute the "runtests" Powershell file as included in the AzurePHPWebRole download.

0 comments voice your opinion now!
automate test phpunit windows azure deploy automatic tutorial


Till Klampaeckel's Blog:
Cooking PHPUnit (and a chef-solo example on top)
December 05, 2011 @ 11:48:48

Till Klampaeckel has a new post to his blog combining two powerful technologies into one automated package that uses a Chef recipe to install PHPUnit as a part of the setup.

If you follow my blog for a while, you might have noticed that I'm a huge fan of automation. I just moved one of our development servers the other day and had one of these moments where something just paid off. Taking for granted that I can spin up fully operational EC2 instances in minutes, I also had our development stack installed and configured in an instant. My recipe basically follows Christer's instructions and because I distribute phpunit's command along with it, editing of the file is no longer required: when the chef run completes, phpunit34 is installed and ready to be used.

He includes the configuration needed to create a recipe for PHPUnit installation including how to use chef-solo to automate the install. It uses a "cookbook" from Till's collection on github to do some of the work for you. You can find out more about Chef on the OpsCode site.

0 comments voice your opinion now!
phpunit chef automate install tutorial


Tom Jowitt's Blog:
Streamlined PHP Development - Part II
July 20, 2011 @ 08:21:07

Tom Jowitt has posted the second part of his series looking at setting up a streamlined PHP development environment in part two covering some of the basics of the build.

In the first part of this series we looked at setting up our Apache installation to make life easier. Now that the basics are sorted we can start looking at how to structure our development environment and run some basic build tasks using Phing.

He shows how to use the PEAR installer to get Phing installed (including all of its dependencies) and creating the base directory for it to use in your build. He includes the contents of some of the configuration files (available on github) to set up some properties and the steps to the build process in the build.xml. He explains each part of the build process and includes some screenshots of the end result.

1 comment voice your opinion now!
phing development environment automate tutorial application


Wim Godden's Blog:
Automated PHP 5.3 compatibility testing for your (old) code
December 22, 2010 @ 09:02:10

In this new post to his blog today, Wim Godden looks at how you can use the PHPUnit unit testing framework to be sure your applications are ready to move to a PHP 5.30-only world.

So you or your team has built anywhere between 5 and 500 projects in PHP 4, 5.1 and 5.2 over the past 5 years. And now PHP 5.3 is there, offering a lot of very interesting features, including namespace support, late static binding (finally !), closures, nested exceptions and a bunch more (see the new feature list). So naturally, you'd like to upgrade. But doing so might break some old code.

He suggests a few different options - just run your unit tests and hope for the best, test the application's code directly or, his preference, run compatibility tests with the help of PHP_CodeSniffer and this new sniff he created. The sniff finds things like deprecated functions hanging around from pre-5.3 times as a part of a subset that the code sniffer can easily find.

2 comments voice your opinion now!
automate test unittest phpcodesniffer phpcs upgrade



Community Events





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


release framework api introduction zendserver bugfix laravel community interview podcast list series library developer voicesoftheelephpant conference symfony tips deployment language

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