|Hello to the PHP community, and welcome to PHPweekly.com.
The third and final beta for 7.2.0 has been released by the PHP development team, and is available now for testing.
Also this week, with a lot of hard work and effort going into building the next generation of Joomla, it has been announced that the next major Joomla releases will require PHP 7. Find out why, and how this will impact the core code.
We have the final post in the Writing Tests for PHP Source series, submitting a pull request to the main php-src repo.
Plus the PHP UK Conference has been announced, taking place over three days in London next February, aiming to deliver fantastic up-to-date content about PHP and related web technologies in a comfortable and professional setting. Blind Bird tickets are available now.
And finally, we have the very first episode of a brand new podcast - php[podcast] from the php[architect] team. Listen to all the news about the latest issue of the magazine, upcoming conferences and contributor interviews.
Thanks for reading!
Katie and Ade
Please help us by clicking to our sponsor:
Developer's Survival Guide To Email
SparkPost highlights 10 things developers might
not know about implementing and sending email,
and how to navigate them.
Looking Forward with Joomla! 4
Over the last year, a lot of effort has gone into building the next generation of Joomla in working on the Joomla! 4.0 and Joomla! Framework 2.0 releases. In addition to introducing several new features, including a fully rebuilt Media Manager, an enhanced event dispatching system, and new security features such as support for prepared SQL statements, we have also been doing some routine maintenance and paying off some of our project's technical debt by retiring deprecated code and raising the minimum supported software stack. In an update from last years manifesto, today we would like to announce that the next major Joomla releases will require PHP 7.
Why MVC Doesn’t Fit The Web
[MVC is] a particular way to break up the responsibilities of parts of a graphical user interface application. One of the prototypical examples is a CAD application: models are the objects being drawn, in the abstract: models of mechanical parts, architectural elevations, whatever the subject of the particular application and use is. The “Views” are windows, rendering a particular view of that object. There might be several views of a three-dimensional part from different angles while the user is working. What’s left is the controller, which is a central place to collect actions the user is performing: key input, the mouse clicks, commands entered.
5 Lightweight PHP Frameworks for REST API Development
To develop a REST API in PHP quickly and easily it’s a good idea to use a lightweight PHP framework. Developing your own from scratch with plain PHP, apart from being a pain and taking too much time, is likely to require a lot of testing and deviate from REST standards. Ankur Kumar over at Find Nerd takes you through the top five PHP frameworks to make your life easier when creating a REST API.
Help Us Celebrate Community Heroes - Join the Community Spotlight Committee
Our community is full of amazing people. Let’s celebrate them. Join the Community Spotlight committee to review community-nominated heroes so we can recognise and celebrate those who have contributed to Drupal in special ways.
Are Bitwise Operators Still Relevant in Modern PHP?
Many of you probably scratched your heads reading this title. “Bitwhat?” In this article, we’ll look at what bitwise operators are, and whether or not their use is still relevant in this modern age of computing.
Tutorials and Talks
Making Things Faster With Gearman and Supervisor
Sometimes our services need to perform some huge tasks after user interaction, and these kinds of tasks can be slow because of third parties and can consume the resources of your server. To process this functionality faster, you need to make the parts of your application asynchronous. You can achieve this by delegating this task to a more powerful server or running it in a background process. And Gearman is a proper tool that can be used to do this. In this tutorial, we will create a simple application that will delegate a task from a client to the Gearman worker.
New Laravel String Helpers in 5.4 and 5.5
New string helpers are finding their way into Laravel leading up to the big 5.5 release, which is planned to drop during Laracon EU 2017 next week. Here are some of the recent highlights in the String helper class, which has been getting some love lately.
Using Eloquent ORM with Slim
Previously, I wrote a very comprehensive tutorial on using twig templating with Slim micro framework. In that tutorial, I created an MVC type architecture to render views from controllers. In this article, I will use the MVC structure of the previous article and connect & use Eloquent ORM with Slim.
Find Distance Between two Addresses using Google API and PHP
In this article you are going to learn how you can find distance between two addresses. We are going to use google map api and PHP to accomplish this task.
Preparing a Leanpub Book For Print-On-Demand
During the last few days I've been finishing my latest book, Microservices for everyone. I've used the Leanpub self-publishing platform again. I wrote about the process before and still like it very much. Every now and then Leanpub adds a useful feature to their platform too, one of which is an export functionality for downloading a print-ready PDF.
Introduction to Latte | Best PHP Templating Engine
A PHP templating engine is the one which gives you the ability to write HTML for your clients efficiently, using PHP variables. However, PHP was originally built to be a templating engine, but yet it was never used primarily as a templating engine. There has been so many PHP templating engines so far in the market since PHP evolved, but none of them has made as great an impression on us as Latte. Introducing you to Latte, one of the best PHP templating engines you have come across so far.
Why Magic Quotes are gone in PHP 7
Magic quotes may have been one of the biggest sins of the past in PHP, and we should celebrate the fact that now, ultimately, it is gone from PHP. Magic quotes are a perfect example of how long it can take to undo a broken feature that was introduced into a programming language.
How to Master Your API Workflow with Postman
I was trying out Postman lately, a tool we’ve briefly covered before, and I discovered that they’re doing a great job by providing an integrated environment for different components of an API, like authorisation, testing, documentation, versioning, etc. In this article, we’re going to walk through the different features that Postman provides and how we can organise them to make our API workflow less painful.
Three Creative Techniques for Writing Modular Code
There are a few modular coding techniques that I use in my day-to-day work that make my code a lot more organised and maintainable. Here's why modularity is important, and useful techniques for writing modular code.
Laravel Eager Loading - load() Vs. with()
Today, while working with one of my projects (which is built on top of Laravel) I bumped into the situation where I needed to get associated models data for one of the models. So here, I had two approaches in Laravel to accomplish this, which are basically called Eager Loading.
Inbound Email in Laravel
I recently needed the ability to receive emails and process attachments on those emails. I love Mailgun for the sending of transactional email, so when I needed to process incoming mail I started digging into Mailgun closer and realised their powerful inbound routing email features! Come along and learn how you can set up a webhook to process inbound email and secure it within your Laravel applications. We will even use Laravel Valet (or ngrok directly) to test it out locally!
Protecting Passwords with Argon2 in PHP 7.2
PHP 7.2 will be released later this year (2017). This version contains some interesting additions, including two new security features: support of the Argon2 password hash algorithm, and the ext/sodium extension wrapping the libsodium library. With these new features, PHP is the first programming language to adopt modern cryptography in its standard library. In this article, we demonstrate the usage of the Argon2 password hash algorithm.
Custom Caching for Twig
In Superdesk Publisher we have implemented Mutlitenancy with the possibility to have multiple themes (but one activated). To make the process of switching, uploading and updating themes for tenant we had to come up with a solution to clear cache only for one particular theme, not the whole instance (with many organisations and tenants). To achieve that we created custom Twig Cache class.
Laravel Collections’ Higher Order Messaging And “when” Method in Laravel 5.4
It seems like it was just last year that collection pipelines took over the Laravel world. Taylor had introduced collections to Laravel a while back but they sat somewhat under-appreciated until Adam Wathan wrote his book Refactoring to Collections about how they can transform the way you write a lot of your PHP code. In Laravel 5.4, collections got a few boosts. Let’s take a look at a few.
Slim First Application Walkthrough
If you’re looking for a tour through all the ingredients for setting up a very simple Slim application (this one doesn’t use Twig, but does use Monolog and a PDO database connection) then you’re in the right place. Either walk through the tutorial to build the example application, or adapt each step for your own needs.
Taking Photos with an Ionic2 Application and Upload Them to S3 Bucket with SAPs Cloud Foundry using Silex and Lumen
Today I want to play with an experiment. When I work with mobile applications, I normally use ionic and on-premise backends. Today I want play with cloud based backends. In this small experiment I want to use an ionic2 application to take pictures and upload them to an S3 bucket. Let’s start.
Your First GraphQL API - Nested Queries
Typically our database is designed with some relationships. When retrieving data from our GraphQL, we would want them to present in a relationship hierarchy as well. In this tutorial, we will learn how to build nested queries using Youshido/GraphQL.
|News and Announcements
PHP 7.2.0 Beta 3 Released
The PHP development team announces the immediate availability of PHP 7.2.0 Beta 3. This release is the third and final beta 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.
THIS IS A DEVELOPMENT PREVIEW - DO NOT USE IT IN PRODUCTION!
Symfony CMF 2.0.0 Stable Release
Over the summer, we have been tagging the 2.0.0 releases of the Symfony CMF components and bundles. This week, we managed to wrap up the last bits and pieces and tagged 2.0.0 of all parts of the CMF.
Drupal Core - Multiple Vulnerabilities - SA-CORE-2017-004
Drupal 8.3.7 is a maintenance release which contain fixes for security vulnerabilities.
Madison PHP Conference - September 22nd-23rd 2017, Madison
Madison PHP Conference in Madison, Wisconsin focuses on PHP and related web technologies. This event is organised by Madison PHP and is designed to offer something to attendees at all skill levels. It will be two days of networking, learning, sharing, and great fun! Tickets are on sale now.
PHPCE - November 3rd-5th 2017 Rawa Mazowiecka, Poland
phpCE is the first edition of a community conference for PHP programmers and enthusiasts. The meeting was established by merging two nation-wide events: PHPCon Poland and Brno PHP Conference. 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. Blind Bird tickets are on sale now.
PHP UK Conference - February 14-16th 2017, London
PHP UK is pleased to announce the 13th Annual PHP UK conference; a 2-day event with 3 great tracks held at The Brewery, in the heart of the City of London. With over 700 delegates, speakers, and sponsors, PHP UK conference aims to deliver fantastic up-to-date content about PHP and related web technologies in a comfortable and professional setting. There are countless networking opportunities to engage with international speakers and delegates, which makes the event one you won't want to miss. Blind Bird Tickets are on sale now.
The php[podcast] Episode #1 - Who Goes There
Welcome to the first episode of the php[podcast], a new podcast from us at php[architect]. We hope you’ll enjoy listening to learn about the latest issue of the magazine, upcoming conferences, and interviews with our contributors. In this episode, we take a look at the August issue and the topic of authentication and authorisation in web applications.
North Meets South Web Podcast Episode 32 - Conventions, Configuration, and Becoming a Lead Developer
Jake and Michael return after a few weeks hiatus and discuss Michael's new role as a lead developer and the slightly softer focus for the podcast moving forward.
PHP Ugly Podcast #69: Eric Gets Fired
Topics this week include remote workers pay and PHP TestFest 2017.
Zend Framework Quick Bites Episode 36 - A Rapid Intro to Delegator Factories
In this episode, come get a quick introduction to a very powerful feature in Zend ServiceManager, called Delegator Factories.
The Laracasts Snippets Episode 68: Building Energy
In the previous Laracasts Snippet, we discussed social media and how it tends to have a draining effect on me. Let's continue that conversation today, but more from the point of view of solving the problem. What specifically am I doing to increase my mental/physical energy levels?
Changelog Podcast #261: Building an Artificial Pancreas with Elixir and Nerves
We talked with Tim Mecklem about building an artificial Pancreas with Elixir and Nerves to help those with Type 1 Diabetes who want to "loop" — a process which involves monitoring glucose levels, predicting where a person's glucose levels are heading, then delivering insulin based on that prediction. Tim is a Developer at Gaslight in Cincinnati where he builds software solutions with Ruby and Elixir, and he's a member of the Nerves Core team.
Lately in PHP Podcast Episode 86 - Definite CSRF Attack Protection in PHP with Same Site Cookies Support
Same Site Cookies is a modern security feature being supported in the latest Web browser versions to provide a definite protection to Cross-Site Request Forgery attacks. The support of the same site cookies in PHP was one of the main topics discussed by Manuel Lemos and Arturs Sosins in Episode 86 of the Lately in PHP podcast. In this episode they also talked about the PHP 7.2 feature freeze, proposals to change object arrow -> to dot . notation, array coalesce operator, native support to JSON object to arrays in PDO, an article about comparing two similar images, and the 18 years of PHP Classes.
Submitting a PR to php-src
This is the 6th and final post in the "Writing tests for PHP source" series by Sammy Kaye Powers. We found some untested lines of code and wrote a useful test that covered the lines so let's submit our new test to the main php-src repo. Don't we need to create an RFC to send a pull request? Not for bug fixes and tests, so we're in the clear.
Cloudways Interview: “Fork Magento 1” – Andrew Pemberton on Magento Development
Andrew Pemberton is a Magento Certified Developer with over 15 years of experience in creating PHP-based websites. He currently works as a Web Developer at Interactive Web Solutions. So, without further ado, let’s see what Andrew has to say.
Mastering Drupal 8 , Kindle Edition (by Chaz Chumley and William Hurley, published 27th July 2017)
The most up-to-date advanced practical guide on Drupal 8 with an in-depth look at all the advanced new features such as authoring, HTML markup, built-in web services, and more.
Better PHP Development Kindle Edition (by Bruno Skvorc, Thomas Punt, Younes Rafie, Christopher Pitt and Reza Lavaryan, published 16th August 2017)
PHP powers the vast majority of the web today. It is by far the most ubiquitous and accessible mature web language, and welcomes thousands of new developers every day. With PHP 7+ came some improvements that make it harder to make mistakes, and 7.2 is making things even safer, even more structured. If you're just getting started with the language, you're in luck.
Docker for Developers, 2nd Edition: php[architect] print edition Paperback (by Chris Tankersley, published 17th August 2017)
Docker For Developers is designed for developers who are looking at Docker as a replacement for development environments like virtualisation, or devops people who want to see how to take an existing application and integrate Docker into that workflow. This book covers not only how to work with Docker, but how to make Docker work with your application.
Mid-Level & Senior PHP Developers, DealerScience (Boston, MA)
Established Boston, MA startup seeking mid/senior LAMP developers excited to apply modern programming to our SaaS solution! Local preferred but remote considered. Email: [email protected]
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
PHP debugger to run in terminal to debug your code easily.
A simple lock implementation using flock.
This web application allows every body without any particular knowledge required in webmastering to create his own website.
Our team created for you one of the most innovative CRM systems that supports mainly business processes and allows for customisation according to your needs.
A drop-in GraphQL server for your Craft CMS implementation.
A PHP library for command-line argument processing.
A secure, modern PHP user management application and framework.
A video-sharing website, an open source solution that is freely available to everyone.
PHP library to work with date and time in different timezones & formats.
Symfony integration for Sentry.
AST based PHP mutation testing framework.
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?