Michelangelo van DamBack from LoneStarPHP 2015 (27.4.2015, 18:39 UTC)
LoneStarPHP 2015
Listening to Phil Sturgeon (courtesy of Ben Marks) at LoneStarPHP 2015
I returned earlier this week from LoneStarPHP 2015, a community PHP conference held in Addison, a suburb of Dallas, Texas.
This conference was a three-day event, with a full day reserved for tutorial sessions where experts from all over the world gave full training and hands-on workshops on subjects like PHP foundations, unit testing, systems administration, API's, security and performance. A great decision made by the conference organizers to run a full day for training. 
Standing in line for a true Texas BBQ at Hard Eight BBQ
LoneStarPHP has a reputation to offer a true Texas BBQ to all speakers, and this year it was again a big success. We ended up at the "Hard Eight BBQ", one of the best BBQ restaurants in the US. A quarter pound of very tasty brisket, some Galapeño Chicken Poppers, Spicy Sausage and a few Spare Ribs were on my plate. Just the amount of meat I could handle without getting a meat overdose.
The second and third day were all about PHP. Speakers were giving 50 minute sessions starting at 9am all the way until 5pm. LoneStarPHP attendees were given the best of the best and the audience loved it.

Jeff Carrouth goes over the SOA architecture
I learned interesting things about Dependency Injection, Composer , API's, SOA's, Security, Testing, Guzzle to consume HTTP, Speaking at Conferences, Teaching Kids to Code and What it takes to run a tech company.
Between sessions there was of course the "hallway track", discussions between attendees about all kind of subjects which many consider the most important part of any conference.

Truncated by Planet PHP, read more at the original (another 2337 bytes)

SitePoint PHPGenerating PHP Documentation with Sami (27.4.2015, 16:00 UTC)

Documenting your methods, classes, and functions is becoming second nature for everyone, so it makes sense to have a way to generate a separate documentation instead of navigating through the source code. In this article, I’m going to introduce you to Sami, the new API documentation generator.

Image of a large tome

What Is a DocBlock?

A DocBlock is a multi-line comment inserted at the top of an implementation (Class, Interface, Method, Attribute…etc). To clarify this, let’s use some code snippets from Laravel.

abstract class Manager
   * The application instance.
   * @var \Illuminate\Foundation\Application
  protected $app;

   * Create a new manager instance.
   * @param \Illuminate\Foundation\Application $app
   * @return void
  public function __construct($app)
    $this->app = $app;

The DocBlock must start with a /**, end with a */, and every line in between should start with a *.
When defining a class attribute or a method, we write a description, and one or more annotations to define more information about the implementation. In these examples, the @param and @var annotation tags were used. You can visit the documentation for each of these annotations to view a list of annotations phpDocumentor supports.

Continue reading %Generating PHP Documentation with Sami%

Nomad PHPScaling PHP Applications With Redis (27.4.2015, 12:47 UTC)

Scaling PHP Applications With Redis

Presented By
Josh Butts
July 23, 2015 20:00 CDT

The post Scaling PHP Applications With Redis appeared first on Nomad PHP.

Brandon SavageWhy estimates never work (27.4.2015, 12:00 UTC)

Somewhere, right now, a project manager is compiling estimates on a software project and coming up with a completion date based on “velocity” and “scope”. When they’re done, they’ll take their completed work and show it to their boss, who will look it over, and set a “hard date” for delivering the project. There will […]

The post Why estimates never work appeared first on BrandonSavage.net.

SitePoint PHPInspecting PHP Code Quality with Scrutinizer (25.4.2015, 16:00 UTC)

We’ve gone through a decent number of tutorials about code quality, inspections, auto-build systems and so on here at SitePoint:

In this article, we’ll take a look at Scrutinizer CI - a continuous integration tool that’s quite expensive and closed to private projects, but very handy for public ones.

Scrutinizer vs/+ Travis

Scrutinizer is kind of like your online version of Jenkins and the tools suggested in the 4-part series mentioned in the introduction of this post. It supports PHP, Ruby, Python and to an extent JavaScript out of the box.

Continue reading %Inspecting PHP Code Quality with Scrutinizer%

Nomad PHPPHP Files: An Introduction (24.4.2015, 21:01 UTC)

Speaker: Jacques Woodcock @jacqueswoodcock Working with files in PHP can be a fun and a frustrating task; one you never know when you’ll be asked to do. In this talk, we’ll go over how to work with files and some of the most common built in functions to help accomplish your tasks.

The post PHP Files: An Introduction appeared first on Nomad PHP.

Hasin HayderGetting rid of Redux Framework annoyances (24.4.2015, 16:14 UTC)
SitePoint PHPSending Emails in PHP with PHPMailer (24.4.2015, 16:00 UTC)

PHPMailer is the most popular open source PHP library to send emails with. It was first released way back in 2001 and since then it has become a PHP developer’s favorite way of sending emails programatically, beside a few other fan favorites like Swiftmailer.

Emails flying stock picture

In this article we’ll talk about why you should use PHPMailer instead of PHP’s mail() function and we’ll show some code samples on how to use this library.

Is it an alternative to PHP’s mail() function?

In most cases, it’s an alternative to PHP’s mail() function, but there are many other cases where the mail() function is simply not flexible enough to achieve what you need.

First of all, PHPMailer provides an object oriented interface, whereas mail() is not object oriented. PHP developers generally hate to create $headers strings while sending emails using the mail() function because they require a lot of escaping - PHPMailer makes this a breeze. Developers also need to write dirty code (escaping characters, encoding and formatting) to send attachments and HTML based emails when using the mail() function whereas PHPMailer makes this painless.

Continue reading %Sending Emails in PHP with PHPMailer%

blog.phpdevInvoke and Gatekeeper for Route Authentication & Authorization (24.4.2015, 12:59 UTC)

As a part of a new project I’m working on (personal, not work) I came across a common need to enforce authentication and authorization handling in a bit more automated way based on the URL requested. I looked around for options and didn’t really find many that could be implemented somewhat simply but I did like the way Symfony defines their YAML to enforce auth* on the various endpoints. I set out to make something similar but a little simpler and ended up making Invoke.

It’s a super simplified version of the YAML-based routing and only has functionality for checking groups and permissions right now, but that’s not what I really wanted to talk about in this post. Invoke is fun and all, but I wanted to show how I’ve integrated it with another more robust tool I’ve written, Gatekeeper. The goal of Gatekeeper is to make a simple drop-in authentication system for applications to take care of a lot of the boilerplate user management needs. It comes with the usual CRUD handling for users, groups and permissions (RBAC) and also supports password resets, security questions and “remember me” functionality. Again, Gatekeeper is a cool library but it’s not the primary focus here. I wanted to integrate the two libraries so I could let each do what they do best – Invoke to check the current user against a set of criteria and Gatekeeper to provide the data for this validation.

Invoke lets you hook in your own users via a `UserInterface` that you can implement in your own application. In this case Gatekeeper has a concept of users too, but they don’t exactly mesh with what Invoke is expecting. So, let’s make an Invoke-compatible user object that it can use for it’s checks. This is the real key to the integration:

use \Psecio\Gatekeeper\Gatekeeper as Gatekeeper;

class InvokeUser implements \Psecio\Invoke\UserInterface
  private $details = array();

  public function __construct(array $details)
    $this->details = $details;

  public function getGroups()
    $groupSet = array();
    $groups = Gatekeeper::findUserById($this->details['id'])->groups;
    foreach ($groups as $group) {
      $groupSet[] = new InvokeGroup($group);
    return $groupSet;

  public function getPermissions()
    $permSet = array();
    $permissions = Gatekeeper::findUserById($this->details['id'])->permissions;
    foreach ($permissions as $permission) {
      $permSet[] = new InvokePermission($permission);
    return $permSet;

Then, we’ll define the Invoke configuration in a YAML document:

  protected: on
  groups: [test]
  permissions: [perm1]

In this case we’re telling Invoke that when it sees the requested URL of `/event/add` it should check a few things:

  • That the user is authenticated (protected: on)
  • That the user has a group with the “name” attribute of “test”
  • That the user has a permissions with the “name” attribute of “perm1″

If the user passes all of these checks, they’re good to go. Here’s how that would look in the execution of the Invoke code:


$en = new \Psecio\Invoke\Enforcer(__DIR__.'/config/routes.yml');

// If you're already using Gatekeeper for user management, you
// can just use this:
$userData = Gatekeeper::findUserById(1)->toArray();

// Otherwise you can push in your own user data
$userData = array(
  'username' => 'ccornutt',
  'id' => 1,
  'email' => 'ccornutt@phpdeveloper.org'

$allowed = $en->isAuthorized(
  new Confer\InvokeUser($userData),
  new \Psecio\Invoke\Resource()

if ($allowed === false) {
  // They're not allowed on this resource, forward to an error!


The Invoke Resource by default looks at the current REQUEST_URI value so no options are needed when it’s created.

I’ve found this a pretty simple way to integrate these two libraries while still maintaining the correct separation of concerns enough to let each tool do their job. I’m always welcome to feedback on both projects or, of course, PRs if you find something that needs improving or a bug to fix.

Here’s more information about each of them:

Nomad PHPFear Not the Machine of State! (24.4.2015, 05:00 UTC)

Fear Not the Machine of State!

Presented By
Yitzchok Willroth
July 23, 2015 20:00 CEST

The post Fear Not the Machine of State! appeared first on Nomad PHP.

LinksRSS 0.92   RDF 1.
Atom Feed   100% Popoon
PHP5 powered   PEAR
ButtonsPlanet PHP   Planet PHP
Planet PHP