Welcome to this weeks edition of PHP Weekly News.
The first point release of the 7.x series is out this week. PHP 7.1.0 is available now, with numerous improvements.
Also this week, WordPress 4.7 has been released, with new features to help you set up your site the way you want it.
We look at the next episode in the Programming with Yii2 series, exploring automated testing using Codeception.
Plus Python versus PHP - which one is best to use when programming a web application?
And finally, the December issue of php[architect] is out now, looking at how to write good tests, writing a chat bot, making better bug reports and a general look back on 2016.
Have a great weekend folks,
Cheers
Katie and Ade |
We love our sponsors. Why not try them?
From our sponsors:
|
Articles
24PullRequests 2016
Last year I wrote about different initiatives in the period leading up to Christmas. In one of my talks this year, Level Up Your Team, I've been discussing many ways of learning, and for this year I want to highlight one of the initiatives that I participated in last year, and again am trying this year: 24 Pull Requests.
PHP Performance Evolution 2016 from PHP 5, PHP 7.0, PHP 7.1 and PHP 8/Next
Since its creation in 1994 by Rasmus Lerdorf, the PHP language has gone through many improvements. Performance is one of the main criteria developers consider when they evaluate upgrading to a newer version. Read this article to learn how performance improved across the latest PHP versions starting from PHP 5 up to the latest developments, including the recent version 7.1, as well as the experimental JIT branch that will be become part of PHP 8 or the next version.
Seven Syntax You Can Choose in PHP
There are always several ways to do the same things in PHP. Some of them are so close that one even wonders which one to choose. In fact, if they are interchangeable, why even choose? Here is a list of seven syntax you can choose in PHP, freely.
Conserving On The Wrong Resource
Programmers are acutely aware of their limited resources: CPU, memory, storage, requests-per-second, screen space, line length, and so on. If programmers are aware of a resource constraint, they conserve on it; sometimes they call this “optimising.” Are you aware of a loop? Then you try to “optimise” it, or conserve on it, e.g. by not using a count() in the loop declaration.
Moving Toward SSL
We’re at a turning point: 2017 is going to be the year that we’re going to see features in WordPress which require hosts to have HTTPS available. Just as JavaScript is a near necessity for smoother user experiences, and more modern PHP versions are critical for performance, SSL just makes sense as the next hurdle our users are going to face.
Progress Requires Both Stability and Innovation, Symfony is Nailing It
Web development is a relatively fast moving industry. Technologies come and go, and while many of them are definite improvements - some are fads that don't have a long shelf life. Perhaps the biggest underlying issue is that developers often don't even take the time to learn a particular technology before moving on to the next one. |
Tutorials and Talks
The Battle of Python v/s PHP – What’s Better for Your Web Application Development?
It is always hard to compare two programming languages. One of the main reasons for this is because there is always going to be cases in which one is going to be a way better option than the other. For this occasion we are going to bring Python and PHP programming languages close to you and at the same time we are going to try to determine which one is better for programming a web application. First, let’s see how both of these languages came into the picture, and where they were applied for the first time.
Building Your Startup: Responsive Email for Gmail
This tutorial is part of the Building Your Startup With PHP series on Envato Tuts+. In this series, I'm guiding you through launching a startup from concept to reality using my Meeting Planner app as a real-life example. In our earlier episode, Delivering Invitations, I introduced responsive, HTML email templates which we built on some open-source MailChimp templates. Then, in our previous episode, Refining Email Templates, we migrated to the Sendwithus Oxygen templates. The new templates looked great, but there were big problems with the templates in Gmail. In this tutorial, I'll tell the story of how I cleaned up the appearance of the new HTML templates within Gmail.
Store Your Translations in the Database with Laravel Translation Loader Package
Laravel has built-in support for localisation using arrays stored in language files, and in 5.4 they are adding the ability for JSON based language files. Some applications are better suited to have the language strings stored in the database so that end users can change them through a custom user interface, and that’s where the Laravel translation loader package can be helpful. Let’s take a look at how this package can be set up and used.
PHP ssh2.sftp opendir/readdir fix
This bug https://bugs.php.net/bug.php?id=73597 related to the PECL ssh2 extension bit us yesterday, so this post is a public service announcement that will (hopefully) save you from writing your own workaround like I almost did.
A Quick Guide on Integration Omnipay on PHP Projects
If you are in the market for a payment gateway for your PHP project, Omnipay is an easy-to-integrate option that really streamlines the entire process. In this tutorial, I will discuss the integration of the Omnipay API in a simple project. I will create a separate payment class for verifying credit card information. Next, I will make a payment using Stripe payment gateway. Make sure that you have a valid account on Stripe payment gateway because I will use Stripe API key to make payments through Omnipay.
Introducing Sessionz
Not that long ago, I made an attempt to fix what I saw as one of the biggest issues facing session management in WordPress. Many larger sites use multiple servers for presenting content, but the lack of sticky sessions on the load balancer 1 means that standard PHP sessions, which live in the filesystem, tend to fail quite quickly.
FreePBX 13: From Cross-Site Scripting to Remote Command Execution
FreePBX is a web-based graphical user interface that helps users to manage voice-over-IP services. According to the creator, there are over one million production systems using FreePBX worldwide and 20,000 new installations monthly. It is the most widely deployed open-source PBX (Private Branch Exchange) platform in use across the world. Recently, the announcement of a critical security vulnerability caught our attention that was fixed in August 2. Since FreePBX is written completely in PHP, we decided to throw it into our code analysis tool RIPS. The results were more than surprising…
Building PHP Projects on AWS Codebuild
I’ve had a great time at AWS re:Invent this week, attending sessions and hanging out with some of the ShootProof team. My favourite part of the week was the “mini con” on containers. I spent Thursday immersed in sessions dedicated to deploying Docker containers on AWS. Of course, the main highlight of re:Invent is always the keynotes and the new services and features announcements they make during the keynotes. One of the new services caught my attention, and I decided to give it a try. That service is AWS CodeBuild.
The Delicious Evils of PHP
I want to look at two PHP functions: eval and exec. They’re so often thrown under the sensible-developers-never-use-these bus that I sometimes wonder how many awesome applications we miss out on. Like every other function in the standard library, these have their uses. They can be abused. Their danger lies in the amount of flexibility and power they offer even the most novice of developers. Let me show you some of the ways I’ve seen these used, and then we can talk about safety precautions and moderation.
Programming With Yii2: Automated Testing With Codeception
In this Programming With Yii2 series, I'm guiding readers in the use of the Yii2 Framework for PHP. In this tutorial, I'll explore automated testing using Codeception, which is integrated with the Yii2 development framework.
Upgrading to PHP 7.1 is Easy
PHP 7.1 was released last week. It has many nice new features. If you’re anything like me, you want to use the latest version right way. Upgrading to PHP 7.1 is not that difficult. Personally I use homebrew. The steps required to upgrade from 7.0 are laughably simple.
How To Automate Projects Using Composer Scripts
How well do you truly know Composer? Do you just know install, update, and require, along with some of the composer.json configuration? Or do you know it deeply? In the first part of this series, we started digging into Composer, looking at a range of command line options which Composer provides. We also looked at some of the switches which can be passed to those commands. Here, in the second part of the series, we’ll look at the scripts section of composer.json. If you’ve never heard of this section, it provides a way to automate tasks in your project.
How To Override Magento 2 Helper, Block, Model and Controller
There is always a certain level of customisation required for every Magento project. This can involve adding entirely new elements or overriding the existing ones. Today, we will guide you with overriding helper, model, block and controller in Magento2. Here in example we will be overriding product helper, list product block, product model and product view controller. You can use a similar approach to override other block, model and controllers in Magento.
Expression Engine 3.4.2: Code Reuse Attack
Expression Engine is a popular general purpose content management system that is used by thousands of individuals, organisations, and companies around the world. The open-source version has about 250,000 lines of code and is a medium-sized web application. In this post, we will examine a code reuse vulnerability that leads to remote code execution. This vulnerability type allows an attacker to partly control the applications logic and to chain existing code fragments. |
News and Announcements
PHP 7.1.0 Released
The PHP development team announces the immediate availability of PHP 7.1.0. This release is the first point release in the 7.x series. PHP 7.1.0 comes with numerous improvements and new features.
WordPress 4.7 “Vaughan”
Version 4.7 of WordPress, named “Vaughan” in honour of legendary jazz vocalist Sarah “Sassy” Vaughan, is available for download or update in your WordPress dashboard. New features in 4.7 help you get your site set up the way you want it.
Laravel Conference in Pakistan - December 10th 2016
The Laravel community in Pakistan is holding its first Laravel conference in Karachi Pakistan, just off the Arabian Sea. This is a one-day event on December 10th that starts at 2:30PM and runs through 6:30pm. Their goal with this is to start a series of Laravel awareness meetups before the main Laracon event and to help people interested in Laravel grow as developers. Some of the topics include a brief history of Laravel, a Laravel Quickstart, Laravel Developers Toolkit, and a group discussion.
php[tek] Conference - May 24-26th 2017, Atlanta
Hello and welcome to php[tek] 2017 - the premier PHP conference and annual homecoming for the PHP Community. This conference will be the 12th annual edition, and php[architect] and One for All Events are excited to bring it to Atlanta, the empire city of the south! We are currently working on big plans for the 2017 edition and will continue to update this website with more information. Meanwhile the Call for Speakers is now open, until the end of the year.
PHP South Coast - June 9-10th 2017, Portsmouth
That’s right, PHP South Coast conference in 2017 will be running not one, but two days of talks on 9th-10th June 2017. This means there will be more opportunity for new speakers to be a part of the conference as well as more experienced speakers being present on the lineup. On the Friday we will have two tracks all day, followed by a social event in the evening (more details to be announced). On Saturday we will have one track of talks, starting slightly later in the morning so that everyone is nice and refreshed from the night before :) The Call for Papers is open, and Blind Bird tickets are on sale now.
Web Summer Camp - August 30th-September 2nd 2017, Croatia
Hands-on and engaging workshops providing useful know-how and first-hand experience, along with encouraging knowledge sharing. We are looking for PHP, eZ Publish/eZ Platform, Symfony, JavaScript, React/React native, user experience, user research, information architecture, design systems, CSS and project management workshops. The Call for Papers is open now.
Nomad PHP US - December 17th 2016 20:00 CST
Containing Chaos with Kubernetes, presented by Terrence Ryan. Okay, you’ve made the move to containers and can now write Dockerfiles for everything. How do you manage all of those containers? Have you found that you traded managing individual machines for managing individual containers? Kubernetes, an Open Source container orchestration engine, can be your answer. We’ll explore Kubernetes and see how you can use it to run massive collections of containers that fix their own problems and allow you to move your setup wherever you need to be.
Nomad PHP EU - December 17th 2016 20:00 CET
Build Your Framework Like Constructicons, presented by Stefan Koopmanschap. While we have a strong offering of full-stack frameworks and microframeworks, the rise of components and libraries combined with Composer allows us to easily build our own framework without reinventing the wheel. In this talk, you’ll learn how the total can be more than the sum of the parts, just like how Devastator was stronger than the individual Constructicons in Transformers. |
Podcasts
Three Devs and a Maybe Podcast - Let It Crash
In this weeks episode, Mick and Edd start off the discussion with an update on Mick’s masters dissertation. We then move on to highlight the value of getting an MVP released, and the old adage that hindsight is 20/20. Edd then brings up how he has had the chance to revisit MyBuilder’s logging and monitoring infrastructure recently, re-accessing Severity levels along the way (embarrassingly missing out Critical in the podcast). He also mentions how background processes used within the application have changed overtime - discussing the difference between Time-dependent and Continuous processes. Finally, we chat about successfully introducing Supervisor into the stack and Erlang’s ‘Let it Crash’ philosophy.
MageTalk Magento Podcast #109 - Phillip Gone Wild
Kalen doesn't know what NPR is and Phillip goes on a post-Trump, marching-band fuelled tirade on Magento's response to "Willemgate".
The Laracasts Snippets Episode 51: Marketing Pet Peeves
I have no clue what I'm talking about, so listen to me discuss my marketing pet peeves.
Zend Framework Quick Bites Episode 20 - The Composer Command-Line Essentials
In this episode, let’s look at one of the most essential tools in Zend Framework’s (and PHP’s) wider ecosystem - Composer. I’m sure you’ve heard of and used it. But how well do you really know it? Do you just know composer install, update, and require, and some of the composer.json configuration? Or do you really know it? In this series, you’re going to take your skills to the next level; starting with the command-line.
North Meets South Web Podcast Episode 16 - PHP 7.1, Contributing to Open Source for Christmas, and Posting on Medium as a Developer.
After some erratic recording, Jake and Michael return for consecutive weeks to talk about PHP 7.1, contributing to Open Source for Christmas, and posting on Medium as a developer.
PHP Ugly Podcast #37: Cold Feet Episode
Topics include Burn Out in PHP, Framework tribalism and Microsoft becomes a Platinum Member of the Linux Foundation.
PHP Round Table Podcast Episode 57: Logging & Crash Reporting in PHP
No matter how experienced you are as a programmer, at some point your app will generate errors and crash. Fixing problems with your app quickly is paramount in order to affect as little of your user base as possible. We discuss what is involved with implementing effective logging and crash reporting techniques in PHP to help you keep your apps up and running like a well-oiled machine. |
Level Up Your Team (PHPNW16) by Stefan Koopmanschap
As a tech lead, team lead or other senior-level member of a development team, you may at any time run into the problem where you want your team members to improve themselves or to get involved in community or other projects, but you have a hard time actually pushing your team members in the right direction. This talk will help you with practical tips and tricks and examples from the work floor on how to get developers to push themselves to their limits and level up.
php[architect] December 2016 – Scrutinising Your Tests
The twelfth issue of 2016 is now available! This month we look at how to write good tests with Behat and using Test Driven Development. This issue also includes articles on using HTTPlug to decouple your HTTP Client, Decoupled Blocks with Drupal and JavaScript. Our columnists have articles on writing a Chat bot, advice on securing your application’s secrets, making better bug reports, respecting diversity, and a look back at 2016.
10 Things I Hate About Your API
You’ve built an API, launched it, and people aren’t excited about it. Why might that be? Many people release APIs for public consumption without any regard for developer experience. This creates a developer ecosystem that invites failure or worse - it can encourage people to seek alternatives. This talk will cover common API pitfalls (spoiler, not all of them are code-related!) and how to create an environment around your API that will make developers happy.
Building Websites With Concrete5 Express
Concrete5 version 8 was released yesterday. You can read more about that here. We're very excited about this release. (Don't worry, there's an easy upgrade path from 5.7.) One of the major new features in version 8 is Express. Express is a way to group concrete5 custom attributes into data objects, and relate those data objects to each other. Then, you can use blocks and custom code with an easy syntax to output those data objects in either search interfaces, or just on the front-end of the website.
Diving into PHP7: A guide to migrating from PHP5.6 Kindle Edition (by Andrew Beak)
This book is written for people who want an overview of migrating from PHP5.x to PHP7. It covers the killer features of PHP7 that you can use to justify the move to your boss. It also works through the new sugar that PHP7 gives.
PHP 7 Explained Ebook Review
PHP 7 is certainly a Giant Leap for the PHP community. Version 7 Improved OOP concepts and functionality of the language, thereby doing away with one of the most cited shortcoming of the language. However, even for veteran PHP coders, making the transition from the procedural PHP 4 to OOP PHP 7 is a big deal. Old habits are hard to break, especially for PHP programmers who have amassed a significant library of scripts for almost every conceivable web development challenge. Moving away from this dependable base to the untried waters of OOP is a daunting prospect. Luckily, help is at hand in the form of books that target specific segments of the PHP community from novice to expert. This PHP 7 ebook review introduces an excellent book written for PHP experts who want to master PHP 7. |
Jobs
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
exakat
The Exakat Engine is an automated code reviewing engine for PHP.
player
Blackfire Player is a powerful Web Crawling, Web Testing, and Web Scraper library for PHP.
elder-brother
Set up and manage contribution policies for your PHP-based projects.
pipe-rat
Create REST APIs with just a few lines of config. This PSR7 compliant PHP library uses Zend\Stragility Middleware at its core.
wirecard
A PHP library for making payments through the Wirecard payment gateway.
PHP-FFMpeg
An Object Oriented library to convert video/audio files with FFmpeg/AVConv.
phpcr-migrations
Migrations library for PHPCR influenced by Doctrine migrations.
fileupload
PHP FileUpload library that supports chunked uploads.
hybridauth
HybridAuth enables developers to easily build social applications and tools to engage websites visitors and customers on a social level by implementing social sign-in, social sharing, users profiles, friends list, activities stream, status updates and more.
quaver
A framework designed to develop a website, applications, platforms or whatever you want.
php-common
Common PHP library for Expressly.
disposable-mailbox
Self-hosted simple disposable email system (php+js).
siler-example
Keeping it simple, stupid. |
Please help us by clicking to our sponsor:
From our sponsors:
|
So, how did you like this issue?
|
Protect your PHP code with SourceGuardian 10. Free trial.
|
|