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!

April 13, 2017

Hi there PHP fans ;)

Do you have a PHP job advert that you are looking to post?

Are you looking for a high standard of applicant?

Would you like to reach out to the PHP Community to fill your position? 

Then look no further! 

Our subscriber list is over 20,000+ and we will post your job advert for only $50 an issue!

Simply email the details to me, along with a link to the job description, at [email protected], and I will place the advert in the next edition.

Thanks for joining us for this weeks edition. Don't forget to spread the word and spread the love....

Have a great weekend,

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.


Laravel As The Foremost PHP Framework in 2017
To meet the projects requirements, developers have to decide upon a framework which will help them to code better and faster. Laravel tops the list of PHP frameworks that enables code re-use and is preferable by almost all Web development companies. Let’s have a bird eye view of some of its fascinating features.

PHP Performance Comparison 2017 and 2016 - PHP Benchmark Script to Figure How Each PHP Version Compare in Speed Improvements between PHP 5 vs PHP 7.0 vs 7.1 with OpCache vs PHP 8 or PHP 7.2 with a PHP JIT Features
Since its creation in 1994 by Rasmus Lerdorf, the PHP language has gone through many improvements. Performance is one of the main criteria developers consider when they evaluate upgrading to a newer version. Read this article to learn how performance has improved across the latest PHP versions starting from PHP 5 up to the latest developments, including the recent version 7.1 with opcache optimisations, as well as the experimental JIT branch that will be become part of PHP 8 or PHP 7.2 the next version.

Is Best Practice Actually Poor Practice? Dependency Injection, Type Hinting, and Unit Tests...
I've recently been in discussion with a colleague who thinks that dependency injection (DI) is over-used and, in cases where the dependency is a concrete class, unnecessary (in the latter case, he advocates simply creating new objects on the fly). I raised the point that dependency injection allows you to pass in a mock object while unit testing, but he dismissed that as irrelevant and not a valid argument as to why dependency injection is useful. My colleague also stated that type hinting dependencies results in tight coupling, and he would prefer it if we simply abandoned type hints, allowing the developer to pass in whatever they like.

Tutorials and Talks

Laravel Forge PHP SDK
Laravel Forge announced its first official API back in February, and we have seen a lot of interesting uses like the F-Bar Mac app. Today, Mohamed Said released a PHP SDK for the API that covers all the features.

Building Your Startup: Error Logging
Once Meeting Planner went into alpha release and people began actively using it to schedule meetings, errors would occur that were rarely reported by users. But, in conversations on the phone with people, they'd commonly tell me about problems they ran into. In today's tutorial, I'll walk you through how I tried two different cloud-based logging services, Rollbar and Sentry, and why I ultimately settled on Sentry for the time being.

How to Perform Extract Service Refactoring When You Don't Have Tests
When you are refactoring in a legacy codebase, the goal is often to reduce complexity or separate concerns from classes, methods and functions that do too much work themselves. Extracting new service classes is one popular refactoring to separate concerns, but without tests it is dangerous because there are many ways to break your original code. This post presents a list of steps and checklists to perform extract service when you don't have tests or only minimal test coverage. It is not 100% safe but it provides small baby-steps that can be applied and immediately verified.

An Alternative Laravel Package Development Workflow
Every framework gives developers a way to extend the system using packages / extensions. We can generally hook in our logic at any point where we want to provide specific functionality, and Laravel is no exception! Following the article of my fellow author Francesco Malatesta about his Laravel package development workflow, I noticed that mine is a bit different and I wanted to share it with you!

PHP and Immutability - Part Two
In the last article we learnt how to create an immutable data structure in PHP. There were a few issues to work through, but we got there in the end. Now onto making the immutable class more useful and easier to create modified copies. Note that these are copies and not modifications, in-place, to the original objects.

Advanced Drupal 8 Configuration Management (CMI) Workflows
After implementing some larger enterprise Drupal 8 websites, I would like to share some insights, how to solve common issues in the deployment workflow with Drupal 8 CMI.

Symfony 4: Best Practices
Any major version of a project is an opportunity to revisit its best practices. Modernising them. Adapting them to the projects new features. Symfony 4 is no exception.

My Symfony Translations Workflow in 2017
Translations continue to be a challenging topic in web applications. There are many methods, formats and terms for translating. While Symfony has quite a good set of translation tools, there are many formats and some gotchas. Let's take a look at a workflow that has worked for me with Symfony app localisations in 2017.

Which Laravel Helper Do You Use for Your URLs?
Jacob Bennett did a Twitter poll to see what the community uses for referencing URLs in their Laravel applications. With 500 votes, the overwhelming majority (77%) said they use the route() helper. This was a complete surprise to me as I typically only use the URL string style, but it did make me go back to the documentation and take a look at all the different styles that could be employed in a project. Let’s take a look at some of the advantages and disadvantages of each style.

Using Anonymous Classes to Write Middleware
I faced an interesting question recently with regards to middleware: What happens when we go from a convention-based to a contract-based approach when programming? Convention-based approaches usually allow for duck-typing; with middleware, it means you can write PHP callables - usually closures - and just expect them to work. Contract-based approaches use interfaces. I think you can see where this is going.

Easily Add Social Logins to Your App with Socialite
Laravel Socialite is a package developed to abstract away any social authentication complexities and boilerplate code into a fluent and expressive interface. Socialite only supports Google, Facebook, Twitter, LinkedIn, Github, and Bitbucket as OAuth providers. They won’t be adding any others to the list, however, there’s a community-driven collection called Socialite Providers, which contains plenty of unofficial providers for Socialite. More on this in the next section. I’ll assume you already have a fresh Laravel application instance up and running on your machine, so you can see the code in action along the way. 

Programming With Yii2: Building a RESTful API
In todays tutorial I will review how to build a REST API in Yii to connect your application to the cloud, mobile apps, and other services. I'll guide you through Yii's REST API quick start guide and provide context and examples of common requests.

Maintain Slim PHP MVC Frameworks with a Layered Structure
Fat controllers and models: an inevitable problem for most large-scale projects based on MVC frameworks such as Yii and Laravel. The primary thing that fattens controllers and models is the Active Record, a powerful and essential component of such frameworks.

Protect Admin Routes in Laravel
Today we’ll learn how to protect adminpanel and enhance authorisation component of a Laravel application by adding user roles. We will assign each user with a role (e.g. superadmin, admin, member), create an Auth Gate, modify the User model, and utilise the Authenticate middleware to help them get along. Furthermore, we’ll build a skeleton of your future ACL system, which you can adjust and improve according to your needs.
News and Announcements

Drupal 8.3.0 Is Now Available
Drupal 8.3.0, the third minor release of Drupal 8, is now available. With Drupal 8, we made significant changes in our release process, adopting semantic versioning and scheduled feature releases. This allows us to make extensive improvements to Drupal 8 in a timely fashion while still providing backwards compatibility.

Lone Star PHP - April 20-22nd 2017, Dallas
It is a bittersweet joy to announce that Lone Star PHP 2017 will be our seventh and final conference. It's shaping to be the best one yet with all of the great PHP speakers and content you've come to expect from Lone Star PHP. We will again provide our popular Training Day for more in-depth and hands-on experience for all that attend. We look forward to having you attend our blowout celebration and are excited to see old and new faces in the local and wider PHP community. While it may be the last year for Lone Star PHP, we're excited to see other community conferences and user groups take the torch to inspire their local developers. Tickets are on sale now.

PHPKonf - May 20th-21st 2017, Istanbul
PHPKonf is hosted by the İstanbul PHP community (İstanbul PHP) in İstanbul, Turkey from May 20th 2017, and you're invited! For the 4th year, we'll host some of the best speakers, awesome talk topics, latest technologies, and up to date news in PHP. The conference has something for every level of PHP developer with awesome keynote and 14 talks (multi-track). So come meet other PHP developers and see what others are doing, and please share your experience as well. Then relax or have some fun at the evening events with plenty of fun for everyone! Tickets are on sale now.

PHP Serbia Conference - May 27-28th 2017, Belgrade
PHP Serbia Conference delivers high-value technical content about PHP and related web technologies, architecture, best practices and testing. It offers two days of amazing talks by some of the most prominent experts and professionals in the PHP world in a comfortable and professional setting. Last Bird tickets are on sale now.

Northeast PHP/UX Conference - August 9-11th 2017, Charlottetown, PEI Canada
Now in its 5th year, the Northeast PHP Conference is a web developer conference focused on PHP, Web Technology, and UX. Whilst grounded in PHP, the Northeast PHP Conference is not just about PHP. As the organisers know, most PHP developers are working on websites and applications, which means that they need more than just PHP skills to get ahead. The User Experience and Web Technology talks will help these developers broaden their skill sets and expand their knowledge & experience. The Call for Papers is now open, and 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 renown speakers from the PHP community, about a wide range of topics - from APIs and CMS to unit testing and version control. The Call for Papers is now open.


PHP Articles Report March 2017 Edition
This is the March 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 difference between using the old MySQL extension, MySQLi and PDO, controlling an Android device using PHP code running on the device with Termux, and a comparison of WordPress security plugins.

Three Devs and a Maybe Podcast - Building a Server with Brian Moses
In this weeks episode we are joined by Brian Moses to discuss all things server development. We start off the show by highlighting how he got into computers and what drew him to blogging about DIY NAS builds. From here we touch upon the key areas of consideration when deciding on hardware (Motherboard, CPU, RAM, Storage) for a server. Finally, we discuss the concept of RAID, the FreeNAS operating system and how he performs burn-in testing on recently built systems. Note: apologies for some of the audio quality during the show.

The Changelog Podcast #244: Learning JavaScript and Bringing People Together
Tracy Lee joined the show to talk about bringing people together, helping people, and making an impact. We covered learning JavaScript, the ins and outs of her road to get to where she's at today, hitting burnout and sleeping for two weeks, breaking into the JavaScript community, and the fun cruise, workshops, and conferences she's working on for the JavaScript community.

MageTalk Magento Podcast #123 - #roadtoimagine Series: “The One With Bob” (Part 1 of 2)
Bob Schwartz IN THE FLESH, PEOPLE! Bob sits down to talk about Magento, wins, losses, Amazon! and more.

LaraChat Live - Episode #23 Ben Edmunds
Overarching topic: general soft skills, both towards personal improvement and career advancement.

PHP Ugly Podcast #55: Sex, Lies and Coding
Topics this week include and this years Stack Overflow Developer Survey Results. 

Free The Geek Podcast: Episode 25 - Talking Online Training and Docker with Chris Fidao (The fideloper)
In this episode, I talk to Chris Fidao (aka @fideloper) about building communities, online courses, Docker and loads more. Here's the skinny. When I was looking for help with a Docker tutorial I wrote, I asked around who the Docker experts in the PHP community were. His was one of two names that came up. When I did some research on him, I discovered that he'd been building an online community, as well as online courses, for some time. It was clear that I had to talk to him, to pick his brains, to find out what he knew about it all. So grab your favourite beverage, put your feet up, and come find out how to do all these things – and so much more.

Reading and Viewing

Spring Renewal – April 2017
Hot off the virtual presses, the April issue of the magazine is available to download. This month, we look at new things to make your application code better and more secure.

7 PHP UK 2017 Talks You Must See
PhpUK is a conference I have wanted to attend for a long long time. I had watched all the videos on youtube really carefully for the last few years and always got this weird feeling this might be one of the best and most important conferences in Europe. So, here I am. Three totally different paths available for attendees made the choice of my own quite difficult. Sometimes, I had to skip presentations I wanted to see, because they were happening at the same time as those I wanted to see even more. From time to time, I was bored. But, at the end, I have created my own track and I am happy with the result. If you do not have the time to watch all the presentations online, and it does not matter if in video or slides format, then I would be happy to share my totally subjective choices.

Detecting Out of Sync Mocks in Mockery
If you're not careful, it's easy to find yourself in a situation where a test double has gotten out of sync with the actual class or interface it's mocking. In this quick screencast (taken from my Test-Driven Laravel course), I walk through how I use a little-known Mockery feature to help track down these issues and make sure I'm not mocking methods that don't exist.

Stefan Priebsch Talks About ThePHP.Cc, His Experience With PHP Development, PHP 7 And His Book
Today, we are honoured to have Stefan Priebsch for this interview. He is a cofounder of, a well known PHP consulting firm. He is also an entrepreneur, university lecturer and a thought leader in modern software application architecture. Stefan specialises in PHP powered enterprise applications and has built an enviable reputation as one of the best trainers in Germany. Additionally, Stefan speaks regularly at international PHP conferences and wrote a book PHP 7 Explained with Sebastian Bergmann and Arne Blankerts. In this interview, he talks about his career, PHP 7 ebook and the latest developments in the industry.

Acquia Podcast: Mumbai Memories - Meet Rakesh James
My trusty microphone, camera and I recorded a few great conversations at DrupalCon in Mumbai that have never been released until now. Today, a conversation with Rakesh James, who credits Dries for giving him a way to live and support his family with Drupal. Rakesh is an extraordinary and generous person; he's personally paid that forward, giving others in India the chance to change their lives, too, by teaching hundreds of people Drupal and giving them a shot at a career, too. He's also a top 30 contributor to Drupal 8 core. Watch the video here.


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

Opulence is a PHP web application framework that simplifies the difficult parts of creating and maintaining a secure, scalable website.

A web-based application that produces publication-quality geographic maps.

Spress is a static site generator built with Symfony components.

This web application allows every body without any particular knowledge required in webmastering to create their own website.

This package provides a PSR-7 compatible ADR middleware.

Kahlan is a full-featured Unit & BDD test framework a la RSpec/JSpec which uses a describe-it syntax and moves testing in PHP one step forward.

A project bringing Composer support and some basic PHP 5 standards to pChart 2.0 library. The aim is to allow pChart integration into modern frameworks like Symfony2.

Ratchet is a loosely coupled PHP library providing developers with tools to create real time, bi-directional applications between clients and servers over WebSockets. 

A PHP library with commonly used code blocks for faster development.

FluidXML, a PHP library to manipulate XML documents with a concise and fluent interface.

A curated list of amazingly awesome PHP libraries, resources and shiny things.

Provides abstractions to geographical coordinates (including support for different ellipsoids) and allows you to calculate geographical distances between coordinates with high precision.

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 

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.

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 ©