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!

March 2, 2017

Welcome to the latest @phpweekly newsletter.

If you've ever been put in charge of organising a meet-up, chances are you've forgotten something and gone through a lot of stress in the process. What could me more useful than a complete checklist? 

Also this week we take a look at how to handle configuration in PHP, something that really hasn't changed much since its inception twenty plus years ago.

The latest Laracasts Snippets podcast asks us to "stop shaming tools".

Plus there are a lot of candidates from around the world vying to serve on the Drupal Association board. Voting takes place between March 6-18th, so meet each one here and decide which community voice you want to represent you.

And finally, the schedule for this years php[tek] Conference in Atlanta has been announced, including four days of training, eight workshops and 6 keynotes. Tickets are on sale now.

Enjoy your read!

Cheers
Katie and Ade

We love our sponsors. Why not try them?

 From our sponsors:
Know when and why code breaks Users finding bugs? Searching logs for errors? Find + fix broken code fast!

(ads by LaunchBit) 

Articles

6 Reasons WordPress Makes Perfect Sense For Enterprise
What do Beyonce, Sony Music, and Best Buy all have in common? All of their sites are powered by WordPress, showing that the CMS has the ability to scale and provide amazing digital experiences for visitors to keep coming back to.

Doing Our Part For The Community
The Drupal Association Engineering Team delivers value to all who are using, building, and developing Drupal. The team is tasked with keeping Drupal.org and all of the 20 subsites and services up and running. Their work would not be possible without the community and the project would not thrive without close collaboration. This is why we are running a membership campaign all about the engineering team. These are a few of the recent projects where engineering team + community = win!

Best PHP IDE 2017 and 2016 Comparison - The Most Popular Editors for Development under Windows, Mac and Linux either Open Source, Free or Commercial
Most PHP developers use an IDE (Integrated Development Environment) to become more productive. There are several PHP IDEs, some more advanced than others, some are commercial and others are free. Read this article to compare the features of some of the most popular IDEs being used by PHP developers, so you can decide which one suits you best.

How To Organise a Meetup
I've organised a few DDDBE meetups in the past, and always succeed in forgetting something. Either someone points it out well in advance, or I end up stressing last minute. This post partly serves as a checklist for myself, but it would be a welcome side effect to also see it encourage others to help out organising future meetups. Organising a meetup is not rocket science, having a list of what to take care of is a good start.

Tips For Building Your First Laravel Package
Laravel is a powerful and modern framework. It has tons of different features, which make our work faster and easier. But you can’t push everything into the single box. At one time or another, we’ve all been in need of something not implemented in the framework out of the box. So, you’re writing code by yourself; it works, and you are happy. Yep? But what if you need the same functionality in another project? Will you write it again? Copy-paste it? Both solutions are bad because you’re solving the same problem again and again. And what about bugs? Imagine finding a bug in that code a few days later. Now you have to fix it in N places. Ufff, not fun!

Tutorials and Talks

Building Your Startup: Meetings With Multiple Participants
Scheduling meetings with multiple participants was always part of my plan - but not part of the earliest Minimum Viable Product (MVP). The alpha release of Meeting Planner launched with only 1:1 scheduling. The goal of supporting group scheduling sat on the task list like Mount Everest to a climber aiming for the seven summits (and I'm not even an outdoor climber).

Code Review: Single Responsibility Principle
Single Responsibility Principle (SRP) is probably one of the most well-known principles from SOLID. At its core is a desire to prevent classes from becoming overwhelming and bloated while enabling the ability to change how a single thing works by only changing a single class. So the benefits of SRP are that you have an easier codebase to maintain, since classes are less complex, and when you wish to change something you only have to change a single class. In this blog, I will go through some ways to try and help avoid breaching SRP while doing code review.

PHP Fractal – Make Your API’s JSON Pretty, Always!
If you’ve built an API before, I’ll bet you’re used to dumping data directly as a response. It may not be harmful if done right, but there are practical alternatives that can help solve this small problem. One of the available solutions is Fractal. It allows us to create a new transformation layer for our models before returning them as a response. It’s very flexible and easy to integrate into any application or framework.

Battle Log: Symfony Routing Performance Considerations
Last week I took a deep dive into Symfonys Routing Component. A project I worked on suffered from a huge performance penalty caused by a routing mistake. This lead me on the path to discovering some interesting performance considerations. Some common practices align nicely with Symfonys optimisations, so let's look into those.

WikiMedia, Clean Architecture, and ADR
tl;dr: Action-Domain-Responder is a natural fit for the HTTP user-interface portions of Clean Architecture (or Hexagonal), especially with Domain Driven Design. Just be sure to remember to separate the HTTP response presentation from the action code.

Mitigating PHP’s Long Standing Issue With OPCache Leaking Sensitive Data
A very old security vulnerability has been fixed in PHP, regarding the way it handles its OPCaches in environments where a single master process shares multiple PHP-FPM pools. This is the most common way to run PHP nowadays and might affect you, too.

PHPUnit  -  Mocking the File System using vfsStream
Recently I found myself needing to write tests for a small class that read from a json file. The class needed to read a json file, validate its existence and content, provide a method to inform the user if a certain key exists, and provide a method to retrieve a value for a given key.

Sylius and Cutting Your Teeth on TDD
Sylius is an e-commerce application/framework based on Symfony. It boasts 100% code coverage, which is impressive for a PHP application of that size. In this article, we are going to walk through the different kinds of tests available and try out some Test and Behaviour Driven Development (TDD/BDD). See the Sylius installation guide page for instructions, as this article assumes you have a working installation with example data and you can run Behat, PHPUnit and phpspec tests.

How To Handle Configuration in PHP
Configuration management hasn’t changed much in PHP for, oh, the last 20 years or so. Basically, all of its life. Configuration file format has changed in that you can use XML, YAML, JSON, or PHP include files. But that is not configuration management. In other industries there are entire companies devoted to configuration management, but in PHP we are still largely relying on configuration files to provide our applications with variable configuration values.

Composer Require Inline Alias
Here’s a feature of composer that I didn’t know about until a few days ago – require inline alias. 

How To Upload Multiple Files in Laravel 5.4
File upload is one of the most commonly used features in web-projects. And it seems pretty easy – form, submit, validation, store. But it gets a little more complex if you want to allow your users to upload more than one file with one input – let’s see how it’s done in Laravel.

Duck-Typing in PHP
For quite some time now the PHP community has becoming more and more professional. "More professional" in part means that we use more types in our PHP code. Though it took years to introduce more or less decent types in the programming language itself, it took some more time to really appreciate the fact that, by adding parameter and return types to our code, we can verify its correctness in better ways than we could before. And although all the type checks still happen at runtime, it feels as if those type checks already happen at compile time, because our editor validates most of our code before actually running it.

zend-config For All Your Configuration Needs
Different applications and frameworks have different opinions about how configuration should be created. Some prefer XML, others YAML, some like JSON, others like INI, and some even stick to the JavaProperties format; in Zend Framework, we tend to prefer PHP arrays, as each of the other formats essentially get compiled to PHP arrays eventually anyways. At heart, though, we like to support developer needs, whatever they may be, and, as such, our zend-config component provides ways of working with a variety of configuration formats.

Playing with RabbitMQ, PHP and node
I need to use RabbitMQ in one project. I’m a big fan of Gearman, but I must admit Rabbit is much more powerful. In this project I need to handle with PHP code and node, so I want to build a wrapper for those two languages. I don’t want to re-invent the wheel so I will use existing libraries (php-amqplib and amqplib for node).
News and Announcements

Drupal 8.3.0-rc1 is Available For Testing
The first release candidate for the upcoming Drupal 8.3.0 release is now available for testing. Drupal 8.3.0 is expected to be released on April 5th.

Symfony Live Paris: 30-31st Match 2017
After an excellent SymfonyCon Berlin 2016, we meet in Paris for SymfonyLive, a local conference entirely in French on the innovations of Symfony. This is the 9th edition of the Paris SymfonyLive and SensioLabs is pleased to announce that registration is open! The SymfonyLive Paris 2017 conference is a unique opportunity to exchange with not only Symfony team and community members, local and international experts, but also to discover the latest Symfony features, the most advanced uses as well as its evolution for the months and years to come. Tickets are on sale now.

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! An amazing schedule has been put together, including 4 full-day training classes, 8 hands-on workshops, 40 breakout sessions and 6 keynotes, all being provided by 40 different speakers from around the world. Tickets are on sale now.

International PHP Conference - May 29th-June 2nd 2017, Berlin
The International PHP Conference is the world’s first PHP conference and has been going for 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. Early Bird tickets are on sale now.

Dutch PHP Conference  - 29-30th June-1st July 2017, Amsterdam
Ibuildings is proud to organise the eleventh Dutch PHP Conference on June 30th and July 1st, plus a pre-conference tutorial day on June 29th. Both programs will be completely in English so the only Dutch thing about it is the location. Keywords for these days: Know-how, Technology, Best Practices, Networking, Tips & Tricks. Tickets are on sale now.

Podcasts

PHP Articles Report February 2017 Edition
This is the February 2017 edition of the podcast hangout recorded by Manuel Lemos and Arturs Sosins to comment on the latest outstanding PHP articles published recently. In this edition they discuss articles about the fastest method to evaluate the performance of a PHP Web application, hire a server that can handle its needs in terms of CPU, RAM and disk, sending postal mail and cheques using an API, gamify a site on the site link secret path, parsing and converting text with an amount in English to the respective number, and a simple tutorial on how to use MySQL with PDO in PHP 7.

dev/hell Podcast Episode 88: Ocho Ocho
A short-ish episode this time out where our Dynamic Duo went guestless and talked about their recent conference experiences in Salt Lake City, Antwerp, and Miami.

Three Devs and a Maybe Podcast - Developing Zencastr with Josh Nielsen
In this weeks episode we are joined by the creator of Zencastr, Josh Nielsen. We start off the discussion with how he got into programming and being hired as a ‘webmaster’ at the University he attended. From here, we move on to highlight the problem Zencastr is trying to solve, delving into some of the technical aspects and corners that were cut to focus on the primary solution. Finally, we mention the testing strategy in place, how it is changing as the product stabilises and what features are next in the pipeline.

Full Stack Radio Podcast Episode 59: Jonathan Reinink - Form Hell Part 2: Complex Validation
In this episode, Adam and Jonathan continue their discussion about forms from episode 54, this time focusing on the complexities of validation.

MageTalk Magento Podcast #118 - IDC Survey Review With Peter Sheldon
The guys sit down with Peter Sheldon of Magento to discuss the new IDC economic impact survey.

The Five-Minute Geek Show Podcast: Episode 97 - Conducting Reasonable, Grown-up, Discourse Online
There's a big difference between conversation and snarky quips.

PHP Roundtable Podcast Episode 61: Dependency Injection 
Dependency Injection has been a design principle that the PHP community has embraced more fully than a lot of other programming communities. There's even an official PHP-FIG standard being discussed called PSR-11 which will standardise dependency injection containers. Today we chat all things dependency injection.

The Laracasts Snippets Episode 59: Stop Shaming Tools
 "Don't use tools," they say. "It won't exist in a few years, but these design patterns will." Of course, the argument is that, if you dedicate any time at all to embracing libraries and frameworks that actually allow you to get the job done, you're somehow, as a result, doing yourself a huge disservice.

PHP Ugly Podcast #49 - Who's Watching Who
Topics this week include the release of PHP Unit 6.0.0 and Keybase Chat.

Reading and Viewing

Would I Want to Live Forever? Hell Yeah!
Anna Filina watched this video recently. Do you agree with the sentiment?

Meet the Drupal Association At-Large Board Member Candidates
Did you know you have a say in who is on the Drupal Association Board? Each year, the Drupal community votes in a member who serves two years on the board. It’s your chance to decide which community voice you want to represent you in discussions that set the strategic direction for the Drupal Association. Voting takes place from March 6 - March 18. Anyone who has a Drupal.org profile page and has logged in to their account in the last year is eligible to vote. This year, there are many candidates from around the world. Now it’s time for you to meet them.

Sandu Babasan Talks About MeetMagento Romania and Ecommerce
Continuing with the Cloudways interview series, today we have Sandu Babasan, a well-known member of the Magento community. Sandu is the Country Manager at Blugento. He is an old Magento hand, who started his career in 2008 with MindMagnet. Babasan is also the organiser of MeetMagento Romania, the premier Magento event in Romania. Because of his excellent leadership skills, he has been instrumental in developing the largest software development organisation in Romania. So, without any further ado, let’s get on with this exciting interview!

WordPress Template Tags Specification Paperback (by Van Nguyen, published 5th February 2017)
Template tags are used within your blog templates to display information dynamically or otherwise customise your blog, providing the tools to make it as individual and interesting as you are. 

Object-Oriented PHP Best Practices: Conventions to Help Your Less Talented Colleagues Write Readable, Sustainable Code (by Ikram Hawramani, published 12th February 2017)
There are generally two types of programmers; those who write messy code, and those who have to deal with the mess. This small book teaches how to become the third type of programmer; the one who writes readable, maintainable code that makes life easy for themselves, their teammates, their future selves, new talent additions to their team, and possible changes of ownership.

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

bunny
Performant pure-PHP AMQP (RabbitMQ) sync/async (ReactPHP) library.

pip
A tiny application framework built for people who use a LAMP stack, PIP aims to be as simple as possible to set up and use.

php-ref
A better alternative to print_r / var_dump.

zf-boilerplate
Zend Framework (ZF) Boilerplate is a pre-packaged, pre-configured Zend Framework - based blueprint for your enterprise grade PHP application.

token-bucket
Implementation of the Token Bucket algorithm in PHP.

polyfill
This project backports features found in the latest PHP versions and provides compatibility layers for some extensions and functions. It is intended to be used when portability across PHP versions and extensions is desired.

x2crm
X2CRM is a next-generation, open source social sales application for small and medium sized businesses. 

teapot
Simple PHP library to improve verbosity in HTTP response codes.

cacti
A complete network graphing solution designed to harness the power of RRDTools data storage and graphing functionality. 

dibi
Smart database layer for PHP.

gettext
PHP library to collect and manipulate gettext (.po, .mo, .php, .json, etc).

laravel-pusher
A pusher bridge for Laravel.
Please help us by clicking to our sponsor:


 From our sponsors:
Know when and why code breaks Users finding bugs? Searching logs for errors? Find + fix broken code fast!

(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