sticker

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!

August 10, 2017

Hello to the PHP community, and welcome to PHPweekly.com.

We start with several releases from the PHP development team this week. PHP 7.0.22 and PHP 7.1.8 are both available immediately, and the 2nd Beta release of PHP 7.2.0 is ready now for testing.
 
Also this week we have the 2nd part of the Layers, Ports and Adapters series, with this tutorial concentrating on Layers.

The August edition of php[architect] magazine is out now. Titled "Who Goes There", this issue looks at effectively handling authentication and authorisation.

Plus we take a look at the Neo4j Symfony bundle.

And finally, the Five Minute Geek Show podcast gives you a few simple tricks for editing your blog posts. 

Have a great weekend,

Cheers
Katie and Ade

Please help us by clicking to our sponsor:
 

encrypt php scriptsProtect 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.

Articles

Methods Of Teaching
There are many different ways to teach topics of software development. From recorded lectures to pair programming. Over the time we tried many of them with different customers and different topics. I want to provide you with an overview of what worked best for us for which topic.

What’s New On Drupal.org? - July 2017
Read our Roadmap to understand how this work falls into priorities set by the Drupal Association with direction and collaboration from the Board and community.

The Surprising Statistics About Online Shopping 2017 [Infographic]
Every day, more and more consumers are ditching the traditional shopping route for online shopping options. Online shopping not only offers convenience for buyers, but it also allows online businesses to provide competitive offers for consumers. The following infographic further shows the online shopping statistics and what seems to be in-store for the online shopping trend in the near future.

Warning to MergerFS+SnapRAID Users
Are you using MergerFS+SnapRAID to store and protect your important data collection? If you are, then you could be exposing yourself to a data loss. However, it is important to qualify the previous statement by saying the data loss was not due to a bug of either MergerFS or SnapRAID. It was due to a known design limitation that was made as an engineering trade off by the creators.

What Are the Workflows of Prominent PHP Community Members?
Workflow refers to both the process and the tools that are used in this process. Almost every developer comes up with a process of creating and finalising the project deliverables. This process is implemented through a set of tools that the developer comes up with through trial and error. Here are some of the PHP ecosystems most popular developers and designers, and their tools and/or workflows. Note that these workflows will by no means be comprehensive, but even mentions of tools used by some of the more prominent members of our community should be enough to warrant checking them out.

Layers, Ports & Adapters - Part 2, Layers
The first key concept of what I think is a very simple, at the very least "clean" architecture, is the concept of a layer. A layer itself is actually nothing, if you think about it. It's simply determined by how it's used. Let's stay a bit philosophical, before we dive into some concrete architectural advice.

Website Performance Monitoring Tool
Monitoring systems allow you to monitor changes to your front-end code base over time, catching any regression issues and monitoring the ongoing effects of any performance optimisation changes. Easy to use dashboards are a must when it comes to monitoring the state of your web apps. Companies like Calibre or SpeedCurve offer this as a professional service, but not everyone can afford them.

The Journey to 1,000,000 Downloads
This morning I came into work to find my Packagist download counter had rolled over: league/commonmark now has over 1,000,000 downloads! To celebrate this milestone I thought I'd share the story of how this package came about, how it's grown, and how I couldn't have reached this milestone without the PHP communitys help.

Tutorials and Talks

Guru: The PHP Path To Victory, Part 1
This article discusses the path a PHP request takes as it travels through various subsystems up to your RPG code and how to do basic troubleshooting if something goes wrong.

Optimise Model Queries with Eager Loading
Object Relational mapping (ORM) makes working with databases amazingly simple. While defining database relationships in an object-oriented way makes it easy to query related model data, developers might not pay attention to the underlying database calls. A standard database optimisation for an ORM is eager-loading related data. We will set up some example relationships and then walk through how queries change with and without eager loading.

Controlling Bedside Lamp With The TV’s Remote Using Arduino and IR Receiver
I’ve got a new Arduino board (Arduino nano) and I want to hack a little bit. Today I want to play with IR receiver. My idea is to use my TV’s remote and switch on/off one bedside lamp, using one relay. It’s a simple Arduino program.

Post Into Facebook Page Using PHP SDK v5
In this article we are going to learn how you can directly post into Facebook page using PHP from your website or through your own platform.

Introducing the Neo4j Symfony Bundle
There is no such thing as disconnected information, no matter where you look – people, events, places, things, documents, applications and the information about them is all heavily connected. As the volume of data grows, so does the number and dynamicity of its connections. And if you’ve tried in the past to store and query that highly connected, semi-structured data in any database, you probably experienced a lot of challenges. Neo4j was built to handle exactly this real-world information without compromising on the number and types of connections you can have relating your entities.

Track Laravel Model Changes with Laravel Auditing
Laravel Auditing is a Laravel package that aims to make it easy to track eloquent model changes. Along with model changes, each audit record contains the User Agent, audit URL, and the IP address of the user. One of the main use-cases of the package is looking at suspicious activities or unexpected changes in the model.

A Tool To Automatically Rerun PHPUnit Tests When Source Code Changes
In the JavaScript world Jest, built by Facebook, is an excellent tool to run tests. Not only can it automatically rerun your tests when source code changes, but there’s also an interactive mode where you can set a filter on which tests to run while the tool is running. Would it be great if we could have these awesome features while working with PHPUnit?

Horizon/Before The Dive
Laravel Horizon is a queue manager that gives you full control over your queues. It provides means to configure how your jobs are processed, generate analytics, and perform different queue-related tasks from within a nice dashboard. In this dive we're going to learn how Horizon boots up and handles processing jobs using different workers, as well as how it collects useful metrics for you to have the full picture of how your application dispatches and runs jobs.

REST Representations for Expressive
We've been working towards our various Apigility on Expressive goals, and have recently published two new components. These components provide response representations for APIs built with PSR-7 middleware.

Generate Pdfs With Google Chrome on a Forge Provisioned Server
This week I needed to export some charts generated with HTML & JavaScript as a pdf file. I already had implemented the charts on a webpage so I wanted a solution that allowed me to use my existing code for the pdfs. Headless Chrome to the rescue! Chrome can run as a cli tool, and print a pdf file from a url. Al I had to do was make some layout tweaks to make everything printer-friendly.

What’s the Difference Between Mergebot and WP Migrate DB Pro?
Mergebot is officially launched! And we’re pretty excited about it! But one question that we keep getting is: …so how is this different from WP Migrate DB Pro? Which is a fair question. In this article, I’ll outline what Mergebot does, how it works with WP Migrate DB Pro and how they’re different. If you still have questions, hit us up in the comments

Reusing Factories in Zend ServiceManager
I think it is doubtless that modern PHP embraces SOLID principles, and therefore, dependency injection. That's why every modern PHP application needs a dependency injection container to deal with it. There are several options out there, depending on the way you like to work. Every container has a slightly different approach. My choice is zend-servicemanager, it is the one that better suits me.

Connect Microservices With The Help of GRPC
Microservices are all the rage these days. Luckily underneath the hype there are some great use cases for them. If you’re splitting up a monolith codebase into smaller specialised chunks, extracting a long running queue to its own system, or even using particular pieces of code in a different programming language. You always have to solve one architectural problem. How do I make these things talk to each other.

Method Order Assertion in PHPSpec: Deferred Expectations
This post title can be misleading. Method order is just an implementation detail that should not be tested as PHPSpec philosophy is to test your public API, not the implementation as it would lead to fragile tests. Fundamentalists might say that following example should not be performed in PHPSpec but with a functional test. Sadly, when you start with BDD, you may not know that your class will end in a situation where you’re somehow forced to be sure of method invocation order; in such cases you have two choices: drop the spec for this particular class and go on with a functional test or follow this post that provide a solution for the situation where being dependent from implementation could be, somehow, acceptable as test failure due to implementation changes (ie.: method order change) is what we’re trying to reach.
News and Announcements

PHP 7.0.22 Released
The PHP development team announces the immediate availability of PHP 7.0.22. Several bugs have been fixed. All PHP 7.0 users are encouraged to upgrade to this version.

PHP 7.1.8 Released
The PHP development team announces the immediate availability of PHP 7.1.8. This is a bugfix release, with several bug fixes included. All PHP 7.1 users are encouraged to upgrade to this version.

PHP 7.2.0 Beta 2 Released
The PHP development team announces the immediate availability of PHP 7.2.0 Beta 2. This release is the second 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!

WordPress 4.8.1 Maintenance Release
After over 13 million downloads of WordPress 4.8, we are pleased to announce the immediate availability of WordPress 4.8.1, a maintenance release.

Laracon EU - 28-30th August 2017, Amsterdam
Are you a developer who has a passion for building web-applications? Do you love Laravel or are just in the process of getting started? Do you want to meet the community members that help make it all happen? Then this is the place to be. Laracon EU is a unique international Laravel event with over 600 attendees. The conference has multiple tracks and is focusing on in-depth technical talks. Come learn about the state of the industry while networking with like-minded and diversely experienced developers. 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 renowned speakers from the PHP community, presenting about a wide range of topics - from APIs and CMS to unit testing and version control. Tickets are on sale now.        

Nomad PHP US - September 21st 2017 20:00 CDT
Zero to Hero: API Development! Presented by Matt Trask. Everyone these days wants an API for their business. But are we doing it in a way that will keep our developers and users sane for years to come? In this talk, we explore everything from versioning, HTTP status codes, pagination, testing and documentation, all of which will help you years down the road!

Nomad PHP EU - September 21st 17th 2017 20:00 CEST
Crafting Quality PHP Applications, presented by James Titcumb. This prototype works, but it’s not pretty, and now it’s in production. That legacy application really needs some TLC. Where do we start? When creating long lived applications, it’s imperative to focus on good practices. The solution is to improve the whole development life cycle; from planning, better coding and testing, to automation, peer review and more. In this talk, we’ll take a quick look into each of these areas, looking at how we can make positive, actionable change in our workflow.

Podcasts

Changelog Podcast #259: ANTHOLOGY — The Future of Open Source at OSCON 2017
This is an anthology episode from OSCON 2017 featuring awesome conversations with Kelsey Hightower (OSCON Co-Chair and Developer Advocate at Google Cloud Platform), Safia Abdalla (Open Source Developer and Creator of Zarf), and Mike McQuaid and Nadia Eghbal (GitHub Open Source Programs).

MageTalk Magento Podcast #139 - “He Was Totally Hot, He Lent Me His Library Card”
The guys play a new game with Urban Dictionary featuring Magento Solution Partner names.

The Five-Minute Geek Show Podcast: Episode 102 - A Few Simple Tricks for Editing Your Blog Posts
A few simple tricks for editing your blog posts.

PHP Ugly Podcast #67: Block (chain) Heads
Topics include Alcoholics Anonymous meeting during Laraco, and The Ether Thief.

The Versioning Show #32: Taking Responsive Web Design Beyond the Visual
In this episode of the Versioning Show, David and Tim are joined by Chris Ward, a technical writer, blogger and web developer. They discuss a wider interpretation of responsive web design that includes user context, push notifications, future devices and accessibility. They also discuss mobile first and progressive enhancement, tech journalism, the art of documentation, working with Drupal, PHP (and whether it will ever be cool again), and using Wikipedia to learn how to perform an appendectomy.

Reading and Viewing

php[architect] Magazine August 2017 - Who Goes There
You’ve no doubt heard HTTP is stateless, meaning a web server doesn’t know anything from one request to the next for the same client. Beyond news and information sites, however, a web application typically will need to know who you are and what you can do with it to be useful. In this issue, we look at effectively handling authentication and authorisation.

Debugging Failed Tests
This is the 4th post in the "Writing tests for PHP source" series by Sammy Kaye Powers. So far we've learned how to create .phpt tests and run them with run-test.php. But what do we do when a test fails? Today we dig in and debug failed tests.

Cloudways Interview - Founder WP Barber Robey Lawrence
Robey Lawrence first met a computer when he was 9 and since then his story has been one heck of journey. He’s the founder of The WP Barber and a WordPress builder at Bearded Friend. Mr. Lawrence started as a Network Administrator at Advantage IT Solutions and later moved towards web development. He has been using WordPress for over four years now to build websites for small businesses and is one of the organisers of WP Meetups in Australia.

7PHP - Review Of The Ebook Career Advice by Uncle Cal
This is the very first review that I’m doing on 7PHP. This is something that I’m going to implement as part of my new reload this year (2017). I have laid down a framework for myself to do all reviews and this is a work-in-progress till I find myself with the right formula to review and evaluate books. I have a couple of books in my pipeline pending for review, so I will unveil them gradually. Anyhow, if you are an author and you are convinced I would be eager to read your book, send them my way! :)

Code a Custom Drupal Module
Drupal 8 has made it easy to create engaging, content-driven websites for you and your customers. You have been following along with our courses on Envato Tuts+ and learning all the new tips and tricks to wow your clients. Then, you get a phone call. Your biggest client needs you to create some highly customised functionality and embed it somewhere on their site. How are you going to accomplish that? Modules, that's how. In Drupal 8, any time you need to create new logic, custom pages, routes, or forms, you will reach for the module. Drupal 8 modules are easy to learn, but provide so much capability that you will find yourself coming back to them again and again. Follow along with this course and, with just some basic knowledge of Drupal 8 and a little bit of PHP, you will be up and running with modules in no time.

Jobs

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

domjudge
DOMjudge programming contest jury system.

event-espresso-core
Event Espresso is an event ticketing and registration platform for WordPress that makes it easy for you to register attendees for classes, workshops, events, trainings, conferences or concerts, all from your WordPress website.

valet-plus
Blazing fast macOS PHP development environment.

pods
Pods is a development framework for creating, extending, managing, and deploying customised content types in WordPress.

phpmussel
An ideal solution for shared hosting environments, where it's often not possible to utilise or install conventional anti-virus protection solutions.

imscp
i-MSCP (internet Multi Server Control Panel) is a software (OSS) easing shared hosting environments management on Linux servers.

psx
A framework written in PHP dedicated to build REST APIs. It is based on multiple components which cover many aspects of the API lifecycle.

FOSJsRoutingBundle
A pretty nice way to expose your Symfony2 routing to client applications.

wpbrowser
A WordPress specific set of extensions for Codeception.

genisyspro
Feature-rich server software for Minecraft PE and Windows 10 Edition.

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

sourcebans-pp
Global admin, ban, and communication management system for the Source engine.

Please help us by clicking to our sponsor:
 

encrypt php scriptsProtect 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 © PHPWeekly.com