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

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/

SitePoint PHP Blog:
OctoberCMS CRUD – Building a Team/Project Management Plugin
Jan 28, 2016 @ 10:32:47

The SitePoint PHP blog continues their series covering the use of the OctoberCMS product to create a custom content management system tailored to your needs. In this new part of the series they show how to build a custom plugin for team management, showing how to use models and controllers along the way.

So far, we covered different aspects of OctoberCMS. This is a follow up article to discover how to use OctoberCMS for CRUD applications and take a detailed view at how to work with models, relations and controllers. [...] We are going to build a project management plugin where you can add different users to teams and assign them to projects.

You'll need to follow the first part of the series if you want to be able to follow along. Once you have that set up they show how to use the artisan command to create the plugin scaffold code and what the resulting pluginDetails function should look like. The tutorial then shows you how to create the related database tables and how to add the "team" column to the current user table. They then get in to creating the models to work with the tables, building out the controllers and view to manage the teams and the same kinds of handling for the "projects" the teams are related to. The post ends with a look at creating lists of projects/teams, adding in filtering and working with permissions for the management of teams.

tagged: octobercms series plugin custom team project management

Link: http://www.sitepoint.com/octobercms-crud-building-a-teamproject-management-plugin/

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

Jordi Boggiano:
New Composer Patterns
Dec 21, 2015 @ 11:52:36

Jordi Boggiano, lead developer on the Composer has posted about some of the new Composer patterns that have been introduced into the tool this year, including some you might not even have realized.

Here is a short update on some nice little features that have become available in the last year in Composer.

He includes five of these features in his list (but something tells me these are just some of the more user-facing improvements the project has introduced):

  • Checking dependencies for bad patterns
  • Referencing scripts to avoid duplication
  • Defining your target production environment in composer.json
  • Excluding paths from the optimized classmap
  • Requiring packages easily and safely

For each item he includes the command (and sometimes optional arguments) that make it work and what kind of results you can expect. There's definitely some handy features in here and not just for the "power users" in the crowd.

tagged: composer feature update project patterns duplication environment classmap

Link: http://seld.be/notes/new-composer-patterns

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/

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

ThePHP.cc:
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/