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!

June 16, 2016

Hi there PHP fans ;)

This week a development preview of PHP 7.1.0 Alpha 1 has been released, marking the beginning of the first minor releases in the PHP 7 series.

Also, after last weeks 100th edition of the Three Devs and a Maybe podcast, one of the team, Edd Mann, generated some stats relating to the previous 99 episodes, and subsequently created a quiz from the results.

We take a look at how the automated testing infrastructure works on Drupal.org, as opposed to writing the tests themselves.

Plus the quest for a Rainbow coloured ElePHPant has taken another step closer to reality.

And finally, PHP North West conference has been announced, taking place in Manchester at the end of September. The Call for Papers is open now.

Enjoy your read!

Cheers
Ade and Katie

We love our sponsors. Why not try them?

From our sponsors:

SourceGuardian 25% Exclusively to PHP Weekly readers, we have an offer on SourceGuardian, up until the end of July2016 (was June 2016, but its been extended), to receive 25% off the purchase price of SourceGuardian. Protect your PHP code. Download the free trial and use the following discount code: bldcvzrh0FIw5AoY

Articles

Musings of a PHPDiversity Rainbow Elephpant
For those of you who don’t know me yet, I’m Enfys, the PHP Diversity Rainbow Elephpant; or at least, I shall be when I’m real. At the moment, I’m just a virtual Elephpant, an idea inpired by a photoshopped picture by  Peter Kokot (a Slovenian developer); but someday soon I hope to be a real Elephpant, and join the PHP worldwide herd. And yesterday, my dream came a step closer to reality.

Sourcehunt: Conferences, Oauth2 in Slim, Static Analyzers, Etc.
Hello there, hunters! Before getting into this month’s links you should star and / or contribute to, I’d like to briefly give a shoutout to two conferences I attended and participated in this month: OSCAL and PhpKonf. Skip this section if you’re just interested in this month’s link list.

Analysis of Coding Conventions
PHP_CodeSniffer, using a custom coding standard and report, was used to record various coding conventions across 193 PHP projects. Here are the results.

The Syntax of Tech Communities
Just like the programming languages that are the centres of our communities, each community has its own set of rules and idioms - they have a real life syntax. In my (almost) three years of being in a developer relations type role I have attended events in several communities and have observed how they differ from my primary community (PHP). As I’ve tried to understand those differences and the reasons behind them, I have had many discussions with members of many more communities also. After attending my first PyCon (US) I was struck by just how welcoming and diverse the community is and had many conversations trying to understand why this is. This is not what this post is about. This post is about conferences specifically, and show communities place different priorities on different things when it comes to how they run, organise, speak at, and attend events.

How to Refactor Without Breaking Things
Refactoring means to change the structure of your code without changing its behaviour. It is an essential part of everyday programming and should become knee-jerk for your whole development team. Refactoring is very helpful to cleanup feature spikes, revise earlier decisions and keep a maintainable codebase in the long run. In a perfect project world - with extensive automated tests of various types - this is just a matter of getting used to. But there are only very few such projects. So getting into proper refactoring is much harder. This article will show you important tips to master this challenge with your team.

Tutorials and Talks

Find Mongo Document By ID Using The PHP Library
My new job as a Developer Advocate with IBM means I get to play with databases for a living (this is the most awesome thing ever invented, seriously). On my travels, I spent some time with MongoDB which is a document database - but I ran into an issue with fetching a record by ID, so here's the code I eventually arrived at, so I can refer to it later and, if anyone else needs it, hopefully they will find it too.

DrupalCI: Continuous Integration Testing for Drupal.org
The goal of automated testing is confidence: confidence in application stability, and confidence that new features work as intended. Continuous integration as a philosophy is about speeding the rate of change while keeping stability. As the number of contributing programmers increase, the need to have automated testing as a means to prove stability increases. This post is focused on how the automated testing infrastructure on Drupal.org works, not actually writing tests.

Nitpicking over Code Standards with Nitpick CI
There are many ways to make sure your code respects a given code standard – we’ve covered several before. But enforcing a standard team-wide and making sure everyone knows about mistakes before they’re applied to the project isn’t something that’s very easy to do. Travis and Jenkins can both be configured to do these checks, but aren’t as easygoing about it as the solution we’re about to look at: Nitpick CI.

Using PHP CodeSniffer With WordPress: Understanding Code Smells
In this article, we're going to take an introductory look at code smells. We're going to examine what they are, what they look like, and how they often manifest themselves in the work we do. We'll be using PHP for our examples.

An 'array_column' Re-indexing Trick in PHP
The array_column function has been a welcome addition to the PHP language, allowing us to remove the need for common-place array_map invocations that just pluck specific values from arrays. However, I just found out that you can provide a third argument that allows you to define what the returning arrays keys will be. 

Concurrency in Version 3 of the AWS SDK for PHP
From executing API commands in the background to grouping commands and waiters into concurrent pools, version 3 of the AWS SDK for PHP lets you write asynchronous code that blocks only when you need it to. In this blog post, I’ll show you how to take advantage of some of the SDK’s concurrency abstractions, including promises, command pools, and waiters.

A Blade Directive to Export PHP Variables to JavaScript
This week we released our new package called laravel-blade-javascript. It provides you with a javascript Blade directive to export PHP variables to JavaScript. So it basically does the same as Jeffrey Way‘s popular PHP-Vars-To-Js-Transformer package, but instead of exporting variables in the controller our package does it a view.

How To Use Corcel Laravel WordPress API to Create Web Applications - Corcel (Laravel + WordPress) Package Blog
WordPress is certainly the most popular PHP application ever. However, many PHP developers do not like to develop on top of its code because it is in great part not based on object oriented code, and does not follow the latest PHP framework trends. Nowadays many developers love newer frameworks like Laravel to build their applications. The Corcel framework brings the two worlds: WordPress and Laravel or other modern frameworks. Read this article to learn how you can use the Corcel framework to build applications on the top of WordPress backend.

Run GrumPHP Git Hooks Within Vagrant
A couple of weeks back while attending AmsterdamPHP, Mike Chernev gave a talk about GrumPHP. Very cool looking tool, but during implementation I found out the default setup assumes running grumphp on the same machine (whether that is a VM or iron) as committing. That is a problem in my set up, where all PHP related code runs in vagrant and committing on the host using PHPStorm. Lets fix that.

Generating Podcast Stats in PHP
In the 100th episode of Three Devs and a Maybe I decided to generate some stats relating to the previous 99 episodes and formed a small quiz out of these findings. All information relating to each podcast is stored in separate Markdown files within YAML front-matter, which makes it easy to pull out and process. I thought it would be interesting to go over the code I used to achieve this.

Phinx – the Migration Library You Never Knew You Needed
You’re building an application, and you need to share the database’s structure with your team. After all, you want everyone to be up and running as soon as possible. What do you do? SQL dumps of table structures? You could… but that’s so very primitive – and can be time consuming to import, too! More often than not, database migrations are the answer. In this tutorial, we’ll go through a framework-agnostic package for building and executing database migrations called Phinx.

Automatic www/non-www URL Handling 
When you set up a website, there are two ways people can access it: www.yourdomain.com, or just yourdomain.com. This creates a couple of problems. First, unless you've set the site's cookie domain to .yourdomain.com, when someone logs in at yourdomain.com they won't be logged in at www.yourdomain.com -- which leaves them confused if they end up on the other version from a link they found somewhere. Secondly, search engines don't like the duplication.
News and Announcements

PHP 7.1.0 Alpha 1 Released
The PHP development team announces the immediate availability of PHP 7.1.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 North West Conference - 30th September - 2nd October 2016, Manchester
For the ninth year running, the community run PHPNW Conference will be ready to welcome over 500 delegates to the Manchester Conference Centre in October. Our conference has the reputation within the PHP community as a ‘go to’ conference, with our friendly style, inspiring content and valuable community network. Join us for 2016 for our biggest event yet! The Call for Papers is now open.

Bulgaria PHP Conference - Oct 7-9th 2016, Sofia
Our core purpose with Bulgaria PHP Conference is to provide uncompromisable quality of content and strengthen the broader European PHP Community. But we also want to have a lot of fun along the way - us and our partners and attendees. So, Game ON! Tickets are on sale now.

ZendCon - Oct 18th-21st 2016, Las Vegas
We’re pleased to announce the ZendCon 2016 PHP Conference, the most anticipated PHP centric event of the year, where community and enterprise PHP developers from around the world gather to share and learn the latest hot trends and technologies in today's professional PHP development. Tickets are on sale now.

Nomad PHP US - July 28th 2016 20:00 CDT
How the 3rd Normal Form Destroyed a Family, presented by Chuck Reeves. This is the story about how the 3rd Normal Form (3NF) destroyed the Smith family. We start off with John and Jane Smith, simple database designers. John is the DBA for a huge commerce store, while Jane is the DBA for a financial company. All John and Jane know is the 3NF, which made designing their databases quite challenging. Fatal flaws following this design pattern causes both of them to lose their jobs. If only they knew about other database types out there and how those could have saved their jobs and their marriage. Instead of falling into the same trap as the Smiths, learn about different database systems out there and the problems they solve. Graphs, Document Store, Column-oriented, these different systems all solve different problems which could have prevented disaster. Don’t become like the Smiths, learn to think differently about how you store your data.

Nomad PHP EU - July 28th 2016 20:00 CEST 
Grown-up MongoDB: Schema Design, presented by Derick Rethans. Although MongoDB is a non-relational database, it is still very important that you store your data in an optimal way. This presentation makes you grow up from just starting with MongoDB, to a seasoned user, by teaching you how to design your data schema according to your applications needs. This requires a different mindset than designing for a relational database. Besides schema design techniques, I will also cover how to pick indexes, different types of indexes, and a way to find out why queries are potentially not as fast as they could be.

Podcasts

dev/hell Podcast Episode 78: Who Leaves Velveeta and No Beer in a Fridge?
It’s rare that we have some folks who work for the same employer back-to-back on the show, but this time out we spoke with Jessica Rose. Jessica is Tracy Osborne’s boss (Tracy was on the show in Episode 77) and talked about her own experiences creating a different kind of developer relations team at Dream Factory. Along the way we found out how much better Chris handled jet lag at the same Australian conference Jessica was at, and how thankful she is her husband pays zero attention to Twitter.

Three Devs and a Maybe Podcast - Introduction to Webpack with Juho Vepsäläinen
In this weeks episode we talk to Juho Vepsäläinen about all things Webpack. We start off the discussion with how he got into JavaScript and what drew him to write the SurviveJS books. Moving onto Webpack, we chat about the problem it is trying to solve, what a bundler is and how it differs from a task runner. We highlight some of the interesting features that Webpack has to offer, such as bundle splitting, integration with UglifyJS/Babel and lazy loading. Finally, we discuss the road-map for Webpack 2, new concepts which are being integrated such as tree shaking for dead code elimination and weighing up use of CDNs for dependencies.

Acquia U and Career Changers - meet Doris Wong
Doris Wong and I sat down at Acquia's Boston HQ to talk about her interesting journey through HTML and frontend work, to UX, to fitness, and finally to Drupal and Acquia, and how even at Acquia it took time, Acquia U and three jobs (!) to really settle in. Here, we talk about that path and what she got out of Acquia U. Read this blog post on Doris' website for a wonderful, clear introduction to who Doris is and how she got to Acquia and Drupal development.

MageTalk Magento Podcast #96 – “Hey Baby We Ain’t in a Hurry”
The guys dissect the LESS v Sass debate, Enterprise Cloud pricing, and get into the details of NomadMage.

LaraChat Live - Episode #9
The ninth episode from the Slack Channel devoted to learning about Laravel.

The Laracasts Snippets Episode 27 - Choose Your Tribe Wisely
Whether we like it or not, humans have a tendency to insert themselves into small communities or factions. In the coding world, it's certainly no different. And that's specifically why it's so important that we think long and hard about which tribes we choose for ourselves. That single choice can have huge ramifications, when it comes to how we approach and think about code.

The John Morris Show Podcast - The REAL Secret to Success In Web Development
If you’ve been around these parts any amount of time, you know I get my fair share of hate mail… and I like to point out certain ones when I think there’s a deeper lesson to be learned. Well… here we go again! 🙂

Reading and Viewing

Identify All the Things With UUIDs!
Universally unique identifiers (UUIDs) are a fun and exciting way to identify things. We can issue UUIDs forever and never run out; they’re practically unique! Join this whirlwind adventure in search of the perfect identifier to find out why UUIDs might be good for your projects.

Traveling to Gdansk (Poland) for the InfoShare Conference 2016
On May 19th 2016 I was invited to speak at the InfoShare Conference in Gdansk (Poland). I had never heard of the event before, but I had very good experiences with previous conferences in Poland. So I was happy to accept the invitation and fly to Gdansk. Watch the trip report here.

Matthew Lechleider Community Spotlight
Matthew Lechleider (Slurpee) has been active in the Drupal community for over a decade, and his hard work has directly led to an incredible amount of community growth. The founder of a Chicago Drupal User Group and our community’s chief advocate for the Google Summer of Code and Google Code-In programs, Matthew has been a key part of growing the Drupal project and our global community. Here's his Drupal story.

Interview with WordPress Expert Robby McCullough
Robby is the co-founder of Beaver Builder, a WordPress builder solution. He is well known as a WordPress expert, web designer, developer, and marketer. He joined FastLine Media in 2013 and has been involved in WordPress development ever since. In his free time, he enjoys fishing, biking and live music events. He is very partial to coffee and sushi and trys not to use emojis (he prefers old-school emoticons) 😉 In his interview with Cloudways, Robby talks about his experiences and personal life.

PHP 7 Quick Scripting Reference Paperback (by Mikael Olsson, published 18th May 2016)
This pocket reference guide has been updated with the new PHP 7.0 release. It is a condensed, code-rich scripting and syntax handbook for the PHP scripting language. PHP 7 Quick Scripting Reference presents the essential PHP script in a well-organised format.

Mastering Drupal 8 Views Paperback (by Gregg Marshall, published 24th May 2016)
Get the only book on the market that talks about Drupal 8 views and their importance for developers. A practical, step-by-step guide with illustrative examples to give you a clear understanding of Drupal 8 views, how views work and how they help to create modular applications.

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

designpatternsphp
This is a collection of known design patterns and some sample code how to implement them in PHP.

php-gui
Extensionless PHP Graphic User Interface library.

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

php-parallel-lint
This tool check syntax of PHP files faster than serial check with fancier output.

last-wishes
Last Wishes is a PHP application written following Domain-Driven Design approach.

typesetter
Open source CMS written in PHP focused on ease of use with true WYSIWYG editing and flat-file storage.

soft-mocks
PHP mocks engine that allows you to redefine functions and user methods on-the-fly (provides similar functionality to runkit and uopz extensions).

resource-proxy
Proxy files for DotNet, Java and PHP.

knapsack
Knapsack is a collection library for PHP >= 5.6 that implements most of the sequence operations proposed by Clojures sequences, plus some additional ones.

mellivora
Mellivora is a CTF engine written in PHP.

image
PHP image manipulation .

predis
Flexible and feature-complete Redis client for PHP and HHVM.
Please help us by clicking to our sponsor:


 From our sponsors:
SQL Dashboards in a Flash Periscope Data lets you run analyses over billions of rows in seconds

(ads by LaunchBit) 

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 
 


Protect your PHP code with SourceGuardian 10. Free trial.

 

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