Subscribe! Enter your email address below:

NO SPAM: We absolutely hate spam. We will not share, rent, or give away your email address to anyone.You can unsubscribe at any time. Easily!

November 16, 2017

Hello and welcome to the latest @phpweeklynews.

This week the PHP development team announced the immediate availability of PHP 7.2.0 RC6. This is the sixth and hopefully final release candidate for PHP 7.2.0, with its imminent arrival later on this month. 

Also this week, with WordPress 4.9 due to be released soon, several defects were uncovered through testing of RC2, which has resulted in the availability of a third release candidate.

Voting for the Symfony awards ends on Thursday evening, so you only have a few hours to choose your favourite community members.

Plus we take a look at the authentication system in Laravel to create a custom authentication guard within the framework.

And finally, the latest Zend Framework Quick Bites podcast announces the creation of a new course - Zend Expressive Essentials, based on the recently released book of the same name.

Enjoy your read!

Katie and Ade

Please help us by clicking to our sponsor:

encrypt php scripts 
Protect your PHP Code
Why not try SourceGuardian 11. Click here to download a 14 Day Trial copy. Protect your code using Windows, Linux or Mac and run everywhere with our free Loaders.


One Year Without -m
One year ago I blogged about starting a new practice: Not using -m when committing something to Git. -m allows you to directly insert the commit message, which makes the whole process of committing faster, but not necessarily better.

PHP Versions Stats - 2017.2 Edition
It's stats o'clock! See 2014, 2015, 2016.1, 2016.2 and 2017.1 for previous similar posts. A quick note on methodology, because all these stats are imperfect as they just sample some subset of the PHP user base. I look in the logs of the last month for Composer installs done by someone. Composer sends the PHP version it is running with in its User-Agent header, so I can use that to see which PHP versions people are using Composer with.

On The Wings of Audience
A while ago I blogged about best practices for handling exceptional behaviour, not thinking about the significance this writing could have on my career. It had a pretty good response and attracted a lot of attention, but it was just the beginning of an exciting journey...

The Symfony Awards, Voting Ends Tonight!
The Symfony Awards are back this year and you only have a few hours left to vote for them. You voted in 2015? Well, it's time to update your vote and vote for the 2017 edition! Discover all the Awards we'll reward this year.

An Update On The Media Initiative for Drupal 8.4/8.5
In my blog post, "A plan for media management in Drupal 8", I talked about some of the challenges with media in Drupal, the hopes of end users of Drupal, and the plan that the team working on the Media Initiative was targeting for future versions of Drupal 8. That blog post is one year old today. Since that time we released both Drupal 8.3 and Drupal 8.4, and Drupal 8.5 development is in full swing. In other words, it's time for an update on this initiative's progress and next steps.

Tutorials and Talks

How to Verify Phone Numbers with PHP, Symfony and Twilio
In this post we’ll learn how to verify phone numbers with Twilio in a Symfony project. We will discover how to model and validate a user’s phone number, and then use Twilio’s PHP SDK to create a call flow where the user has to enter a 6 digit code to verify themselves.

Attaching React.js to a Template Rendered On The Server with Twig
React.js is a JavaScript view library that allows developers to create interfaces is a structured way based on a hierarchical component structure. React can either create the DOM structure from scratch, or attach to an existing one rendered by the server to speed up first load.

Post Comments to Known with Micropub
Last year I wanted to backup a friend's instagram account, and chose a local Known instance as target.

Data Structure and Algorithm - Shell Sort
In this tutorial, we will learn a simple sorting algorithm - Shell Sort.

SQL Query Optimisation for Faster Sites
With dynamic database-driven websites like WordPress, you might still have one problem on your hands: database queries slowing down your site. In this post, I’ll take you through how to identify the queries causing bottlenecks, how to understand the problems with them, along with quick fixes and other approaches to speed things up. I’ll be using an actual query we recently tackled that was slowing things down on the customer portal of

Auto-Casting Numeric Strings To Int/Float
I recently came across this really helpful PHP trick. You can cast a numeric string to either int or float, depending on its contents, by simply adding 0.

WordPress Sitemap Guide: What It Is and How to Use It
If you’ve ever sat down and read an article on SEO, you’ve probably come across the terms sitemap and/or XML sitemap. But while sitemaps are a fairly common SEO recommendation, there aren’t a ton of deep looks at how XML sitemaps specifically work with WordPress. To fix that, we’re going to take a deep dive into WordPress sitemaps. 

How to Create a Custom Authentication Guard in Laravel
In this article, we’re going to cover the authentication system in the Laravel framework. The main aim of this article is to create a custom authentication guard by extending the core authentication system.

Using Client-Side Encryption for Amazon S3 in the AWS SDK for PHP
The AWS SDK for PHP released an S3EncryptionClient in version 3.38.0. With client-side encryption, data is encrypted and decrypted directly in your environment. This means that this data is encrypted before it’s transferred to Amazon S3, and you don’t rely on an external service to handle encryption for you.

Building ReactPHP Memached Client: Errors And Connection Handling
This is the second article from the series about building from scratch a streaming Memcached PHP client for ReactPHP ecosystem. The library is already released and published, you can find it on GitHub. In the previous article, we created a simple streaming Memcached client for ReactPHP ecosystem. It can connect to Memcached server, execute commands and asynchronously return results. In this article we are going to implement some improvements.

Learn How to Write a Vue JS Wrapper Component
A Vue “wrapper” component is a technique used to integrate a 3rd party plugin with Vue by wrapping it in a custom Vue component. The wrapper technique means that you are likely bringing in a library like jQuery and a jQuery plugin. This combination seems to be the most ubiquitous, and it’s my personal preference when I want to use a jQuery plugin inside of a Vue application. Let’s quickly cover an example of how we might build a wrapper component with a date range picker, which allows you to pick a start and an end date.

Implementing CORS in Zend Expressive
On a recent project, I needed to implement CORS support for my Expressive API. The easiest way to do this is to use Mike Tuupola's PSR-7 CORS Middleware. As this is a standard Slim-Style PSR-7 middleware implementation, we need to wrap it for Expressive, so we make a factory.

So You Ran Composer as Root...
Composer is a PHP dependency manager that’s used in just about any modern PHP application, and it works similarly to how Bundler works for Ruby. Even though Composer itself gives you a warning about not running it as root, lots of people disregard this warning and run it as root anyway. We run into this issue a lot on my open source asset management project, Snipe-IT, so I figured I’d write up how to fix this if you inadvertently (or advertently) ran composer as root.
News and Announcements

PHP 7.2.0RC6 Released
The PHP development team announces the immediate availability of PHP 7.2.0 RC6. This release is the sixth Release Candidate for 7.2.0. Barring any surprises, we expect this to be the FINAL release candidate, with Nov 30th's GA release being not-substantially different. All users of PHP are encouraged to test this version carefully, and report any bugs and incompatibilities in the bug tracking system.

WordPress 4.9 Release Candidate 3
The third release candidate for WordPress 4.9 is now available. A release candidate (RC) means we think we’re done, but with millions of users and thousands of plugins and themes, it’s possible we’ve missed something. In fact, we did miss some things in RC1 and RC2. This third release candidate was not originally scheduled, but due a number of defects uncovered through your testing of RC2 (thank you!), we are putting out another 4.9 release candidate.

Sunshine PHP Conference - 8-10th February 2018, Miami
The SunshinePHP Developer Conference is hosted by the South Florida PHP community (SoFloPHP) in Miami, Florida from February 8th - 10th, 2018, and you're invited! We'll host some of the best speakers, awesome talk topics, latest technologies, and up to date news in PHP. And don't forget our Hack-a-thon and Uncon'ference, as well as a great hallway track! The conference has something for every level of PHP developer. We start on February 8th with a full day of 8 PHP related tutorials and workshops that are each 3 hours of in-depth information. Next we follow that with 2 days on February 9th and 10th containing 5 keynotes and 40 PHP talks over 4 tracks. Early Bird tickets are on sale now.

ConFoo - March 7-9th 2018, Montreal
ConFoo Montreal is a multi-technology conference for web developers, with 155 presentations by popular international speakers, focused on pragmatic solutions for web developers. Great content and an amazing experience. Discounted tickets are on sale now.

Oscon - July 16-19th 2018, Portland
The 20th Open Source Convention takes place next July. From architecture and performance, to security and data, get expert full stack programming training in open source languages, tools, and techniques. Further announcements to come, but for now Save The Date!

Nomad PHP US - December 21st 2017 20:00 CST
Tackling the Beast: How to Gradually Upgrade a Legacy Code Base to PHP 7, presented by Ann Gaffigan. Hypothetically speaking, what if you wanted to change all of the lightbulbs in your house to use LED bulbs, but your current wiring didn’t support LED bulbs? You would need to re-wire your house, which would take a long time. In the meantime, you wouldn’t have any working electricity. Is there a better way? What if there was an adapter that could transition LED to work with old wiring if necessary, or if the wiring was new, just work as usual? That’s a metaphor for how I figured out how to gradually upgrade a legacy (LAMP) code base to be compliant with PHP 7.0. Since PHP deprecated the MySQL extension functions as of PHP 5.5.0 and removed in 7.0, we needed to transition a LOT of code in a legacy system to use the modern MySQLi extension functions. In trying to figure out how to upgrade the code base without ceasing new development on the system, we decided to use an adapter database class to allow us to transition gradually. In this session, we’ll explain how the adapter class works and also the rules we put in place to ensure there was an end to the transition tunnel.

Nomad PHP EU - December 21st 2017 20:00 CET
Implementing Serverless PHP, presented by Rob Allen. Serverless applications have a number of benefits and JavaScript is the most common language to write serverless functions in. Why not PHP? In this talk, I will discuss how I implemented first class PHP support into the Apache OpenWhisk platform. We’ll start by looking at OpenWhisk’s architecture and what happens when you invoke a function. Then, I’ll show you how I implemented the PHP support and walk though some example PHP serverless actions.


Laravel IO Podcast Season 3: Episode 6 - Interview: Jeffrey Way
An interview with Jeffrey Way, the founder of Laracasts.

Voices of the ElePHPant - Interview with Alan Seiden
This week Cal Evans talked to consultant, developer and specialist, certified in Zend Framework, Alan Seiden.

Changelog Podcast #270: Rails as a Day Job, Diesel on the Side
Sean Griffin joins the show to talk about doing Rails full-time, his love of Rust. and his project Diesel - a safe, extensible ORM and query builder for Rust. We discuss Sean’s path to working full-time on Rails, what he works on specifically, why Rust, why Diesel, and how much of Diesel’s design and feature set is a product of his experience with ActiveRecord and Rails.

Full Stack Radio Podcast Episode 76: Tailwind CSS vs. the World
In this episode, Adam is joined by Jonathan Reinink to discuss Tailwind CSS, a new utility-first CSS framework that they just released. They talk about what Tailwind is, how it works, and what makes it different than component-based frameworks like Bootstrap or other utility frameworks like Tachyons.

MageTalk Magento Podcast #148 - “New Language Bankruptcy”
The guys talk mullets, Shopify's claims, B2B getting hot, and a new thought experiment for 2018: The Deployed OSS Stack.

LaraChat Live - Episode #33: Team Structures - Backend/Frontend/Designers
Today we have a polite (maybe) discussion on team structures, around Backend/Frontend/Designers/etc.

Zend Framework Quick Bites Episode 40: Zend Expressive Essentials - The Course - Is Underway
In this episode, I’m super excited to announce that Pluralsight have given me the go-ahead to create a new course: Zend Expressive Essentials! That’s right, a new course, based on the recently published book (of the same name) Zend Expressive Essentials. If you bought the book, I’m confident you’ll be interested in taking the course.

PHP Ugly Podcast #81: The Date-aversery
Topics include upgrading my network to "normal", and Larachat Live.

North Meets South Web Podcast Episode 37 - Secret Trips, Status Pages, and Communication
In this episode, Michael teases about the secret purpose of his Sydney trip, before moving on to the topic of status pages and reporting service disruptions, as well as communicating with peers.

Reading and Viewing

Cloudways Interview - Iztok Smolic Shares His Passion For Drupal and The Community
Iztok Smolic is the Commercial Director at AGILEDROP, web development company focused on enabling digital agencies to scale their Drupal capacities. Today we sit down and have a chat with Iztok revolving around Drupal.

Joomla! is the Best Free CMS, by 2017 CMS Critic Awards
On November 06th 2017, CMS Critic announced the winners of the CMS Critic Awards 2017. Joomla! has been competing in the Best Free CMS category and won - again!

Intro to Magento: Navigating the Top eCommerce Ecosystem
Magento is an open-source platform for building online stores that also provides omni-channel experiences to your customers. First released in 2008, it has grown continually and become the most popular eCommerce platform. Over 250,000 merchants worldwide are using the Magento Commerce platform, which represents around 30% of the total market share. As big as the Magento ecosystem is, it can easily confuse newcomers. To help orient you, we’ll give an overview of the different approaches and versions of Magento available for building an online store and some of the resources available for doing so.

No More Excuses: Learning to Code is Easier Than Ever
At this point, there is no excuse for not learning to code. There are so many accessible online and affordable courses that can help you build a foundation and work on your timeline. You might think you must go through an online college program to find these online educational courses, not true. The Learn to Code 2018 Bundle is a comprehensive course load, taught by experts in the industry, that will give you a thorough base to coding-and it’s super affordable.


Do you have a position that you would like to fill? PHP Weekly is ideal for targeting developers and the cost is only $50/week for an advert.  Please let me know if you are interested by emailing me at [email protected]

Interesting Projects, Tools and Libraries

phpBB is a popular open-source bulletin board written in PHP. This repository also contains the history of version 2.

Thruway is an open source client and router implementation of WAMP (Web Application Messaging Protocol), for PHP. 

A PHP library for communicating with the Twilio REST API and generating TwiML.

A flexible, elegant and easy-to-use content management system, which is both free and open source.

A high-performance project management system in PHP.

A flawless framework for building scalable and testable API-Centric Apps with PHP 7 and Laravel 5.5.

A little more than a lightweight SQLite Blog-Engine.

A lightweight data mapper designed to take advantage of PHP 5.3+.

Collection of development libraries to speed PHP development.

Create a Phar (PHp ARchive) file of your Composer based PHP application.

Zephir - Ze(nd Engine) Ph(p) I(nt)r(mediate) - is a high level language that eases the creation and maintainability of extensions for PHP.

Repo for OpenCFP project, a PHP-based conference talk submission system.

Please help us by clicking to our sponsor:

encrypt php scripts 
Protect your PHP Code
Why not try SourceGuardian 11. Click here to download a 14 Day Trial copy. Protect your code using Windows, Linux or Mac and run everywhere with our free Loaders.

So, how did you like this issue?

Like us on FacebookFollow us on Twitter
We are still trying to grow our list. If you find PHP Weekly useful please tweet about us! Thanks.
Also, if you have a site or blog related to PHP then please link through to our site.

unsubscribe from this list | update subscription preferences 

Subscribe! Enter your email address below:

NO SPAM: We absolutely hate spam. We will not share, rent, or give away your email address to anyone.You can unsubscribe at any time. Easily!

Talk to us!

If you have some news, want to share a link with us or chat with us feel free to email us.

And we also have an RSS feed that you can use.

Like us on FacebookFollow us on Twitter

Copyright ©