|Hi there PHP fans.
Last week the one billionth Symfony Component was downloaded, a huge milestone! How was this possible? Find out here.
Also this week, with the release of PHP 7.2 scheduled for release in November, we have a round-up of the new security features and improvements.
We have the first part of the Hosting WordPress Yourself series, looking at how to scale a WordPress app to handle more traffic.
Plus the latest Laravel News podcast takes a look at the recent version 5 Laravel and Lumen releases.
And finally, if you want to champion the podcast team, the new Laravel News t-shirts and hoodies are on sale now!
Have a great weekend,
Katie and Ade
Please help us by clicking to our sponsor:
PHP Frameworks In The Wild: A Closer Look at the PHP Ecosystem
For those looking to go beyond the basics with PHP, explore some PHP frameworks and tools in the wild and learn how they interact with SparkPost.
The Symfony Unicorn: 1 Billion Downloads
A Symfony unicorn!!? It's real! On September 5th, the Symfony Components crossed a huge landmark: the 1 billionth download! This happened less than one year after the last milestone: 500 million downloads. That's right: the PHP community downloaded the Symfony components more than 500 million times in just one year. That's well over 1 million downloads every day!
Hacking, Refactoring, Rewriting, and Technical Debt
Not so much “lessons” here, as “observations and recollections.”
Why Apache Benchmark Is Not Enough
You are working for months on a new web application or e-commerce system and usually a few weeks, or just days, before the launch a complete enough feature set is running on a production-like system so that you can run a realistic load-test. Hopefully providing you with an accurate picture of the performance of your future system. To save time and effort, you probably opt for the simple solution and use the wide-spread Apache Benchmark (ab) or siege commandline tools to setup a load-test.
PHP 7.2 is Due in November. What's New?
PHP 7.2 is planned to be released on 30th November 2017 (see the timetable). And it comes with two new security features in the core, several smaller improvements and some language legacy clean-ups. In the article, I will describe what the improvements and changes are. I read the RFCs, discussions on internals and PRs on Github, so you don't have to.
10 Common Software Architectural Patterns In A Nutshell
Ever wondered how large enterprise scale systems are designed? Before major software development starts, we have to choose a suitable architecture that will provide us with the desired functionality and quality attributes. Hence, we should understand different architectures, before applying them to our design.
Tutorials and Talks
Using PostgreSQL with PHP in Cloud Foundry
Having successfully deployed a PHP application to Cloud Foundry, I needed a PostgreSQL database for persistent storage. I found Lorna Mitchell's Connecting PHP to MySQL on Bluemix helpful and this article expands on that information. I want to create a cloud-based PostgreSQL database and connect it to Laravel's Eloquent in a Cloud Foundry application. This is how to do it.
Game Development with React and PHP: How Compatible Are They?
“I’d like to make a multiplayer, economy-based game. Something like Stardew Valley, but with none of the befriending aspects and a player-based economy.” I started thinking about this the moment I decided to try and build a game using PHP and React. The trouble is, I knew nothing about the dynamics of multiplayer games, or how to think about and implement player-based economies. I once watched a talk by dead_lugosi, where she described building a medieval game in PHP. Margaret inspired me, and that talk was one of the things that led to me writing a book about JS game development. I became determined to write about my experience. Perhaps others could learn from my mistakes in this case, too.
Getting to Know the Laravel Tinker Shell
Laravel includes a powerful REPL, called Tinker, powered by the PsySH console by Justin Hileman under the hood. The tinker console allows you to interact with your Laravel application from the command line in an interactive shell. Tinker used to be part of the laravel/framework package, but with the release of Laravel 5.4 is extracted into separate package.
JWT authentication for Lumen 5.4
Recently I have been tinkering with Angular-4 to get a taste of it and I decided to create a quick project to get my hands dirty. I decided to create a blog with authentication etc. My main focus was on the frontend so I decided to quickly bootstrap an application in Lumen because of its simplicity and almost zero-configuration development. For the authentication, I decided to go with JWT and this post is going to be a quick write-up on how I integrated that and how anyone can integrate JWT authentication in their APIs.
Extending Models in Eloquent
We’ve come a long way since the days of hand-writing SQL queries in our web apps. Tools like Laravels Eloquent ORM allow us to interact with databases at a higher level, freeing us from lower level details like query syntax and security.
How to Gradually Upgrade Toward PHPUnit 6 with Namespaced Classes
In the latest months I wrote multiple times, in different projects, code migrating PHPUnit toward major version 6. This upgrade is harder than the previous one, since in this version it was introduced a big breaking change: all classes got (finally!) namespaced. This means that any usage of those classes in your project needs to be updated. It may seem a simple find & replace job, but since you need to introduce at least one use PHPUnit\Framework\TestCase line at the top of each one of your test classes, it’s a boring and a little more than trivial task; also, upgrading it in a single big jump may not be feasible or prudent, especially in the case of open source or distributed libraries, where backward compatibility and support for old PHP versions must be ensured. In this article I will explain which steps I applied during those migrations, highlighting the most frequent hiccups.
Make your Telegram Bot with Laravel and BotMan
After a long time I’m here to talk about Telegram bots. Lately, I discovered a nice PHP library for building Telegram Bots and I want now to show you it’s potential — BotMan.
PHP CI with Jenkins and Docker (Part 1)
I’ve been developing in PHP now for longer than I haven’t. Going from using PHP as a hammer to a nail, using it to allow forms to send emails, to operating popular open source projects, to leading a team of developers in a business enterprise. One key advice I learned from running an open source project on the SourceForge platform was “release early, release often”. This is a mantra that I’ve always tried to stick to and its always brought me good results.
Clean Code Concepts Adapted for PHP
How to Build a Todo App Using React, Redux, and Immutable.js
There’s nothing to stop us from building large applications with just React, but we would quickly discover that to keep our code simple, we’d need to manage our state elsewhere. Whilst there’s no official solution for dealing with application state, there are some libraries that align particularly well with Reacts paradigm. In this post, we’ll pair React with two such libraries and use them to build a simple application.
Generating an Autoloader for a Legacy PHP Codebase
If you’ve inherited a legacy code base, you may find it does not use an autoloader and has an idiosyncratic directory and file hierarchy for its Classes, Interfaces or Traits. Worse yet, it might not use name spaces consistently or at all. So you can’t use a PSR-4—or even PSR-0—autoloader with your code.
Using Custom Types in Symfony & Doctrine
ORMs are great. In theory, they insure you against potential changes in your RDBMS and offer an easy plug’n’play solution for integration into your domain code with database. In practice, however, since ORMs have to be compatible with all major vendors, their possibilities are often limited. Perks and tricks of specific RDBMS are left out.
Symfony OAuth Authentication for Your Mobile Application
Let’s say you built an API using Symfony and you need to access it from a mobile application using authenticated requests on behalf of your users. Here’s how to make this work using Symfony 2.8 and Doctrine.
Logging PHP Applications
Every PHP application generates errors, warnings, and notices and throws exceptions. If we do not log this information, we lose a way to identify and solve problems at runtime. Moreover, we may need to log specific actions such as a user login and logout attempts. All such information should be filtered and stored in an efficient way.
Hosting WordPress Yourself at Scale Part 1 – Dedicated Database Server
In this series we’re going to look at how we can scale our WordPress app to handle more traffic. Throughout the course of this series, we’ll build upon what we learned in Hosting WordPress Yourself and introduce more advanced concepts such as load balancing, MySQL replication and distributed filesystems. So if you haven’t yet gone through the original series, you should start there or subscribe here to get the series via email.
|News and Announcements
Joomla! 3.8 Release Candidate Now Available
The Joomla! Project is pleased to announce the availability of the Joomla! 3.8 Release Candidate. Community members are asked to download and install the package in order to provide quality assurance for the forthcoming 3.8 release.
Lumen 5.5 Is Released
Lumen 5.5 is now released and available for all. This is considered a maintenance release that upgrades the underlying packages to the Laravel 5.5 series.
Laravel News T-Shirts – 2017 Edition
This years Laravel News t-shirt and hoodies are now available for purchase from Cotton Bureau.
PHP Developer Day - September 22nd 2017 Dresden Germany
We - the PHP USERGROUP DRESDEN e.V. - are proud to present the PHP Developer Day for the 3rd time in a row. Just like the past two events in 2015 and 2016, top talks, free exchange of knowledge, community and fun stand in the foreground of the event again. The last few tickets are on sale now.
Madison PHP Conference - September 22nd-23rd 2017, Madison
Madison PHP Conference in Madison, Wisconsin focuses on PHP and related web technologies. This event is organised by Madison PHP and is designed to offer something to attendees at all skill levels. It will be two days of networking, learning, sharing, and great fun! Tickets are on sale now.
Forum PHP - 26-27th October 2017, Paris
The AFPP, French Users Association of PHP, presents the Forum PHP 2017, the largest annual French-speaking event for all PHP, professional and open-source communities, dedicated to the language and its ecosystem. Tickets are on sale now.
Nomad PHP US - October 19th 2017 20:00 CDT
Machine Learning Circa Minority Report, presented by Kesha Williams. Minority Report was a 2002 American science fiction film based in 2054 where police officers apprehended criminals based on predictions and foreknowledge. We are not in 2054 but fast-forward to 2017, we are now closer than ever before to the world imagined in Minority Report because of Machine Learning (ML). ML is a type of Artificial Intelligence (AI) that provides computers with the ability to learn without being explicitly programmed. For all intents and purposes, ML is foreknowledge that can be applied across several disciplines in order to answer questions and make predictions. One such discipline, predictive policing, uses ML to predict the likelihood of crime. This talk introduces ML through a predictive policing program called SAM (Suspicious Activity Monitor). During this talk, the “secrets” and technologies behind SAM are uncovered and attendees walk away with the necessary tools and understanding to incorporate ML into their own applications.
Nomad PHP EU - October 19th 2017 20:00 CEST
Iterators & Generators, presented by Eli White. Level up your code with the power of Iterators & Generators. Iterators were added in the SPL (Standard PHP Library) for many years but is still one of the less understood parts of the language. We will cover how to easily loop over your objects via the power of Iterators, and then move into one of the newer ways of doing this with Generators. Generators allow you to make almost anything able to be looped over, without the need to use the full Iterator interface. Come join us as we traverse these paths of code that will leave you looping with ease!
Laravel IO Podcast - Season 3 · Episode 1
Season 3 Teaser. Introducing season 3: an interview season, where Matt will be conducting long-form interviews of known and unknown members of the Laravel community to learn about who they are and what motivates them.
Changelog Podcast #262: Community, Building Remote-first Teams, and Web Performance Inclusivity
Karolina Szczur joined the show to talk about community building, building remote-first teams, the hiring process in tech, product development, and the inclusivity factor of web performance.
MageTalk Magento Podcast #142 - Magento 2 Solution Specialist Exam Review (w/ Ben Robie)
The guys sit down with Ben Robie of DEG to talk about the new Magento 2 Solution Specialist Exam
PHP Ugly Podcast #72: A Wave of Confusion
Topics include the new php[architect] podcast and the announcement of Wave PHP 2018.
Full Stack Radio Podcast Episode 72: Taylor Otwell - Testing Laravel Applications
In this episode, Adam is joined by Taylor Otwell, the creator of Laravel, to talk about their approaches to testing Laravel applications.
Laravel News Podcast LN45: Laravel and Lumen 5.5, Shareable Models, and Chat Bots
Jake and Michael speak about the latest Laravel and Lumen releases, version 5.5. We also talk about shareable models, Marcel Pociot's Botman chatbot framework, and season three of the Laravel Podcast.
Cloudways Interview - Jeff Reifman on Yii Framework and his Influence in PHP
Today I’m honoured to have Jeff Reifman on board for an interview at Cloudways. Thanks Jeff for your time and all the efforts for PHP industry. Jeff is an experienced technology consultant and former Microsoft Group Program Manager. He is a writer, activist, and yogi. He’s also the founder of Meeting Planner and author of the Envato Tuts+ series, Building Your Startup. Jeff is actively taking part in educating PHP developers via tutorials and speaking sessions. He enjoys travel, photography, and snowboarding in his free time.
Considering Effectiveness in Test Automation
What matters about test automation is feedback. For new functionality we should have a guarantee of correctly implemented code/functionality and for old parts – of not having created new bugs. What is effectiveness (accuracy) and what change could fighting for it in tests bring? How does it differ from efficiency and why sometimes going for the highest efficiency is not such a good idea? I will describe this shortly based on my experience with unit and BDD testing.
DISCO at the Brussels PHP Meetup – VLOG 5
DISCO is a new take on dependency injection in PHP. It stands for “Dependency Injection Service COntainer” and is a project that is managed by my friend Stephan Hochdörfer. Stephan is a fellow conference speaker from Mannheim in Germany. We met years ago in Amsterdam, when we were still in the early stages of our speaking career. Stephan traveled to Brussels, to speak about DISCO at the Brussel PHP meetup. The meetup took place in the Cu.be offices in Zaventem. I was there and recorded the following vlog.
WordPress Coding Basics: Your First Plugin
Being able to write your own plugins lets you write code that you can use on all your sites, regardless of the theme. Putting your code in a plugin is usually better practice than using the theme functions file. That way, you can switch themes without losing all the custom code on your site. In this Coffee Break Course, you'll learn how to write your first simple plugin. You'll see how to configure all the plugin metadata and how to install it on your site, and you'll also get some ideas of simple projects you can build to make your own code more reusable.
PHP MCQs: Multiple Choice Questions and Answers (by Arshad Iqbal, published 31st August 2017)
PHP MCQs has 429 multiple choice questions. PHP quiz questions and answers, MCQs on PHP programming, PHP form, PHP sessions and cookies, PHP array functions, PHP IDE, PHP redirects, PHP code MCQs with answers, error handling, multidimensional arrays, superglobal arrays iteration, logical operators, looping, control structures, PHP serialisation, web server logs, PHP string functions and math functions.
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
PHP Bindings for Conekta's API.
Admidio is a free open source user management system for websites of organisations and groups. The system has a flexible role model so that it’s possible to reflect the structure and permissions of your organisation.
A PHP framework which helps you to build beautifully crafted JSON:APIs.
A REST-API and console-based cryptocurrency trading bot boilerplate and framework.
The AutoRest tool generates client libraries for accessing RESTful web services.
Community-based GPL-licensed network monitoring system.
A static analysis tool for finding errors in PHP applications.
A static code analyser for PHP (a PhpStorm/Idea Plugin).
Purify is an HTML input sanitiser for Laravel 5.
PHP frontend for Godot Engine's asset library.
Yclas Self Hosted is a powerful script that can transform any domain into a fully customisable classifieds site within a few seconds.
PHP refactoring and introspection tool.
Parle provides lexing and parsing facilities for PHP.
API Blueprint Renderer for Laravel.
Laravel Validation Rules
This organisation provides additional community written, tested Laravel validation engine rules for common things that you can pull into your project easily with Composer and not have to write yourself.
Please help us by clicking to our sponsor:
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.
So, how did you like this issue?