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!

October 19, 2017

Here we are again PHP fans, with your latest edition of

The fourth release candidate for PHP 7.2.0 is out this week, to be tested thoroughly and any bugs and incompatibilities reported.

Also, we look at Part 3 of the deploying my Symfony API series, which looks into the whole deploy process from development to production.

The 20th Oscon has been announced for July next year. No further details as yet, but save the date and watch this space!

Plus we have the 2nd episode in the Ask The PHP Experts webinar series, with discussions this week on how to successfully migrate to PHP 7.

And finally, the Lately in PHP podcast team is back, and they are pondering the possibility of being able to override built-in PHP functions.

Enjoy your weekend, 

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.


Your Unit Test Methods Need Docblocks Too
If you've met me at any time in the previous 20 years and you discussed unit testing with me, chances are pretty big that I'd have told you that your test methods in your unit tests don't really need docblocks, because the test methods would be named in such a way that they were descriptive.

Choose Dependency Injection — If You Can
Some people say, “You don’t need to use dependency injection for everything. Sometimes dependency injection is not the best choice.” It occurs to me that the people who say this are the ones who can’t use it for everything. They say “choose what’s best for your situation”, but their situation precludes the use of dependency injection in the first place.

Drupal Looking To Adopt React
Last week at DrupalCon Vienna, I proposed adding a modern JavaScript framework to Drupal core. After the keynote, I met with core committers, framework managers, JavaScript subsystem maintainers, and JavaScript experts in the Drupal community to discuss next steps. In this blog post, I look back on how things have evolved, since the last time we explored adding a new JavaScript framework to Drupal core two years ago, and what we believe are the next steps after DrupalCon Vienna.

Tutorials and Talks 

Symfony Flex: Paving the Path to a Faster, Better Symfony
Symfony Flex is a modern replacement for the Symfony Installer, and not the name of the next Symfony version. The new Symfony will be called just Symfony 4, and while this tutorial will deal only with the Flex tool, it will mention some Symfony 4 upgrades as well.

Laravel Stats: Code Statistics for your Laravel Projects
Laravel Stats (currently beta) is a package inspired by rake stats that gives you code statistics for your Laravel projects.

PHP-FPM Tuning: Using ‘pm static’ for Max Performance
Lets take a very quick look at how best to setup PHP-FPM for high throughput, low latency and a more stable use of CPU and memory. By default, most setups have PHP-FPM’s PM (process manager) string set to dynamic and there’s also the common advice to use ondemand if you suffer from available memory issues. However, lets compare the two management options based on’s documentation and also compare my favourite for high traffic setups… static pm.

How Can PHP Compare Two Images for Similarity
Some applications need to able to tell if two images are similar in the sense that they show the same thing. The PHP Compare Images Similarity class can be used for that purpose. Read this article to learn about this class and how you can use it in PHP applications for checking if two images are the same or not.

Build a React App With a Laravel Back End: Part 2, React
This is the second and final part of the series on building a React application with a Laravel back end. In the first part of the series, we created a RESTful API using Laravel for a basic product-listing application. In this tutorial, we will be developing the front end using React. We will also consider all the available options to bridge the gap between Laravel and React.

What You Need To Know About Environment Variables with PHP
Environment variables for configuration are today’s best practice for application setup – database credentials, API Keys, secrets and everything varying between deploys are now exposed to the code via the environment, instead of configuration files or worse, directly hard-coded.

How Do I Deploy My Symfony API - Part 3 - Infrastructure
This is the third post from a series of posts that will describe the whole deploy process from development to production. The first article is available here and the second here. In the previous two articles I've covered the steps 1-3 from the schema here below. Before being able to discuss the steps 4-5 we will need to see how to configure the instances properly to be able to deploy our application to a docker-swarm cluster with rolling updates.

Managing Private Dependencies
Using Composer and a private package server is the most efficient way to manage private dependencies with PHP. I recommend using the software as a service, Private Packagist, or Satis, the open source, self-hosted package server. In this article, I’ll show you how to easily set this up for your own projects.

Properly Passing Data from Outer Layers of a PHP Application to the Use Case Layer
Lately, I've been digging a lot in different ways of improving software architecture. Mainly subjects like Clean Architecture, Domain Driven Design, and such. Those topics cover a lot of advanced and complex practices, but today, I want to talk about a simpler subject. What is the best approach to pass data from outer layers of the application (actions, controllers, async jobs, CLI commands...) to services that are part of the use case layer, by taking advantage of some of the practices promoted by those subjects. That's a task which is present in any kind of application, and is very important to get properly done. You usually need to get data from different origins (a HTTP request, the input of the command line...), filter and validate it, and then use it to perform some kind of task. Not doing it in the correct way could cause inconsistencies, or duplications in your codebase.

Creating Datetimes From a Format With a Timezone
I wouldn’t be writing this blog post, if I’d read all the “fineprints” in the PHP manual. Alas, here we are.

How To Use Caddy with PHP and Docker
Caddy is an excellent HTTP/2 web server with automatic HTTPS. The configuration is simple and approachable, providing secure defaults and self-contained binaries that run on every platform. I have found Caddy to be my go-to server for running PHP Docker containers in production. Using the official PHP-FPM image, we can run Caddy and start PHP-FPM in the background within the same container. I find that running PHP-FPM and Caddy together simplifies my stack by eliminating the need for FastCGI network communication between something like Nginx and PHP-FPM.

Pretty Print curl -i
My favourite tool for working with APIs is curl and in particular, I like using the -I switch to view the status line and headers too. What I would like to do is pretty print the body if it's JSON or XML so that it's easier to read.

Installing PHP Packages with Docker and Composer
Package management is a method for importing code (often from open source libraries) and keeping dependencies up to date in a software development project. In PHP, we have a couple ways to manage packages, but the dominant choice for modern PHP development is Composer. While you can install PHP and Composer on your local machine directly, in this tutorial we’ll use Docker, which allows us to run PHP and Composer scripts without configuring either on our system directly.
News and Announcements

PHP 7.2.0 Release Candidate 4 Released
The PHP development team announces the immediate availability of PHP 7.2.0 RC4. This release is the fourth Release Candidate for 7.2.0. 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 Beta 2
WordPress 4.9 Beta 2 is now available! This software is still in development, so we don’t recommend you run it on a production site. Consider setting up a test site just to play with the new version.

Atlas.Orm 2.0 Is Now Stable
I am very happy to announce that Atlas, a data-mapper for your persistence layer in PHP, is now stable for production use! There are no changes, other than documentation updates, since the beta release two weeks ago.

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 - November 16th 2017 20:00 CST
Refactoring Done Right, presented by Brandon Savage. Everybody talks about refactoring, but what’s the best way to actually refactor a part of your application? Come watch a live session where we’ll refactor a piece of code and come away with a well-designed solution. Along the way we’ll learn how to spot candidates for refactoring, and pitfalls to avoid.

Nomad PHP EU - November 19th 2017 20:00 CET
API Tips From the Frontline, presented by Anna Filina. Starting to write an API is an easy task, but you quickly stumble upon many obstacles and hard decisions. How to manage result pagination and input errors? How to handle write operations and file uploads? Join me as I share my tricks that allowed me to ship high-profile projects in record time while keeping the code clean and maintainable.


Lately in PHP Podcast Episode 87 - Improving PHP Possibilities Overriding Built-in PHP Functions
PHP provides many built-in functions that are widely used. One way to improve the possibilities of PHP could be to override the built-in functions with user defined code. The discussion for the support for this possibility was one of the main topics discussed by Manuel Lemos and Arturs Sosins in Episode 87 of the Lately in PHP podcast.

Voices of the ElePHPant - Interview with Chris Pitt
In this episode, Cal talks with Chris Pitt about IoT, lego, robots, and other fun things.

Laravel IO Podcast Season 3: Episode 4 - Interview: J.T. Grimes, Lover of Puppies and Shaver of Ungulates
An interview with Laravel woman around town and lover of puppies J.T. Grimes.

Changelog Podcast #265: The Kotlin Programming Language
Dmitry Jemerov joined the show to talk about Kotlin - a language created by JetBrains that's designed to be an industrial-strength object-oriented language, and a "better language" than Java. We asked Dmitry "Why invent a new language?", talked through Google announcing official Android support, covered some of Kotlin's characteristics, Kotlin vs Swift, and more.

Full Stack Radio Podcast Episode 74: Steve Schoger - Tactical Design Advice for Developers
In this episode, Adam is joined by Steve Schoger to talk about five ways developers can get better at designing their own projects. 

MageTalk Magento Podcast #145 - MAGETALK LIVE at San Diego Magento Meetup
Recorded LIVE at the inaugural San Diego Meetup, we discuss Magento 2.2 in exacting detail. With Brian Lange, Future Commerce.

PHP Ugly Podcast #77: The Pirate Way
Topics include Chrome’s plan to distrust symantec certificates.

Reading and Viewing

Webinar Recap: Avoiding PHP Migration Hiccups
Thinking about migrating to PHP 7? This webinar, the second episode in our Ask the PHP Experts webinar series, included Maurice Kherlakian discussing how to avoiding migration challenges, and Guido Faecke, IT project manager at Swift Transportation, giving us first-hand knowledge on how his organisation made the move to PHP 7.

Cloudways Interview - Bryan Ollendyke Shares His Passion for Drupal and Education
Today we interview a Drupal developer who is transforming the world of education through the use of Drupal. Bryan Ollendyke is the ELMSLN project lead / Head of the ELMS initiative @ Penn State and a leader in DrupalED and Drupal @ Penn State communities.  

LEMP Stack with PHP-7.1
We see how to install and configure a LEMP stack, using Nginx 1.11 and PHP 7.1

PHP Succinctly Kindle Edition (by José Roberto Olivas Mendoza and Chiranjit Hazarika, published 11th September 2017)
Known for its straightforward simplicity, PHP is an open source, general-purpose scripting language oriented for web development. In PHP Succinctly, the authors guide newcomers through PHPs basics, which includes deployment, programming themes such as variables, decision making, arrays, functions, and databases, and the creation of a functional webpage that will connect to a database.

Building RESTful Web Services with PHP 7: Lumen, Composer, API testing, Microservices, and more (by Haafiz Waheed-ud-din Ahma, published 11th September 2017)
Leverage the Lumen framework to build RESTful API endpoints for your applications, and understand how to increase efficiency and security of your web service.


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

Interesting Projects, Tools and Libraries

PartKeepr is an inventory management software, primarily designed for electronic components.

This library allows you to quickly and easily use the SendGrid Web API v3 via PHP.

A web application to build your own web site or blog in seconds, it's completely free and open source.

Increase your traffic, view your stats, speed up your site, and protect yourself from hackers with Jetpack.

This project is a Static Code Analysis tool for PhpStorm and Idea Ultimate.

Yclas self-hosted is a powerful script that can transform any domain into a fully customizable classifieds site within a few seconds.

JTransc (Java Trans Compiler) is an AOT (ahead of time compiler) that compiles .class and .jar files into a target programming language / executable bundling all the required dependencies in a single file or folder, without requiring a jitter or an external runtime.

DOMjudge is a system for running a programming contest, like the ACM ICPC regional and world championship programming contests.

A PHP framework oriented CLI and controller recursive with natif ajax 

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

PHP runtime & extensions header files for PhpStorm.

YAY! is a high level parser combinator based PHP preprocessor that allows anyone to augment PHP with PHP 

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 ©