|A BIG APOLOGY
Hi there PHP fans. Sorry that last weeks edition did not go out. Unfortunately one of our team, Sergey Shetinin, was taken ill and rushed to hospital. Sergey manages the technical side of getting the newsletter out and unfortunately was unable to do so. Our priority was, and is, him. Thankfully he is OK now and recovering from an operation.
Therefore we have created a larger PHP Weekly this week to make up for it!
We are back with a bang, with more tutorials, more announcements, and more podcasts than ever.
Thanks for your understanding and enjoy your read!
Katie and Ade
Please help us by clicking to our sponsor:
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.
My Journey Into Mautic
Whilst on the hunt for the best marketing automation for his various projects, Cal Evans came across Mautic, a PHP based marketing automation software.
10 Best PHP URL Shortener Scripts
The offering of PHP URL shortener scripts bring as much variety and varying degrees of complexity as any other web development solution. Self-hosted URL shorteners can be set up exclusively for private use, but they can also be used for public use as well. No matter what type of shortener solution you're looking for, here are the 10 best PHP URL shortener scripts that will certainly help you get started.
Family CRMs, Guzzle Wrappers and PHP Machine Learning? Sourcehunt!
If you’re new to Sourcehunt, it’s our monthly post for promoting open source projects that seem interesting or promising and could use help in terms of Github stars or pull requests.
VAT Validation Now for PHP 7.1+
When I started my European Commission (EC) VAT Information Exchange System (VIES) project back in 2011, PHP 5.3 was the current version that has given us so much. Earlier that year version 5.2 was announced End-of-Life and everyone was excited about the new features in PHP coming with the 5.3.x releases. But fast-forwarding to today, PHP 7.1 is the latest stable release. I would like to announce that the European Commission (EC) VAT Information Exchange System (VIES) project will no longer support PHP 5 and uses PHP 7.1 features to ensure better security and application control.
Micropub Plugin for Tiny Tiny RSS
I wrote a plugin for the Tiny Tiny RSS feed reader that allows you to reply to blog posts directly from within the application.
Five Tips to Improve Your Unit Testing
After you got the hang of unit testing there is still so much space for improvement. In this post I want to share five tips with advanced testers I have seen to influence testing in the right direction. Do you have additional tips and tricks to improve testing? Please leave a comment!
Zend Framework and PHP 7.1
When we announced Zend Framework 3 last year, one of the changes was setting the minimum supported PHP version to 5.6. Our initial plan was to support 5.6 until it reaches End-of-Life, which occurs 31st December 2018. PHP 5.6, however, stopped receiving active support almost five months ago, on 19th Jan 2017. This means that it is no longer receiving bugfixes, only critical security fixes. As such, a number of contributors have been pushing for us to up our minimum supported version to support only actively supported PHP versions, which would mean only PHP 7 versions. In addition to active support, there are other benefits to jumping to PHP 7.
The 5 Best IDEs for WordPress Development (And Why)
I've been developing with WordPress for around ten years now and, during that time, have used my fair share of Integrated Development Environments (IDEs). There's certainly no shortage of choice these days, with literally dozens of different editors/IDEs available. If you're new to coding in WordPress then it can be a little daunting deciding which IDEs to take a look at. Too much choice can initially seem like a disadvantage. In this article, I'll hopefully help make this choice a little easier by covering five of the top web development IDEs currently available.
Tutorials and Talks
How to Install Yii on Windows or a Mac
In todays tutorial, we'll explain how to install Yii in a local development environment for both Windows and macOS. For the Windows guide, we'll rely on WAMP Server, a Windows web development environment for Apache, PHP and Mac, and for the Mac guide, we'll use its cousin, MAMP. Although Rod uses WAMP in todays tutorial, there is also a Windows version of MAMP.
How to Search on Securely Encrypted Database Fields
You know how to search database fields, but the question is, how do we securely encrypt database fields but still use these fields in search queries? Our secure solution is rather straightforward, but the path between most teams asking that question and discovering our straightforward solution is fraught with peril: bad designs, academic research projects, misleading marketing, and poor threat modelling.
Developing a CI Process for Laravel with Codeship and Forge
Codeship empowers developers to efficiently test and deploy web applications with a basic command. Today, I want to demonstrate some of the platforms features through testing and deploying a Laravel application.
Read and Write Google Sheets from PHP
This past week I needed to be able to read some data from a Google Sheet and then update a column for each row after processing it. This sort of thing should be simple, Google is built on APIs and has client SDKs for just about every language. I’ve also integrated with several Google Admin APIs previously so I expected this to be a breeze. I was wrong.
Get Up and Running with Exakat
Exakat is a smart static analysis engine for PHP. It reviews the code fast and produces reports tailored for every need: issues and code smell for programmers, inventories and maps for architect; compilation and configurations lists for sys admins; dashboards for team leaders. Including over 320 analysis and spanning versions from 5.2 to currently WIP 7.2, it helps you audit your code and keep it under control. Let’s see how to get Exakat up and running in 15 mins.
How to Go From Development to Deployment with Docker
Want to know how to both containerise an application AND deploy it to a production environment? In this mammoth tutorial, I'll show you all the steps involved, and provide background information along the way, so you can build on what you’ll learn.
Eliminating Visual Debt
Today we're talking about Visual debt in our code.
Getting Started with Sulu CMS on Vagrant The Right Way™
In this tutorial, we’ll learn how to get started with Sulu CMS the right way – meaning, we’ll deploy a Sulu “Hello World” instance using Homestead Improved and be mindful of performance issues and configuration values while we’re at it. We’ll also cover some common pitfalls, all in an attempt to get a good base set up for future Sulu tutorials. It is recommended you follow along with the instructions in this post and drop a comment with any problems you might run into.
JSON Feed: Fail
Last week someone thought that it's a good idea to invent a new standard for feeds: JSON feed. So in addition to the four incompatible-with-each-other and underspecified RSS formats (RSS 0.90, RSS 0.91, RSS 1.0, and RSS 2.0), the correctly spec'ed Atom format and the HTML-based h-feed we have a seventh one that future feed readers will also have to support.
Introducing Webpack Encore for Asset Management
Functional Programming with Phunkie: Building a PHP JSON Parser
Phunkie is a library with functional structures for PHP. In this two-part tutorial, Phunkie’s creator Marcello Duarte, head of training at Inviqa, explains how to create Parser combinators using the functional library. In the first part of this series we explored parsers and combinators to help you start getting values from functional programming with PHP. We covered the basics using examples, and now we’ll move onto more sequencing and other strategies. Let’s pick up where we left off!
Packagist and The PHP Ecosystem
Packagist is the primary package repository for Composer. This is where you can publish your packages, and also where you can view other peoples packages. In our last blog post, we saw the basics of Composer but skipped over where it actually finds its packages, and how to publish packages of your own. In this blog post, we will be looking at exactly this, plus some security considerations when using composer in your application.
Installing PHPDOC via PEAR When There Are Certificate Problems
There are currently some SSL Certificate issues with installing phpDocumentor from their pear channel. This is how to circumvent those issues, while still installing phpdoc onto a “clean” server that doesn’t even have the phpdoc channel added.
Cybersecurity State of the Union
The cybersecurity landscape is continuously changing as new threats appear and attackers adapt. Data breaches, cyber attacks, identity theft, and scams show up regularly in the news and can have a significant negative impact to those affected by them. Keeping up with the latest cyber security trends, understanding the threats, and keeping applications secure takes an investment of time and effort. In this article, we will review the current state of cybersecurity.
Letting Emacs Into Your Grumpy Heart
Yes, the rumours are true. Your grumpy blogger, a long-time and generally satisfied Vim user has decided to embrace some fear, turn on EVIL mode and give Emacs a fair evaluation.
How To Set Up Newsletters in Magento 2
Before you kick off and start sending newsletters to your customers, it is advisable for you to check a few configuration settings that are present by default in the mailing system. For this purpose, simply login to your admin area and navigate to Stores> Configuration.
Dockerising GitLab Review Apps
Last year GitLab introduced the Review Apps feature. Review Apps are app environments that are created dynamically every time you push a new branch up to GitLab. As a bonus point the app environments are automatically deleted when the branch is deleted. Since we moved to using Docker for quite a few of our projects I was keen on figuring out how to combine Docker and the GitLab Review Apps functionality as the documentation only mentions NGINX as a way to run Review Apps. As it turns out, it is rather simple to deploy docker containers as a Review App.
Default Route Arguments in Slim
A friend of mine recently asked how to do default route arguments and route specific configuration in Slim, so I thought I'd write up how to do it.
How to Build a Cryptocurrency Auto-Trader Bot with PHP?
This tutorial will walk you through the full process of building a bitcoin bot with PHP – from setup, on to your first execution of an automated trade, and beyond.
Invisible reCAPTCHA Integration With Laravel
Invisible reCAPTCHA is an improved version of reCAPTCHA v2 (No CAPTCHA) developed by Google, and users now only need to click the button: “I’m not a robot” to prove they are human.
Filter Input Using zend-filter
When securing your website, the mantra is "Filter input, escape output." We previously covered escaping output with our post on zend-escaper. We're now going to turn to filtering input.
Create Modules and Middleware with Command-Line Tooling Support
For the longest time, Zend Framework hasn't had the strongest command-line tooling and scaffolding support. In stark contrast, other frameworks — especially Laravel, and its excellent Artisan command — have had far stronger tooling support and as a result have been far easier to build projects with. However, that's all changed! Since the release of Zend Expressive Skeleton 2.0.2, Zend Expressive's command-line tooling support has been rapidly developing. It's provided through a package called, aptly, Zend Expressive Tooling.
Libsodium Quick Reference: Similarly-Named Functions and Their Use-Cases
Last Friday at Day Camp 4 Developers, I presented a talk titled Cooking with Sodium in PHP 7.2, which was largely live-demoing the various cryptography features provided by libsodium. One of the questions I was asked by attendees was about knowing which feature to use to solve specific problems. This is the sort of problem that I suspect many people run into, so here's a quick reference table followed by a detailed explanation.
Dynamic Page Templates in WordPress, Part 1
WordPress page templates are a great way to completely alter how particular web pages are displayed. You can use them to add a vast range of functionality to your site. In this tutorial series, I'll be looking at how you can extend page templates to be more flexible, improving their functionality greatly. I'll start by introducing how to create a standard page template via a child theme, before moving on to a more flexible approach where I'll create a general-purpose dynamic page template.
Make your Laravel App Fly with PHP OPcache
Every time you execute a PHP script, the script needs to be compiled to byte code. OPcache leverages a cache for this bytecode, so the next time the same script is requested, it doesn’t have to recompile it. This can save some precious execution time, and thus make your app faster (and maybe save some server costs). This is an easy guide to enable and optimise OPcache for a faster application.
Your first GraphQL API - Introduction
GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. GraphQL provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools. In this series of tutorials, we will start from the basics of building GraphQL API then slowly evolve to more advanced topics.
|News and Announcements
PHP 7.0.20 Released
The PHP development team announces the immediate availability of PHP 7.0.20. Several bugs have been fixed. All PHP 7.0 users are encouraged to upgrade to this version.
PHP 7.2.0 Alpha 1 Released
The PHP development team announces the immediate availability of PHP 7.2.0 Alpha 1. This release marks the beginning of the first minor release in the PHP 7.x series. All users of PHP are encouraged to test this version carefully, and report any bugs and incompatibilities in the bug tracking system.
THIS IS A DEVELOPMENT PREVIEW - DO NOT USE IT IN PRODUCTION!
PHP 7.1.6 Released
The PHP development team announces the immediate availability of PHP 7.1.6. Several bugs have been fixed. All PHP 7.1 users are encouraged to upgrade to this version.
WordPress 4.8 “Evans”
Version 4.8 of WordPress, named “Evans” in honor of jazz pianist and composer William John “Bill” Evans, is available for download or update in your WordPress dashboard. New features in 4.8 add more ways for you to express yourself and represent your brand.
Whoops Is Coming Back in Laravel 5.5
Whoops is a PHP error handler framework that came pre-installed in Laravel 4 and was later removed with the Laravel 5.0 release. It was announced last week that Whoops will be making a come back in Laravel 5.5.
Laravel v5.4.26 Released
Laravel v5.4.26 shipped today. The release contains a few additions, but consists mainly of several interesting changes and bug fixes.
DevConf - June 17-18th 2017 Moscow, Russia
DevConf is the ultimate meeting place for Russian-speaking web-developers, combining several language-specific conferences under one roof. Each section will feature several talks from the active contributors/authors of the language. Tickets are on sale now.
CoderCruise - July 16th-23rd 2017, New Orleans
CoderCruise is the spiritual successor to php[cruise] that was run in 2016. The PHP community had so much fun that we decided we needed to expand the idea to the greater web tech community! This will be a 7-day cruise out of the port of New Orleans that will include 3 days of conference (while at sea) and 3 days at the ports of Montego Bay, Grand Cayman, and Cozumel. We are looking for a broad range of submissions covering a wide range of web technology topics including coding, design, content, and more. Given the scope of this conference, emphasis will be given to talks that appeal to all web technologists regardless of their programming language of choice (or lack thereof). Tickets are on sale now.
Northeast PHP/UX Conference - August 9-11th 2017, Charlottetown, PEI Canada
Now in its 5th year, the Northeast PHP Conference is a web developer conference focused on PHP, Web Technology, and UX. Whilst grounded in PHP, the Northeast PHP Conference is not just about PHP. As the organisers know, most PHP developers are working on websites and applications, which means that they need more than just PHP skills to get ahead. The User Experience and Web Technology talks will help these developers broaden their skill sets and expand their knowledge & experience. Tickets are on sale now.
Pacific Northwest PHP - September 7th–9th 2017, Seattle, WA
The Pacific Northwest PHP Conference is a 3-day event in the Pacific Northwest region of the United States for PHP and Web developers. Our past conferences have included world renown speakers from the PHP community, about a wide range of topics - from APIs and CMS to unit testing and version control. Early Bird tickets are on sale now.
ZendCon - October 23rd-26th 2017, Las Vegas
Now in its 13th year, ZendCon is the "must attend" event and the largest gathering of the PHP and open source communities. ZendCon brings together industry thought leaders, recognised PHP experts, enterprise decision makers, IT managers, dev and ops teams, and independent developers for four days of professional and business development. ZendCon connects the vast open source ecosystem and provides unique opportunities to engage with prominent speakers, community leaders, and vendors. You'll learn about the latest innovations and network with peers to get educated, advance your coding practices, and solve business challenges. Early Bird tickets are on sale now.
Scotland PHP Conference - November 4th 2017, Edinburgh
The Scotland PHP Conference is back for a second time, where community members from around the world come together to learn and share information about the latest trends and technologies in professional PHP development. The Call for Papers is still open, and Blind Bird tickets are on sale now.
Sunshine PHP Conference - 8-10th February 2018, Miami
Save The Date! The Sunshine PHP Conference has been booked for Spring next year. The Call For Papers will open in August, so get these dates into your calender.
Nomad PHP US - July 20th 2017 20:00 CDT
What I Learned About Testing While Walking Uphill Both Ways In The Snow, presented by Chris Hartjes. Back when I was learning about how to test PHP code, I had to walk both ways uphill in the snow to get the information I needed. Over the past 14 years (has it really been that long?!?) I’ve learned a lot about not just testing but about code and people. In this talk I want to share what I wished I knew all those years ago so you don’t have to suffer like I did.
Nomad PHP EU - July 20th 2017 20:00 CEST
Atlas ORM: Doing the Heavy Lifting For Your Persistence Layer, presented by Paul M. Jones.
Atlas lets you build an OO model of your SQL tables and relationships. You can use it at the start of your project for basic CRUD operations. As you begin to need simple behaviors in your application, you can add them to the Record and RecordSet persistence model objects. Finally, when the time comes to transition to a rich domain model, you can map the Atlas persistence model objects to your domain Entities and Aggregates.
MageTalk Magento Podcast #131 – #reallyintoshoeshatefeet
Note to self: never ever ever make a joke about feet again.
Voices of the ElePHPant - Interview with Maurice Kherlakian
In this episode, Cal interviews the head of Professional services at Rogue Wave, Maurice Kherlakian. They talk about PHP at Enterprise scale.
Three Devs and a Maybe - Cyber Security with Colin Hardy
On this weeks show we are joined by Colin Hardy to discuss all things Cyber Security. We start off by explaining what got him interested in this branch of computing, highlight what Cyber Security is, and define some of the common terminology. From here, we move on to discuss how he analyses Malware samples (using Automated, Behavioural and Static means) and the diagnostic tooling present. Finally, we mention some high-profile attacks (Stuxnet, WannaCry), motives behind creating such Malware and how he stays current in this field.
Laravel News Podcast LN39: Laracon Sessions with Jack McDade
In Laracon Sessions Episode Three, Jake and Michael are joined by Jack McDade to discuss his surely-80s themed talk, as well as your regular dose of Laravel framework and community news.
Zend Framework Quick Bites Episode 25 - How to Go From Development to Deployment with Docker
In this episode, I’m discussing the latest tutorial on the blog: How to Go From Development to Deployment with Docker. It’s a truly BLOCKBUSTER of a post, weighing in at 3,200 words, one far larger than any other that I’ve written for the site. But don’t let the size put you off.
That Podcast Episode 41: SAD
Beau and Dave talk about PHP-FIG, an intersection of health and technology, Symfony and bitcoin bots.
Changelog Podcast #252: GitHubs Open Source Survey (2017)
On Friday, June 2, 2017 – GitHub announced the details of their Open Source Survey – an open data set on the open source community for researchers and the curious. Frannie Zlotnick, Nadia Eghbal, and Mikeal Rogers joined the show to talk through the backstory and key insights of this open data project which sheds light on the broader open source community attitudes, experiences, and backgrounds of those who use, build, and maintain open source software.
Full Stack Radio Podcast Episode 66: Pre-Launch Engineering and Testing an HTTP Client
In this episode, David talks about getting ready for the launch of PushSilver Infinite, and the unexpected engineering effort needed to make the most of a marketing initiative. Adam gives an update on gracefully handling errors in the KiteTail checkout process, launching Zttp as an open-source package, and how he used Lumen to power the Zttp integration test suite.
LaraChat Live - Episode #27: Project Management for Developers
Today we talk about Project Management with Sanaz Afshar. In this show, as developers, we are looking to uncover the myths of what Project Managers do and how we can work in harmony!
North Meets South Web Podcast Episode 30 - Making Users, Shared Sessions, and Production Deployments
In our golden episode, Jake and Michael talk about making users in a Laravel app, sharing sessions between servers and applications, and answer a listener question on our production deployment workflows.
php[architect] Magazine June 2017 - Secure By Design
This issue packs security related articles with a focus on designing security into your applications from the start. It occurs to me it’s a little ironic for PHP since the early days of the language were littered with insecure-by-design features. Who doesn’t remember register_globals, magic_quotes, and session IDs in the query string? There are still gotchas left to trip you up if you forget to use prepared statements with your database queries or allow URL includes without white listing them first. But we’ve come a long way and, as the PHP community has matured, we’ve learned the security pitfalls to avoid.
Deploy Your PHP App with Docker, Presented by Asmir Mustafic
This talk explains how to develop and deploy to production your application built with Docker. The presentation starts from the development environment and passing by Continuous Integration arrives to Production. It shows an workflow that allows to compose many tools and best practices to obtain fast development and no down times.
DrupalCon Vienna T-shirts Are Back! - But There’s a Catch
Remember how we are making changes to DrupalCon Europe? These were hard decisions and some things we love we found just weren’t financially viable. Like free t-shirts. But one thing we heard a lot was “please don’t take away the t-shirts!”. We heard you. And while it doesn’t make financial sense to give free t-shirts to all attendees, we still want to be able to continue to offer them. So we’ve come up with a plan.
The Best PHP Books 2017 and 2016
Every year many books about PHP and related topics are released, but most of them do not get much notice from developers who would be very interested to learn about the books if they knew they existed. This article is a list of PHP books that have been released in the last few years that are best sellers on sites like Amazon. It was built with the collaboration of the authors that have written them so they can tell you better what the books are about and why they will be useful if you read them.
Taylor Otwell Wants You To Build Your PHP Apps On Laravel
Learn PHP and MySQL with AJAX In A Weekend Kindle Edition (by Blerton Abazi, published 18th April 2017)
For many people, the main reason for learning a scripting language like PHP is because of the interaction with databases it can offer. In this tutorial I will show you how to use PHP and the MySQL database to store information on the web and include it into your website.
Object-Oriented PHP (by Junade Ali, published 26th April 2017)
Most PHP developers have a clear understanding of what technical debt looks like and the business necessity of having resilient and reliable code. With the release of PHP 7, the Object-Oriented language features of PHP have matured significantly. This book seeks to discuss how you can use Object-Oriented PHP now.
Data Structures & Algorithms Using PHP 7 (by Hemant Jain, published 28th April 2017)
Web Programming and Design: HTML5, PHP + MySQL, CSS3 Kindle Edition (by Ciro Ragone, published 14th May 2017)
The audience of this book should be people who want to learn swiftly, but deep skills necessary to build something through the WEB. First language to learn is HTML5, to make a site (or application) and make it available to the world. Main elements of HTML are tags, which is allowed to indicate to browsers (Internet Explorer, Firefox ..) what we want to do and how do it.
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@example.com
Interesting Projects, Tools and Libraries
Just an extremely simple naked PHP application, useful for small projects and quick prototypes.
Prophecy is a highly opinionated yet very powerful and flexible PHP object mocking framework.
Modern and simple PHP task runner inspired by Gulp and Rake aimed to automate common tasks.
Random data generator in JS, PHP and MySQL.
The lightest PHP database framework to accelerate development.
Phalcon is a web framework delivered as a C extension providing high performance and lower resource consumption.
A Chainable, REST Friendly, PHP HTTP Client. A sane alternative to cURL.
Workerman is a library for event-driven programming in PHP. It has a huge number of features. Each worker is able to handle thousands of connections.
This library provides a fast implementation of a regular expression based router.
The Iniscan is a tool designed to scan the given php.ini file for common security practices and report back results.
A powerful and modern PHP debugging tool.
The official PHP client for Stream, a web service for building scalable newsfeeds and activity streams.
ramsey/uuid is a PHP 5.4+ library for generating and working with RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).
A responsive-modular application framework built on CodeIgniter.
A deployment tool written in PHP with support for popular frameworks out of the box.
Flight is a fast, simple, extensible framework for PHP. Flight enables you to quickly and easily build RESTful web applications.
A PHP desktop/mobile user agent parser with support for Laravel, based on Mobiledetect.
A PHP string manipulation library with multibyte support. Compatible with PHP 5.3+, PHP 7, and HHVM.
Cilex is a simple command line application framework to develop simple tools based on Symfony2 components.
Vision is a lightweight and easy extensible framework for PHP.
A small PHP class to generate YouTube-like hashids from one or many numbers. Use hashids when you do not want to expose your database ids to the user.
Brush is a complete object-oriented PHP wrapper for the Pastebin API.
PyroCMS is an MVC PHP Content Management System built to be easy to use, theme and develop with. It is used by individuals and organisations of all sizes around the world.
Requests for PHP is a humble HTTP request library. It simplifies how you interact with other sites and takes away all your worries.
Please help us by clicking to our sponsor:
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?