SitePoint PHPWhat Is Laravel Valet, and Why All the Fuss? (6.5.2016, 16:00 UTC)

Yesterday, Taylor Otwell released Laravel Valet.

Valet icon

If you're just interested in the broad strokes of what it is, who it's for, and how it works, watch the funny (and slightly NSFW) video below. If you'd like to go more in depth and find out some more details about the product, and learn why it caused such a polarizing fuss on Reddit and Twitter, read on after the jump.

Broad strokes

Valet is a tool which makes spinning up demo or discardable projects a breeze.

It's a tool which combines some of the default software on OS X with some ideas about filepaths and serving of PHP apps, and some additional tools for skipping the need to modify the /etc/hosts file. Additionally, it allows for forwarding of access to the local application over the public internet when needed.

Unlike Vagrant or Docker It offers no isolation, making all apps use the same globally available software. Why this is important to note will be explained below.


Let's dive into the particulars, one by one.

OS X only

Valet is currently OS X only. This is currently the number one complaint from newcomers running into Valet.

While, technically, it should be possible to make it work on Linux given the amount of architecture the two systems share and the fact that most Linux distros have an old version of PHP pre-installed, Windows will likely never become an option without a full, OS-specific rewrite.

It's not a conspiracy. Taylor does not belong to the cult of Apple, and he isn't trying to be elitist. It's just very easy to develop projects like these for OS X because of a very good package manager (Homebrew) and sensible defaults already being pre-installed.

Continue reading %What Is Laravel Valet, and Why All the Fuss?%

PHP ClassesNotable PHP package: PHP Tracking User Activity (5.5.2016, 19:30 UTC)
By Manuel Lemos
Sometimes it is necessary to understand what is going on the browser side to verify if what the user is seeing is the same as he is expected to see after certain interactions.

This class can address this need with the help of jQuery plugin that can capture screenshots of the current page after certain user interaction events like click or form submissions for instance.

The PHP class receives the screenshot images sent by AJAX and records logs of the associated activities so the developers can analyze it in the future to determine what could be wrong and fix eventual issues.

Read this article to learn more details about how this notable PHP package works.
Nomad PHP10 GIT Tips and Tricks (5.5.2016, 16:19 UTC)

Speaker: Sebastian Feldmann @movetodevnull Git is a powerful version control system and a lot of us are using it every day. In this lightning talk I will show you 10 git related tips and tricks, you may not know, that will make your daily live easier.

The post 10 GIT Tips and Tricks appeared first on Nomad PHP.

PHP ClassesPHP 7 Migration Guide Part 4: New Classes, Interfaces and New Global Constants (5.5.2016, 04:09 UTC)
By Atif Shahab Qureshi
In the previous part of this migration guide tutorial series it was covered new and changed functions in PHP 7.

But maybe more interesting to all developers that live and breathe Object Oriented Programming every day is what is new in terms of built-in classes and interfaces.

Read this article to learn not only about new classes and interfaces added in PHP 7 but also relevant global constants.
SitePoint PHPBuilding a SparkPost Client: TDD with PhpUnit and Mockery (4.5.2016, 16:00 UTC)

In a previous post, we looked at SparkPost (as an alternative to Mandrill), and explored a bit of the official PHP client. The official client handles a decent amount of work, but I got to thinking about what it would take to build a new client.

The more I thought about it, the more it made sense. I could learn about the SparkPost API, and practice Test Driven Development at the same time. So, in this post we'll look to do just that!

Home page screenshot

You can find the code for this post on Github.

Getting Started

To begin, we're going to need Guzzle to make requests to the SparkPost API. We can install it with:

composer require guzzlehttp/guzzle

In addition, we're going to be writing tests early, so we should also install PHPUnit and Mockery:

composer require --dev phpunit/phpunit mockery/mockery

Before we can run PHPUnit, we need to create a configuration file:

<?xml version="1.0" encoding="UTF-8"?>


This configuration file handles a number of things:

  1. Many of the root node attributes are sensible, intuitive defaults. The one I want to draw particular attention to is bootstrap: which tells PHPUnit to load Composer's autoload code.
  2. We tell PHPUnit to load all files ending in Test.php, in the tests folder. It will treat all files with this suffix as though they are class files with a single class each. If it can't instantiate any of the classes it finds (like abstract classes) then it will just ignore those.
  3. We tell PHPUnit to add all PHP files (from the src folder) to code coverage reporting. If you're unsure what that is, don't worry. We'll look at it in a bit...

We can now run:


... and we should see:

New phpunit screen

Continue reading %Building a SparkPost Client: TDD with PhpUnit and Mockery%

PHP ClassesTurn Your WordPress Site into More Than One Blog with the Easy Content Types Plugin (4.5.2016, 04:07 UTC)
By Elma Dilaver Gheith
WordPress started as a blogging platform but thanks to many thousands of plugins, nowadays it can be practically anything else other than a blog.

The custom post types feature is very powerful because it can turn what would be a blog post page into anything, as long as you know how to take advantage of it or you can use a plugin to simplify your task.

Read this article to learn about the Easy Content Types plugin and you can use it to easily create new custom post types, taxonomies and meta boxes.
Qafoo - PHPNever Use null (3.5.2016, 08:00 UTC)
When doing code reviews together with our customers we see a pattern regularly which I consider problematic in multiple regards – the usage of null as a valid property or return value. We can do better than this.
PHP ClassesPHP Articles Report April 2016 Edition (3.5.2016, 05:34 UTC)
By Manuel Lemos
This is the April edition of the podcast hangout recorded by Manuel Lemos and Arturs Sosins to comment on the latest outstanding PHP Articles published recently.

They commented on articles about PHP source code protection solutions, the parallax WordPress theme, email verification solutions, PHP 7 backwards incompatible changes and new features, and fast debugging methods using PHPEd.

Listen to the podcast, or watch the hangout video to learn more about these PHP articles.
PHP ClassesNotable PHP package: Scripd (3.5.2016, 04:31 UTC)
By Manuel Lemos
Every SQL database driven application needs to update the database schema once in a while to support new features.

This class can perform that process of generating SQL for database updates with elegance, as it allows developers to defined database schema additions in a JSON based file format, so it can work with different types of databases.

Since the format is based in JSON it can be used eventually by similar packages written in other languages.

Not only it supports the creation and modification of databases, tables and indexes, but it also supports triggers, views, stored procedures and functions.

Read this article to learn more details about how this notable PHP package works.
Voices of the ElePHPantInterview with Rachel Baker (3.5.2016, 04:00 UTC) Link
LinksRSS 0.92   RDF 1.
Atom Feed   100% Popoon
PHP5 powered   PEAR
ButtonsPlanet PHP   Planet PHP
Planet PHP