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 31, 2017

Welcome to the latest edition of your favourite PHP newsletter.

The PHP Roundtable podcast is out this week, with guest SammyK talking about his transition from Vagrant to Docker, and all that he encountered on the way.

Also this week, the Summer Open Source Sprint has been announced, taking place in London on September 9th, bringing together the Drupal, Wordpress and Joomla communities.

We learn why you shouldn't be using entities for validation in Symfony forms, despite the recommendations.

Plus we take a look at how "terrible code gets written by perfectly sane people".......

Have you written something you would love to share with the PHP community?
Read something you think our readers would enjoy?

We love hearing from you, so please drop me a line at [email protected] with your podcasts, tutorials, articles, libraries, and general recommendations.

Thanks!
Katie and Ade

Please help us by clicking to our sponsor:

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

Articles

Open-Sourcing Our Guidelines
At Spatie we recently launched a new site: guidelines.spatie.be. It contains articles on how we go about setting things up at Spatie and a collection of styleguides. The source code of the site is available on GitHub. In this blogpost I’d like to share why and how we created our guidelines site.

How Terrible Code Gets Written By Perfectly Sane People
Legacy code can be nasty, but I’ve been programming for 15 years and only a couple of times had I seen something like this. The authors had created their own framework, and it was a perfect storm of anti-patterns. And yet, it was not the code’s dismal quality that piqued my interest and led me to write this article.

One Year of Event Storming
In a way, each new client is my favorite client for a few days. This is the time period when you get to know the people and dive into understanding their problems, which of course requires understanding what they do in the first place (as a matter of fact, "what we do" is sometimes not very clear to the employees, let alone the developers).

Why I Will Pay More Attention To Game Nights
WeCamp was last week and a lot was learned, and a lot of fun was had. Most lessons learned were good and nice, but I'm going to state here and now that I learned about something I should've known before WeCamp, but that I did not pay attention to: Which games to bring to game night.

Tutorials and Talks

 JWTs with React and Laravel
This is a tutorial on how to get JSON Web tokens working so that React can securely communicate with a back-end API. For the purposes of this tutorial I’ll be using Laravel 5.4 for the back-end and React for the front-end. The finished code can be seen here.

Rapid Enterprise App Development with Zend Expressive
If you’ve ever done a Zend Framework quick start, you’ve probably never worked in Zend Framework. The quick start has historically been anything but quick, and it’s easy to lose interest and move on to the next thing. Zend Expressive greatly improves upon this experience with the wizard driven composer create-project command. However, it can still be daunting to set up because there are so many choices to make up front. This tutorial guides you through my recommended setup for rapid development which will yield an enterprise level, robust application.

How To Automate Security Analysis with the RIPS API
RIPS exposes a powerful REST-API, an interface specifically designed for developers and their applications. In this blog post the architecture of the RIPS API is explained and the advantages of a RESTful API are shown. To demonstrate the simplistic nature of our interface, a small CI integration example is given that will reject code commits with security issues and hence protects the production server from new vulnerabilities.

ReactJS in PHP: Writing Compilers Is Easy and Fun!
I used to use an extension called XHP. It enables HTML-in-PHP syntax for generating front-end markup. I reached for it recently, and was surprised to find that it was no longer officially supported for modern PHP versions. So, I decided to implement a user-land version of it, using a basic state-machine compiler. It seemed like it would be a fun project to do with you!

Getting Started with Serverless PHP
Fortunately, and remarkably quickly, IBM have added support for PHP to the Bluemix "IBM Cloud Functions" platform, so now we can use PHP to develop serverless applications and deploy them into the wild! This is a rebranding, so you'll see this referred to as "Bluemix OpenWhisk" around the web too. Let's look at how to write a simple PHP serverless function.

Specialised Response Implementations in Diactoros
When writing PSR-7 middleware, at some point you'll need to return a response. Maybe you'll be returning an empty response, indicating something along the lines of successful deletion of a resource. Maybe you need to return some HTML, or JSON, or just plain text. Maybe you need to indicate a redirect.

Phorkie is Composer-Installable
To be able to install all of phorkie's dependencies with composer, I spent a good part of the last week to bring a number of PEAR package onto packagist.org. Previously I had resorted to composer's PEAR server interface, which is pretty slow and error-prone. Time to get that fixed.

Arachne/Security - Simplified Authorisator and Fixed ACL Callbacks
Authorisation in Nette/Security has some long-known drawbacks as demonstrated in my 4 years old RFC (Czech only). This article will show you how you can solve these problems using the enhanced API provided by Arachne/Security.

Quickly Edit Your Theme Colours and Fonts in PhpStorm
PhpStorm has released a new feature that allows you to quickly find and edit the theme style for a given line you want to change. To change the theme style for a given line, put your cursor on the line you want to change, press Double Shift (Search Everywhere), and type Jump to Colours & Fonts.

Theme-Based Views in Laravel Using Vendor Namespaces
I'm building a multi-tenant Laravel application. One of the requirements of the project is that every client can have their own theme based on their corporate guidelines. By default a few css adjustments will suffice, but some clients request a completely different template.

Understanding Laravel Pipelines
Basically, using laravel pipelines you can pass an object between several classes in a fluid way to perform any type of task and finally return the resulting value once all the “tasks” have been executed. Here you can learn more about the Laravel pipelines.

Theme-Based Views in Laravel Using Vendor Namespaces
I'm building a multi-tenant Laravel application. One of the requirements of the project is that every client can have their own theme based on their corporate guidelines. By default a few css adjustments will suffice, but some clients request a completely different template.

Adding a User to Your Bluemix Space
I'm at the stage where I need to give another developer access to my IBM Cloud Functions actions. I'm not really an infrastructure person and I found the user management pages on the Bluemix console incomprehensible, so used the command line. This is how I did it so that I don't have to work it all out again.

How CodeIgniter's Hook System Works
As a CodeIgniter developer, sometimes you end up in a situation that requires you to alter the core of the framework or the execution flow to fulfill your custom requirements. Of course, it's never recommended to modify the core files as it makes the upgrade process cumbersome. Luckily, the CodeIgniter framework comes with the hooks system, which allows you deal with this scenario. In this article, we'll start with an introduction to the hooks system in the CodeIgniter framework. Then, we'll discuss the different types of hooks available. And finally, we'll grab this opportunity to explore the creation of custom hooks.

Laravel Bash Aliases
Bash aliases are shortcuts added to a file that allows you to reference another command through more memorable words, abbreviations, or characters. For example, if you use Git you may run git status many times throughout the day, so to save yourself time and keystrokes you could alias gs to git status and it’ll automatically expand and call the proper command.

Don't Use Entities in Symfony Forms - Use Custom Data Objects Instead
Let's start with stating that using entities for validation in Symfony Forms is widely used and widely recommend approach. Even the official documentation suggests it. And I don't think it is a good idea! Why?

Introducing Floyer
At my company, they still use ^svn^ and on top of that ^ftp^ and it was pain in the ass to upload files especially when client didn't have dedicated hosting or where there was no SSH access available. I did find some git-to-ftp or svn-to-ftp deployment tools but they were very slow because they uploaded each file individually. I sat down over the weekend and came up with my own solution Floyer (shortened from FTPDeployer). It works with both git and svn and is quit fast able to upload hundreds of files in few seconds. Other than FTP, it also supports SFTP.

Deploying a PHP Application to Cloud Foundry
I recently had a requirement to deploy a Slim application somewhere. As I already have a Bluemix account, it seemed sensible to deploy it to their Application Runtimes service which is an installation of the Open Source Cloud Foundry project. This turned out to be quite easy, but there are a number of steps involved, so I'm documenting it here.

Running WordPress in a Kubernetes Cluster
As a developer I try to keep my eye on the progression of technologies that I might not use every day, but are important to understand as they might indirectly affect my work. A good example of this progression is the rapid development of container orchestration platforms that allow you to easily deploy, scale and manage containerized applications. In this article, we’re going to start simple and take a look at the Kubernetes platform and how you can set up a WordPress site on a single node cluster on your local machine.
News and Announcements

Summer Open Source Sprint - 9th September 2017, London
Open Source sprints enable anyone working with Open Source software to collaborate with the community and help to improve it. This September we’re opening our studio for our first Open Source Sprint where the Drupal, WordPress and Joomla communities will join together to raise their skill levels, and help solve our common problems. Sprinting is a great way to collaborate, and to share new ideas and technologies across our communities. Therefore everyone is welcome, testers too! 

SymfonyLive - 17th-20th October 2017, San Francisco
We’re back! SymfonyLive is coming back, that’s right, back to our beloved San Francisco for a whole new chapter in our conference series for 2017. We are ecstatic to return to the city by the bay and host the American Symfony community. Symfony fans of The City, don’t miss the upcoming presentations, discussions, symposiums, meetups and our wonderful conference happy hour. Tickets are on sale now.

International PHP Conference - 23rd-27th October 2017, Munich
The International PHP Conference is the worlds first PHP conference and stands since more than a decade for top-notch pragmatic expertise in PHP and web technologies. Internationally renowned experts from the PHP industry meet up with PHP users and developers from large and small companies. Two days of power workshops and two conference days with over 70 international speakers and experts. Early Bird tickets are on sale now.

PHP[World] Conference - November 15-16th 2017, Washington DC
Four years ago the team behind php[architect] magazine wanted to create a conference designed to bring all the PHP communities together. Hence, the idea of php[world] was born. It's an event that is intended to bring the entire world of PHP together in one place, to encourage cross-pollination of ideas and sharing of ideals. Tickets are on sale now.

Longhorn PHP Conference - 19th-21st April 2018, Austin Texas
Longhorn PHP is a 3-day conference in Austin, Texas to help PHP developers level up their craft and connect with the larger PHP community. Our main goal as a conference is to equip attendees to be better developers. If you work with developers or alongside developers, we'll showcase tools and techniques to level up your ability to solve the problems you face every day. Tickets will soon be available using the Kickstarter Campaign.

Podcasts

dev/hell Podcast Episode 93: 40 Attendees Enter, None Leave
Chris has finally moved his vast grumpy empire to it’s new location, so it was time to record an episode and get their hands on that sweet, sweet Patreon money. In this scintillating episode we talk about deliberate change in your life to achieve a new set of goals, along with upcoming conference appearances. Chris also reveals a dark secret about his new adopted home town and Ed mocks Chris for temporarily confusing two Lous. 

Three Devs and a Maybe Podcast - The Agile Approach to Bitcoin
After a month ‘off the airwaves’, Mick and Edd are back to delve into several topics that have been keeping them interested. We start off by going down the Cryptocurrency rabbit-hole, highlighting the internal technologies that make up Bitcoin and its practical use-cases. Edd’s ramblings touch upon Satoshi, Cypherpunks, Merkle trees, Consensus algorithms, Hard forks, Segregated witness, Mining, Peta-hashes and much more… Once Edd (finally) lets Mick talk, we move on to chat about a book Mick is reading on Scrum, and question some different Agile practises. Finally, we ask the burning question ‘What is the Internet, Anyway?’.

MageTalk Magento Podcast #140 - “I’m Gonna Skenaegel It”
Phillip invents "stories" for Magento and Kalen tries to explain GraphQL, and the guys argue about whether streaming events affects attendance.

Laravel News Podcast LN44: Laracon EU, Incoming Mail, and API Resources
In this episode of the Laravel News podcast, Jake and Michael talk about Laracon EU, handling incoming email, bash aliases, and API resources.

PHP Ugly Podcast #70: The Triumphant Return
Topics include Benchmarks Of PHP 7.2 Beta and "Wifi enabled" Crock-Pot.

PHP Roundtable Podcast Episode 66: Docker: Drinking the Kool-Aid
After years of resisting, SammyK finally drank the Docker Kool-Aid for his everyday client work. We talk about his transition from Vagrant to Docker and some bumps he hit along the way.

Full Stack Radio Podcast Episode 71: Building a CSS Framework with PostCSS
In this episode, Adam is joined by Matt Stauffer of Tighten to talk about building a CSS framework with PostCSS.

Reading and Viewing

PHP Town Hall Podcast #54: Conferences and Stuff
Amanda Folson and Ben Edmunds are joined by Daniel Cousineau, Tracy Hinds, Ian Littman, and Matt Trask to discuss the good, bad, and ugly of conference organising. Watch the video here.

Cloudways Interview - Rachel Lawson Discusses Drupal Development and Her Freelance Career
Cloudways interviews the bike-touring, jolly and very much likable Rachel Lawson. Learn about freelancing in Drupal through her freelance Drupal career along with the advantages and some drawbacks associated with it.

Exploring PHP - SitePoint Premium Courses
We’ve compiled some of our favourite PHP lessons into this neat mini course. Get ready to jump between useful PHP tactics, explore PHP packages, you’ll event learn how to secure your PHP pages. With the lessons in this mini course, you can drastically reduce the amount of code you write for various common tasks and some not so common tasks, such as prepopulating databases and creating spreadsheets.

PHP Programming: Using MySQL & Oracle Kindle Edition (by Francis John Thottungal, published 26th August 2017)
PHP Programming using MySQL & Oracle in an introductory book in PHP programming using both versions 5 and 7 of PHP. This introductory book goes through the basics needed for new PHP programmers to make dynamic websites in the shortest period of time.

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

pufferpanel
An open source game server management panel, designed for both small networks and game server providers.

clean-code-php
Clean Code concepts adapted for PHP.

bake
This project provides the code generation functionality for CakePHP. Through a suite of CLI tools, you can quickly and easily generate code for your application.

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

raise
Internet of things open middleware.

cerb
Cerb brings order to a busy team inbox with bot powered email management and workflow automation. Used by thousands of teams for 15+ years.

wondercms
The smallest flat file CMS.

apiato
A flawless framework for building scalable and testable API-Centric Apps with PHP and Laravel.

rollbar-php
This library detects errors and exceptions in your application and reports them to Rollbar for alerts, reporting, and analysis.

yetiforcecrm
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.

egroupware
Web based groupware server written in PHP.

openemr
The most popular open source electronic health records and medical practice management solution.

laravelzero
A micro-framework that provides an elegant starting point for your next console application.

yclas
Yclas self-hosted is a powerful script that can transform any domain into a fully customisable classifieds site within a few seconds.

Please help us by clicking to our sponsor:

Signup
Try SparkPost Free. Email Delivery & Analytics Built for
Developers, By Developers.
 

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