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

Symfony Blog:
The wait is finally over: the Symfony ElePHPants have arrived!
Nov 06, 2015 @ 12:56:03

The Symfony project has joined the ranks of several other groups in the PHP community and has created their own elePHPant, a Symfony branded version of the plush toy modeled after PHP's elephant mascot.

Conference after conference, we get endless requests from people longing to have their very own ElePHPant. And so, to mark the momentous occasion of Symfony’s 10th birthday we decided to take some serious action. You’ve seen personalised ElePHPants before, but you’ve never seen special edition Symfony ElePHPants!

[...] After having failed to rescue the ElePHPants from Customs, our manufacturers, already extremely busy with their Christmas orders, found a little window to resend us some precious mascots. Although much smaller in numbers than originally planned, we are happy to announce that the Symfony ElePHPants have finally touched down in Paris and are ready in time to celebrate 10 years at SymfonyCon Paris 2015!

You can get your hands on one at the [SymfonyCon Paris 2015 conference] happening next month but that's the only place so far. They're not being sold online (yet) and are available on a first-come, first-served basis at the conference for 20 Euro. If you've been planning to attend the conference, be sure to register now and get in on some great talks (and maybe an elePHPant while you're there).

tagged: symfony elephpant plush project symfonycon paris conference

Link: http://symfony.com/blog/the-wait-is-finally-over-the-symfony-elephpants-have-arrived

On Hackathons
Oct 16, 2015 @ 14:32:34

In his post over on thePHP.cc site Stefan Priebsch talks about hackathons and why they should possibly be considered harmful. Here he's talking about the ones where a project is given at the start and a product is expected at the end, not just general time for developers to hack together on their own projects.

Last month, at a conference in Bulgaria, I participated in a hackathon for the very first time. The task was to build a small REST API for the tracking of shipping containers and a frontend to visualize a container's GPS position. I would like to share some of my thoughts and experiences (and this is neither going to be about the code we wrote, nor about the fact that we won).

He talks about the team that he was a part of and the different pieces they each contributed. He notes one unfortunate thing though: due to time constraints (3 hours), ramp up time and planning of the application, corners had to be cut to make the deadline.

Going back to the hotel, I realized that during the hackathon, the tight schedule had forced us to do pretty much everything that we all know you should not do. And that we had just experienced a "real" project situation: a tight deadline, not enough communication "because we have no time", rushed technical decisions like just using HTTP "because we have no time", doing things quick and dirty "because we have no time". Does that sound familiar to anybody? Exactly: most teams that I have met (and I have met many of them) experience just this on a day to day basis. And it is wrong.

He suggests that hackathons, in this particular format, should be considered harmful as they reinforce bad decision making and poor development practices. He offers some suggestions that could help to make future events better and an offer to provide guidance for those wanting to make a better event.

tagged: hackthon harmful project timelimit opinion

Link: https://thephp.cc/news/2015/10/on-hackathons

Rob Allen:
The beginner's guide to rebasing your PR
Oct 09, 2015 @ 10:30:12

If you've ever contributed to an Open Source project on GitHub (or really even just used Git in general) chances are there's been a time when you needed to rebase your branch with what's on master. It can be a bit confusing to Rob Allen is here to help with this brief guide to walk you through the steps for a successful rebase.

You've successfully created a PR and it's in the queue to be merged. A maintainer looks at the code and asks you to rebase your PR so that they can merge it. Say what?

The maintainer means that there have been other code changes on the project since you branched which means that your branch cannot be merged without conflicts and they would like to you to sort this out. These are the steps you should take.

He breaks it down into three main steps and includes the commands you'll need and how to push the result back up into the waiting repository:

  • Update your target branch from upstream
  • Rebase your branch
  • Push your newly rebased branch to origin

There's really about six steps involved but that's only when you break it down to the individual commands. It's a relatively simple process that, while a bit confusing from the outside, can be very helpful to a project maintainer when it comes merge time.

tagged: rebase pullrequest project opensource process tutorial contribute

Link: http://akrabat.com/the-beginners-guide-to-rebasing-your-pr/

Rob Allen:
The beginner's guide to contributing to a GitHub project
Sep 24, 2015 @ 12:08:10

If you've ever wanted to contribute to an open source project but didn't have any idea where to begin, Rob Allen has a few suggestions to help you get started. His guide is a bit more on the technical level than others that talk more about finding a project or community to be a part of, though.

This is a guide to contributing to an open source project that uses GitHub. It's mostly based on how I've seen Zend Framework, Slim Framework and joind.in operate. However, this is a general guide so check your project's README for specifics.

He walks you through a four step process to getting ready to contribute and make that first submission to the project of your choice:

  • Set up a working copy on your computer
  • Do some work
  • Create the PR (Pull Request)
  • Review by the maintainers

Naturally, some of this depends on the process that the project follows to take in new submissions, either from an issues list or just random buxfixes. It's a pretty standard GitHub-centric guide to follow though. He also recommends reading this article from Lorna Mitchell about code reviews and what the maintainers of most open source projects will look for in submissions.

tagged: beginner guide opensource github contribute project

Link: http://akrabat.com/the-beginners-guide-to-contributing-to-a-github-project/

Laravel News:
Laravel Spark
Sep 16, 2015 @ 10:17:32

On the Laravel News site Eric Barnes has posted a guide to installing and configuring the alpha version of Spark, the latest offering from the Laravel ecosystem for building out a unified SaaS billing system.

The Alpha of Laravel Spark has just been released and it’s goal is to be an opinionated way of building out business oriented SaaS applications. It features team management, user roles, recurring billing through Stripe, and much more. In this tutorial let’s take a deeper look at this new package.

He gets right into the installation of the tool as a Composer package to pull in the spark installer command line tool. A quick spark install command is all it takes to create the new application. He then gets into the different things that you can do with the generated application including:

  • Customize Registration and Profile Updates
  • Customize Roles
  • Customize Settings Tabs
  • Building Spark Subscription Payment Plans
  • Create Coupons and Discounts

This is just a preview of what's offered in the package and what's to come in the final product, but it gives you a good idea of where it starts.

tagged: laravel spark saas billing project alpha release

Link: https://laravel-news.com/2015/09/laravel-spark/

SitePoint PHP Blog:
Using Sphinx for PHP Project Documentation
Aug 17, 2015 @ 09:19:04

The SitePoint PHP blog has posted a guide to using Sphinx, a documentation generation tool that's used behind the scenes for the ReadTheDocs hosted documentation service.

I recently had the need to write proper prose-like source-code documentation for the Diffbot PHP client. Having looked at several documentation generators, and even having suggested a @prose tag for importing of related MD/reST documents into method and class descriptions, I realized there simply is no perfect solution we can all agree on (yet). So until I extend Sage with a @prose token and reST parsing, I opted for ReadTheDocs and Sphinx.

He starts with a quick "TL;DR" of the necessary commands to get things working quickly but follows it with the full details. He walks you through the installation of Sphinx locally, setting up the folders and adding a custom theme. He show how to create the table of contents, activate the PHP syntax highlighting and how to show/hide the "Edit on GitHub" links. He also includes the steps to convert Markdown documents into the reST format and, finally, adding the project to the ReadTheDocs site and pushing your results.

tagged: sphinx project documentation tutorial readthedocs markdown rest

Link: http://www.sitepoint.com/using-sphinx-for-php-project-documentation/

MyBuilder Tech Blog:
Managing Jenkins Project Builds and Configuration using PHP
Jul 08, 2015 @ 09:57:22

The MyBuilder.com Tech blog has posted a tutorial showing you how to manage your Jenkins builds and configuration using PHP via the Jenkins REST API interface and a few handy curl calls.

I decided to create a simple PHP console script that can be run (or added as a git-hook) to maintain synchronization between the branch you are working on and the branch Jenkins is building. Whilst developing this script, it dawned on me that many other automated use-cases could be achieved with the ability to easily update a projects configuration file. [...] Jenkins fortunately provides us with a RESTful interface to manage typical tasks and activities. Included in this is the ability to read the XML configuration file for a specified project.

The tutorial includes examples of requests you can make to the API to do things like:

  • Reading the Projects Configuration
  • Writing to the Projects Configuration
  • Sending a Project Build Request

The post ends with the full script, a procedural process that executes each of the above steps in order (with an interesting use of the "goto" functionality).

tagged: manage jenkins build project configuration rest api tutorial curl

Link: http://tech.mybuilder.com/managing-jenkins-project-builds-and-configuration-using-php/

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/

Joe Ferguson:
Install Homestead into your project
Jun 24, 2015 @ 09:53:42

As the Laravel News site mentions in one of their latest posts, the Laravel Homestead project received an update recently that makes it easier to install per-project rather than the previous "one install for everything" setup.

Over the weekend, Homestead received a new update that allows you to run it on a per project basis. Previously Homestead was designed so that you install it once on your system and share all your sites within the virtual machine. Joe Ferguson created the pull request to help get this feature implemented and he has a full write up on his blog.

This change pulls in the functionality doing all the hard work for you. It copies over needed files and setting up the Homestead vagrant instance directly from inside the project. Joe also describes the command line options you can provide, defining a name and hostname for the new instance. You can find out more about it in the official documentation.

tagged: laravel homestead project perproject command hostname name

Link: http://www.joeferguson.me/install-homestead-into-your-project/

SitePoint PHP Blog:
Nette Framework: First Impressions
Jun 23, 2015 @ 09:41:33

The SitePoint PHP blog has a new article posted with some first impressions of the Nette framework, a larger but not often talked about PHP framework that showed up in their framework survey results in third place.

SitePoint’s PHP channel conducted its annual survey on the most popular framework of 2015 and the results were discussed here. We saw some familiar names: Laravel, Symfony2, Phalcon, Silex, Slim, etc. But wait, what is this: Nette? According to the survey result, it ranked number 3 in both “at Work” and “in Personal Projects”, just tailing the two giants: Laravel and Symfony2.

I had never heard of this framework before the survey results got published. A framework so popular is worth looking into. Thus, in this article, we will take a look at Nette, see what it can do and discuss some of the features.

The Nette framework is a "set of decoupled and reusable PHP components" that combine into a complete framework (including templating, error tracing and unit testing integration). He follows along with their Getting Started guide and helps you get a demo application copy up and running (via Composer). He then goes through the project structure, the "Adminer" tool, route handling, controllers/actions and the "Latte" templating engine. He also covers basic security functionality and some other interesting features like the "Tracy" debugger and the use of the integrated unit test functionality.

tagged: nette framework first impression overview demo project tutorial

Link: http://www.sitepoint.com/nette-framework-first-impressions/