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

Rob Allen:
Using HTTP/2 with PHP 7 on Mac
Aug 31, 2016 @ 12:54:47

Rob Allen has a quick post to his site showing you how to use PHP 7 with HTTP/2 on OSX with some help form the Homebrew package management tool and curl with HTTP/2 support.

If you want to use HTTP/2 with PHP on OS X, you need a version of curl compiled with HTTP/2 support. You can then link your PHP's curl extension to this version.

He walks you through the "brew install" of the required packages, correctly linking the curl binary and testing the HTTP/2 support. He also includes a bit of sample code using Guzzle to make a HTTP/2 request to a remote site (in this case www.google.it) and the output of the full response with debugging enabled.

tagged:

Link: https://akrabat.com/using-http2-with-php7-on-mac/

Laravel News:
Simple Regex Language is aiming to simplify Regular Expressions
Aug 31, 2016 @ 11:08:23

On the Laravel News site they've spotlighted a tool that can be useful to make working with regular expressions simpler: Simple Regex Language.

Simple Regex Language is a new PHP package that aims to simplify regular expressions using a cleaner written word approach to the syntax.

They provide examples of email address validation both with the "language" the library provides, what it evaluates too and a more "PHP way" of doing it with objects if you're so inclined. You can find out more about the library either from the project website or looking at the code directly on GitHub. You can also find a discussion of the library and some options shared around it in this post on the /r/php subreddit on Reddit.com.

tagged:

Link: https://laravel-news.com/2016/08/simple-regex/

Phil Sturgeon:
PHP-FIG: 3.0 or Rebrand
Aug 31, 2016 @ 10:38:01

Phil Sturgeon has a new post to his site giving a brief overview of the state of the PHP-FIG, the v3.0 proposal that's been put out and sharing some of his own thoughts on both.

I was involved in the PHP-FIG since 2012, and I have seen every conversation, been part of every decision, and know the reasoning for a lot of stuff, regardless of the result and my person preferences. Being so involved with this group for so long, I have a fair bit of context that other people are lacking.

The latest of about four large conversations in the FIG is: whether or not a new organization should take its place. Seeing it framed in this way is odd, because I'm not sure anyone is literally proposing that.

Phil covers some of the background behind the PHP-FIG group including some of the original goals and how it grew well beyond the "framework" part of its name. He talks about some of the reasons he sees that the group has stayed around. Then he gets into the FIG v3.0 proposal - a relaunch of the group with a different structure and different way of getting things done (after learning from some of the mistakes in the current group). He also talks about the other elephant (elePHPant?) in the room: whether this new structure calls for a new group to be formed or if the PHP-FIG should just adapt and move on.

It will be interesting to see how this all shakes out in the end but the PHP-FIG group has, undoubtedly, helped to usher in a lot of the "modern PHP" work we see in the community now especially when it comes to things like Composer, logger structure and middleware handling.

tagged: phpfig v3 proposal organization structure framework psr

Link: https://philsturgeon.uk/php/2016/08/30/php-fig-3-0-or-rebrand/

Sound of Symfony:
Episode 15 - Live from Barcelona
Aug 31, 2016 @ 09:30:17

The Sound of Symfony podcast, with hosts Magnus Nordlander and Tobias Nyholm, has released their latest episode today - Episode #15: Live from Barcelona.

In another of our conference specials, Tobias, Magnus and Ryan is live from Symfony Catalunya 2016 in Barcelona. We talk about the conference, and, trying make the most of being around some of the experts in the community, we talk to Marc Morera and Michael Cullum about building local PHP communities.

You can listen to this latest episode either using the in-page audio player or by downloading the audio file directly. If you enjoy the show be sure to also follow them on Twitter and subscribe to their feed for more information on when the latest episodes are released.

tagged: soundofsymfony podcast ep15 barcelona live symfonylive spain

Link: http://www.soundofsymfony.com/episode/episode-15/

Community News:
Recent posts from PHP Quickfix (08.31.2016)
Aug 31, 2016 @ 08:05:02

Recent posts from the PHP Quickfix site:

tagged:

Link:

Cloudways Blog:
How To Create Simple Rest API In Symfony 3.1
Aug 30, 2016 @ 12:59:10

The Cloudways blog has posted a new tutorial helping you get up and running quickly with a simple REST API written using the Symfony framework. In the article they not only explain how to create the API but also include a bit of REST theory for those not completely familiar with the terms and functionality involved.

Symfony is fast becoming the favourite framework among developers for rapid application development. And despite releasing Symfony 3.1 and 3.2 in the previous quarter, they are still introducing many changes and upgrades. If you’re still using the previous versions, you must upgrade Symfony Framework to the latest and stable version 3.1.

Yes! We know that Symfony is one of the best frameworks to develop rest API, so in this article we will make simple rest API in Symfony 3.1. I am assuming that you’ve already setup PHPstack application on Cloudways with Symfony installed, but if you haven’t, follow this installation guide.

They briefly talk about the REST HTTP verb types and what kind of actions they relate to. With that defined the tutorial then gets into the requirements including the installation of two bundles: JMSSerializerBundle and NelmioCorsBundle. From there examples of configuration changes, commands to make users and execute migrations on the local database are included. With this system set up they include sample code for each HTTP verb type letting you perform the actions on the User entity (create, read, update and delete).

tagged: symfony rest api simple tutorial introduction phpstack

Link: https://www.cloudways.com/blog/rest-api-in-symfony-3-1/

SitePoint PHP Blog:
Local Composer for Everyone! A Conference-Friendly Satis Setup
Aug 30, 2016 @ 11:13:30

On the SitePoint PHP blog editor Bruno Skvorc has posted a tutorial showing you how to set up the Packagist alternative, Satis, in a local network configuration instead of requiring users to still access the external web.

While preparing my technical materials for WebSummerCamp, I realized my workshop would rely on a fairly stable internet connection, as we’d have a lot of ground to cover and a lot of packages to install. Rather than rely on the gods of live demos, or pre-installing everything and ruining the experience, I picked another route.

In this post, I’ll show you how to set up a local Satis instance and have it host the packages over the network it’s currently on, so that everyone who’s also connected to it can put the address into composer.json as a custom repository source, and retrieve all packages from your machine locally – no internet connection required!

He then shows you how to set up the system on a Homestead Improved VM locally, cloning Satis inside of it. He includes an example of the configuration of his required packages and how to build the local repository using this setup. Then, using the built-in PHP web server, he shows the result of the setup and how to access it from other machines. Finally, a few updates are required to the user's composer.json to use the local versions instead of the normal remote connection for the package downloads.

tagged: composer satis local network tutorial setup configuration example

Link: https://www.sitepoint.com/local-composer-for-everyone-a-conference-friendly-satis-setup/

Laravel News:
Controller Construct Session Changes in Laravel 5.3
Aug 30, 2016 @ 10:45:13

On the Laravel News site there's a post detailing some of the updates made to session and controller handling in v5.3 of the framework. It mostly revolves around how the middleware handling changed on each request from v5.2.

Back in laravel 5.2, a developer was able to interact with the session directly in a controller constructor. However, this has changed in laravel 5.3.

The difference between how the 5.3 & 5.2 handle an incoming request is that in 5.2 the request goes through 3 pipelines: global, route and controller [...] In 5.3 the request goes through only 2 Pipelines: global and route/controller (in one pipeline).

The post includes a quote from Taylor Otwell (creator and lead developer of the framework) about why this change was made. Then it shows an alternative to directly accessing this session information in your controllers: a Closure-based middleware in the constructor to execute your checks.

tagged: laravel controller session update access middleware change v53

Link: https://laravel-news.com/2016/08/controller-construct-session-changes-in-laravel-5-3/

Voices of the ElePHPant:
Interview with Colin O'Dell
Aug 30, 2016 @ 09:22:11

The Voices of the ElePHPant podcast has posted another episode in its series of video interviews with members of the PHP community from this year's php[tek] conference. In this latest show how Cal Evans talks with Colin O'Dell.

They talk about speaking at conferences, how *Colin* got started in his own speaking. They also cover the presentation *Colin* gave at php[tek] this year covering security related to security, learning about it from the perspective of a hacker rather than a developer. *Colin* also shares what he sees as one of the largest issues developers forget about: trusting data too much.

You can catch this latest episode either through the in-page audio/video player or you can download the mp3 to listen at your leisure. If you enjoy the show be sure to subscribe to their feed and follow them on Twitter.

tagged: voicesoftheelephpant community interview colinodell podcast

Link: https://voicesoftheelephpant.com/2016/08/30/interview-colin-odell/

Community News:
Latest PECL Releases (08.30.2016)
Aug 30, 2016 @ 08:05:02

Latest PECL Releases:

tagged:

Link: