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

Laravel News:
Homestead now with PHP 7 support
Oct 02, 2015 @ 10:52:41

In a quick post on the Laravel News site they point out that the Laravel Homestead virtual machine now has support for PHP 7:

Laravel Homestead just received a new update with support for PHP 7 which is due out this month.

If you are already using the PHP 5.x Homestead box, you can upgrade your installation to PHP 7.0 by cloning the php-7 branch of the laravel/homestead repository into a new folder.

With two other simple steps you can quickly upgrade your box to be running PHP 7 - updating the Homestead.yml configuration and running a vagrant up. You can find out more information about this update in the official documentation.

tagged: laravel homestead php7 support upgrade configuration vagrant

Link: https://laravel-news.com/2015/10/homestead-now-with-php-7-support/

Eric Barnes:
How to set up your Mac for local PHP Development
Aug 05, 2015 @ 10:48:14

Eric Barnes has posted a guide to helping you set up (as he sees it) a good PHP development environment on your Mac that includes Homebrew for package management, Composer, Vagrant and the Laravel Homestead VM for project hosting.

This past weekend I decided it was finally time to wipe my Macbook’s hard drive and start fresh. I have used it daily for several years now and still had artifacts from when I used Mamp. Since then Vagrant has turned to my local server of choice and one of the reasons is how clean you can keep your machine by utilizing it.

After finishing the new Mac OS X install it felt like a new beginning. So clean, so minimal. [...] This go around I wanted to keep it as minimal as possible and only install things I know I need and use. This tutorial covers how I set up my Mac for local PHP Development.

His list of software includes the previously mentioned four as well as the ZSH shell replacing the default bash and, obviously, PHP itself installed via Homebrew.

tagged: osx mac local development homestead composer zsh vagrant homebrew

Link: http://ericlbarnes.com/set-mac-local-php-development/

Joeri Verdeyen:
How I develop in PHP with CoreOS and Docker
Jul 29, 2015 @ 11:41:14

Joeri Verdeyen has posted a tutorial showing you how to use a combination of CoreOS and Docker as a PHP development environment. This is an alternative to the more frequently used Vagrant VM provisioning popular among developers.

I’ve been using the Vagrant provisioned-with-Ansible-setup for a while now. But for the last month(s) I’ve been playing around with things like: Docker, boot2docker, CoreOS, etcd, .. I managed to setup a fast and easy way to develop my PHP applications. Symfony2 is my preferred weapon of choice, so I’ll explain how I’m developing a Symfony2 app.

He starts with the software you'll need installed to get his example up and running, all installable via "brew". He shows how to configure the CoreOS via Vagrant and bring the box up. He then sets up the Docker client to point to the newly created VM as its server. He then creates a docker-compose.yml file to set up the necessary services including nginx, MySQL and (of course) PHP. He then shows the command to run the container, execute the configuration and ensure that all containers are configured correctly. Finally he runs the Composer installation command (Symfony2, remember) and clear the cache.

tagged: coreos docker vagrant development environment tutorial configuration symfony2

Link: https://www.jverdeyen.be/docker/how-php-symfony-coreos-docker/

Joe Ferguson:
How I use Laravel Homestead everyday
Jun 25, 2015 @ 09:21:28

Joe Ferguson has a new post to his site sharing a bit about how he uses Homestead (the Laravel project's virtual machine offering) in his every day development.

I feel like I’ve been talking about homestead a lot lately. I feel like Vagrant is such an important part of a developer’s workflow. If you are still using MAMP, WAMP, or installing Virtual Machines manually you are wasting so much of your own time (and your clients money) by not using prebuilt development environments. [...] I prefer to have my open source projects contain a Vagrant environment so that any potential contributor can easily clone my repository and run “vagrant up”. [...] The recent changes to Homestead have brought the option to use Homestead exactly as I do, without having to use my own packages or copy and paste files.

He walks you through the simple process of getting a project set up with this Homestead-per-project configuration:

  • Starting a new Project
  • Adding Homestead as a dependency
  • Make the Homestead configuration for this project

Now when a "vagrant up" is run from the project, Vagrant understands to create a Homestead virtual machine instance, import the base box and configure it to be a locally hosted web server for your application. He also includes instructions for using it with non-Laravel applications and how to share the environment.

tagged: laravel homestead everyday tutorial project dependency vagrant

Link: http://www.joeferguson.me/how-i-use-laravel-homestead-everyday/

Rob Allen:
Testing my ZF1 app on PHP7
Jun 15, 2015 @ 16:37:57

Rob Allen has a new post to his site showing the results of some testing he did when running a Zend Framework v1 application on PHP 7.

Zend Framework 1 is still actively maintained and we fully intend to ensure that ZF1 works with no problems on PHP 7 when its released. Now that PHP 7.0.0 Alpha 1 has been released, it's time to find out if your Zend Framework 1 app works with it. The easiest way to do this is to use a virtual machine. My preference is Vagrant with Rasmus' PHP7dev box.

He walks through the setup of the virtual machine via a simple Vagrantfile, configuring the latest PHP 7 version, an Nginx server and a basic database. Fortunately, his results turned out quite well with only one issue identified in his application (one with method names the same as class names). You can use this as a a guide to try out your own applications too. Be sure to check the UPGRADING file for a list ot possible breaks to help you track down issues you might be seeing.

tagged: php7 zendframework1 testing application vagrant php7dev

Link: http://akrabat.com/testing-my-zf1-app-on-php7/

SitePoint PHP Blog:
Re-introducing Vagrant: The Right Way to Start with PHP
Jun 09, 2015 @ 08:57:59

The SitePoint PHP blog has a new tutorial posted showing you the right way to start with PHP using Vagrant. Vagrant allows for the easy creation and management of local virtual machines that work as self-contained environments and make for easy reuse.

I often get asked to recommend beginner resources for people new to PHP. And, it’s true, we don’t have many truly newbie friendly ones. I’d like to change that by first talking about the basics of environment configuration. In this post, you’ll learn about the very first thing you should do before starting to work with PHP (or any other language, for that matter). We’ll be re-introducing Vagrant powered development.

He starts off by getting everyone on the same level with an introduction to what Vagrant is, how its set up and some of the advantages is brings to the table. He moves to the next piece of software needed, VirtualBox, that actually hosts the virtual machines. With that installed you'll then need Vagrant. With those both set up, he talks more about what makes this a perfect setup for PHP development and information about their preferred VM, the Homestead Improved image. He ends the post with some links to other resources and SitePoint's own posts with more information on this powerful setup.

tagged: vagrant homestead improved tutorial virtualbox gettingstarted

Link: http://www.sitepoint.com/re-introducing-vagrant-right-way-start-php/

SitePoint PHP Blog:
Displaying Youtube Videos in PHP
May 14, 2015 @ 11:49:41

The SitePoint PHP blog has a new post today showing you how to display YouTube videos inside your application as a part of this series. The series is using Laravel as a framework to create the application.

In this two-part article, we’re going to learn how to work with version 3 of the Youtube API and we’ll build a demo along the way. [...] We’re going to build a demo that lets the user browse popular videos on Youtube, search for a video, browse videos by categories, and select a video to watch. I will be using Laravel 5 as my framework of choice, and Vagrant for my development environment.

The end result will show a set of video thumbnails related to the selected category. He walks you through the steps to get the application set up and running including the configuration of your Google API connection. He creates a login controller to allow users to log in with their Google credentials and the callback to handle the API response. From there he makes the YouTube service provider, the "video list" endpoint (and view) and a single video page with an embedded player.

tagged: tutorial youtube api google integration laravel vagrant application

Link: http://www.sitepoint.com/displaying-youtube-videos-php/

SitePoint PHP Blog:
Getting Started with eZ Platform on Vagrant
May 13, 2015 @ 09:54:48

The SitePoint PHP blog has a new post about getting eZ platform set up and running on a Vagrant VM relatively painlessly. eZ Publish (and the newer eZ Platform) are a content management system aimed at the digital marketing space.

Last year, I had a somewhat negative experience with installing eZ Publish on a Vagrant box. Since then, they’ve significantly improved both the software and the VM-friendliness by, well, flat out removing the legacy stack. The VM setup we’ll be using in this tutorial comes from the labs of NetGen and the mind of @vranac, and is followed by the installation procedure on our very own Homestead Improved modified by yours truly.

Author Bruno Skvorc walks you through the entire process, using Vranac (Vagrant, Anisble and VirtualBox) to get the VM instance set up and running. He then shows how to clone the latest eZ installation and build the demo application. He follows this with the instructions on getting the same setup running on a Homestead Improved instance, requiring a few more steps but it can be a bit faster overall. He finishes off the post by mentioning an upcoming event, PHPSummerCamp, a conference that will include sessions and in-depth looks at the eZ Publish and Platform functionality (happening in Croatia in August).

tagged: ezplatform introduction vagrant homestead improved install configure

Link: http://www.sitepoint.com/getting-started-ez-platform-vagrant/

Rob Allen:
Installing XHGui via Ansible
Apr 14, 2015 @ 10:50:47

Rob Allen has posted a guide to his site today showing how to install XHGui via Ansible. XHGui is a graphical interface to view the results of XHProf, a performance evaluation tool.

I'm still using Ansible to provision Vagrant VMs. This is how I added the XHGui profiler to my standard setup.

He walks you through the five steps his process follows to get the necessary software installed and configured to get up and running:

  • Install Composer
  • Install the uprofiler PHP extension
  • Install XHGui
  • Set up for profiling
  • Set up host for XHGui website

Each step includes the commands to execute or the lines to add/update to the configurations to get the system up and working.

tagged: tutorial install xhgui xhprof ansible build vagrant vm virtualmachine

Link: http://akrabat.com/installing-xhgui-via-ansible/

Rob Allen:
Building and testing the upcoming PHP7
Mar 30, 2015 @ 10:14:08

Rob Allen has posted a guide to building and testing PHP 7, the next upcoming major build of the PHP language (released sometime later this year).

The GoPHP7-ext project aims to ensure that all the known PHP extensions out there work with the upcoming PHP 7. This is non-trivial as some significant changes have occurred in the core PHP engine (related to performance) that mean that extensions need to be updated. In order to help out (and prepare my own PHP code for PHP 7!), I needed the latest version of PHP7 working in a vagrant VM. Fortunately Rasmus has created a such a VM called php7dev, so let's start there.

He walks you through the process of grabbing the latest version of the virtual machine and set it up as a Vagrant VM instance. He talks about the different PHP versions contained in the VM and how to update PHP 7 to the latest pre-release version. Finally he talks about building an extension on the VM (he uses the apfd extension) and how to configure the VM to be able to test your own code too.

tagged: php7 test vm extension rasmuslerdorf vagrant tutorial

Link: http://akrabat.com/building-and-testing-php7/