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

Ben Ramsey:
Introducing Ramsey/UUID
Apr 25, 2016 @ 10:52:14

In a new post to his site Ben Ramsey finally gets around to posting about a library of his that's not only already widely used but has already been around for a few years - his ramsey/uuid library for generating UUIDs.

It seems quite absurd for me to introduce ramsey/uuid, a library that saw its 1.0.0 release on July 19, 2012, and is now at version 3.4.1, having had 35 releases since its first, but what’s even more ludicrous is that I haven’t once blogged about this library. I mention it only in passing in my “Dates Are Hard” post. So, allow me to introduce you to perhaps a familiar face, an old friend, the ramsey/uuid library for PHP.

He starts with some of the original beginnings of the language back when Composer usage was just first taking off. He'd found other UUID implementations in PHP but none that rivaled the features found in library for other languages. He then briefly explains what a UUID is and what the RFC defines them as. He talks about the name change on the package (from the "Rhumsaa" namespace to "Ramsey") and an issue he received where UUIDs were colliding...as well as how he corrected it. He wraps up the post looking at some of what's coming for the library and what kind of improvements he'll be making in v3.4.1 and beyond.

tagged: ramsey uuid library introduction version opensource project rhumsaa improvement

Link: https://benramsey.com/blog/2016/04/ramsey-uuid/

SitePoint PHP Blog:
Sourcehunt #4 – Reflection, Authorization, Crons, and more
Feb 29, 2016 @ 11:18:04

The SitePoint PHP blog has posted the latest in their "Sourcehunt" series of posts highlighting several open source libraries across a wide range of topics they find notable: Sourcehunt #4.

We skipped January’s Sourcehunt, but we’re back now, ready to boost the stardom of more projects!

Libraries included in this latest Sourcehunt include:

Each item in the list comes with a bit of detail around what the library is and what kinds of features it provides. There's also a few other links included to alternatives and resources about the libraries.

tagged: sourcehunt ep4 opensource library feature sitepoint

Link: http://www.sitepoint.com/sourcehunt-4-reflection-authorization-crons-and-more/

SitePoint PHP Blog:
Contributing to Open Source: Gatekeeper Case Study
Feb 23, 2016 @ 09:31:41

On the SitePoint PHP blog editor Bruno Skvorc has a post sharing some of his experience contributing to an open source PHP project and the flow he followed to add in a new feature. The project in question is Gatekeeper, an "all in one", framework-agnostic solution for user authentication and authorization.

GateKeeper is a pretty nifty user registration, authentication and authorization library which uses its own database to store and query the user records. This means that it’s completely decoupled from your main app (so you can, essentially, use Postgre or Mongo for your business logic while using a completely different engine like MySQL for basic user records) and easy to tweak and extend.

[...] This post isn’t about Gatekeeper per-se, though. It’s about contributing to open source, and going about the right way to doing it.

He then breaks the rest of the post up into a few different steps in the contribution flow:

  • Step 1: Ask the owner
  • Step 2: Fork, clone, test
  • Step 3: Plan of Action
  • Step 4: Just Do It ™
  • Step 5: Testing

He includes the code he contributed to the project and where each change needed to be made. He also shows how he tested the new feature and the results of calling his new method to count the number of records for a user, group, permission, etc.

tagged: gatekeeper opensource contribute guide casestudy

Link: http://www.sitepoint.com/contributing-to-open-source-gatekeeper-case-study/

SitePoint PHP Blog:
Appserver – Server Configuration, Dir Structure and Threads
Feb 01, 2016 @ 09:25:05

The SitePoint PHP blog continues their series looking at the features of the appserver.io project in this second post covering its server configuration, directory structure and how it handles threads during processing.

In the first part of our Appserver series, we discussed the very high level differences of Appserver’s architecture to standard web server stacks and got you up and running with an Appserver instance.

[...] In this part, we will be exploring the Appserver architecture a bit more in depth. We will go through the concepts of the different contexts and the parts of Appserver you get out of the box, which cover some of the ground most of the popular PHP frameworks offer. We will also configure the web server and look into an application’s structure. Once we are finished, you should have a fair understanding about Appserver’s contexts in relation to threading, the web server, and its setup.

They start with the threading functionality, showing how "contexts" come in to play and how the code executes as long as this context is alive. The post then gets into some of the code-related differences with using appserver such as extra annotation handling and AOP (aspect oriented programming) practices. From there they get into the tech behind the scenes: configuring the web server, setting up a virtual host and pointing it at the sample application. Finally they talk about the servlet engine and the server's directory structure underneath.

tagged: appserverio project opensource server configuration directory structure thread processsing

Link: http://www.sitepoint.com/appserver-server-configuration-dir-structure-and-threads/

Larry Garfield:
Giving Back in 2016
Jan 25, 2016 @ 10:57:14

In the latest post to his site Larry Garfield makes a charge to the community - both Drupal and the wider PHP community - to gave back in 2016 and make an effort to contribute in some way back to the projects you use and love.

At the end of 2014, I wrote a follow-up for Acquia's Future of PHP series. In that, I called on people to Build Bridges between communities through not just visiting them, but building with them. Build and launch a real project with some toolkit that's not your usual go-to tool, and then documenting and sharing that knowledge with others.

While recording another episode of the Acquia Podcast with JAM (who seems to like having me on for some reason), he asked me what was next. What was the next 2016 challenge to help build a more robust PHP community?

This one should be easy, right? Give back.

He suggests not only that you get out and give back but that you also do it in somewhat unfamiliar territory. He points out that with most of the software we use we're "standing on the shoulders of giants" and without these people giving their time to help the project, it wouldn't be where it is. He includes a few suggestions of things to think about when looking for a place to contribute:

  • look for projects "affiliated" with the ones you usually contribute to
  • if you've never contributed before, there's an even wider range of options (frameworks, extensions, libraries, etc)
  • report bugs if you don't feel like you can contribute code

He does include a reminder that not all projects and communities will be a good fit for you and how you'd like to contribute, so find a good fit and then dig in.

Three contributions, to three projects, in any way, that is new to you. That's the ask. That's #PHPGivesBack2016. And then talk about it. Giving back is something to be proud of so be proud of it, and encourage others to do so as well.
tagged: give back contribute project opensource phpgivesback2016 community

Link: http://www.garfieldtech.com/blog/php-gives-back-2016

Voices of the ElePHPant:
It's the Booze Talking: Contributing to Open Source
Dec 01, 2015 @ 13:46:27

The Voices of the ElePHPant podcast has posted their latest episode but this time it's another in their special "It's the Booze Talking" series. In this latest show they gathered together people from several PHP projects and other well-known individuals from the community:

In this episode they talk about how they started in open source and contributing to projects. They also talk about some of their own definitions around what "contributing" means for open source and its projects. Cal also asks the group about how contributing to open source has helped (or hurt) their career. There's also some discussion about leadership and management in open source projects. The group also shares some of the "worst" things they felt when making their first pushes to an open source project.

You can listen to this latest show either using the in-page audio player or by downloading the mp3 directly. If you enjoy the episode and want to hear more (and other interviews with members of the PHP community) be sure to subscribe to their feed and follow them on Twitter.

tagged: voicesoftheelephpant community boozetalking contribute opensource project roundtable

Link: https://voicesoftheelephpant.com/2015/12/01/its-the-booze-talking-contributing-to-open-source/

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/

Facebook HipHop Open Source Blog:
Under the hood: Box's HHVM migration
Jul 20, 2015 @ 11:17:58

The Facebook HipHop Open Source blog has posted a case study from Box about their migration to HHVM and some of the challenges and benefits that came along with it.

Reducing latency and increasing the capacity of our infrastructure have always been top priorities at Box. We strive to deliver the best possible user experience in the most efficient manner, and historically our choice of PHP hasn’t aligned well with these goals. I'm very happy to report that we've recently made very significant strides toward these two ideals by successfully deploying HHVM (the HipHop Virtual Machine) as the exclusive engine that serves our PHP codebase. In the rest of this post, I will detail how we use PHP, how HHVM works, the challenges we faced migrating to HHVM, and the remarkable performance wins it provides.

The post talks about how central PHP is to their overall technology stack and how, despite the work being put in, the processing of requests was starting to be a bit too much. In came the HHVM and some discussion about how it might be used there at Box. They started a yearlong effort to migrate their entire stack to HHVM especially since HHVM has almost reached parity with the PHP language itself. They talk some about the differences in design between the two and how the migration changed their deployment process. They also cover some of the other interesting things that come with a major migration including phased rollout and host-based conversion methods. Finally they share some of the statistics around the performance of the end result, including the better response times and reduced CPU graphs.

tagged: hhvm hiphop opensource blog box migration

Link: https://code.facebook.com/posts/1607907626123431/under-the-hood-box-s-hhvm-migration/

Community News:
Launching Today: The Code Climate Platform
Jun 22, 2015 @ 09:57:56

Code Climate, the popular static code analysis service, has made an announcement that will definitely help make checking your PHP application for quality and security issues easier - the release of the Code Climate Platform. This platform provides, among other things, a command line tool that you can use to run their analysis rules on your own systems.

Today, we’re thrilled to launch the Code Climate Platform − the first open, extensible platform for all types of static analysis. [...] What does this mean exactly? First, we’re open sourcing our analysis tools, including the engines and algorithms we use to evaluate code. We’re also enabling anyone to write static analysis engines that run on our servers by following a simple specification. [...] Finally, using our new Code Climate CLI, you can now run any Code Climate-compatible static analysis on your laptop – for free.

This is a great step forward to helping ensure the overall quality of your codebase and makes it even easier than having to rely on a fully external service for the results. Plus, with the specification you can write rules and customize the checks according to your application or framework of choice. They have a developer program you can register for to find out more information about that.

tagged: codeclimate static analysis tool commandline platform opensource specification developer program

Link: http://blog.codeclimate.com/blog/2015/06/19/code-climate-platform/