|Hello to all of our readers, old and new, and welcome to the latest edition of PHP Weekly.
This week, taking PHP conferences to a whole new level, the php[architect] team brings us up-to-date with php[cruise]2016. Yes, a PHP cruise! A family friendly event, seven days from Baltimore to the Bahamas, with team building and daily conferences.
We bring you five reasons why you should integrate a multimedia gallery into your website, to promote videos.
Plus, continuing with the Beginners Guide to WooCommerce series, we are looking at manually adding an order using all of the add order sections.
Also this week, looking at VMs, we have an article looking at moving from Vagrant to Docker.
And the Loosely Coupled podcast is back, focusing on the interraction with, and expertise of, product and project managers.
Have a great weekend,
Katie and Ade
We love our sponsors. Why not try them?
Symfony: A Look Back and What it All Means
As we were preparing the news about becoming a Sensiolabs Silver Partner, I brought back a bit to the history of Symfony here at Liip. We did do a few symfony v1 projects at Liip but things only really took off with Symfony2.
5 Reasons Why Your Landing Page Needs Media Gallery To Boost Sales
Integrating a multimedia gallery in your website to promote videos is not something any merchant can ignore these days. Over the past decade ecommerce industry has been in its prime, and several researches and surveys clearly dictate that visual information outclasses any readable pitch retailers choose for their online stores.
PHP 7 Performance Improvements May Increase if You Optimise it to Your Application using to PGO
One of the greatest improvements of PHP 7 is the increased performance of the code in general aspects. However, a little known fact is that PHP 7 performance can be increased further by optimising itself for specific applications, using Profile-Guided Optimisation (PGO) support. In a recent article, Intel researchers announced that PHP 7 built with PGO support may run WordPress about 7% or 8% faster when compared to PHP 7 built the using default way. Read this article to learn more about PGO and how you can benefit from this optimisation to make PHP 7 run even faster.
Sourcehunt: Hacktoberfest 2015 Edition – Hack to Glory
We love open source. In fact, it’s almost exclusively what we write about. But using the outreach we have for drawing attention only to our own work wouldn’t be fair – so we decided to try something new with this post / series, and just in time for #hacktober!
ZendCon 2015 Thoughts from Joe Ferguson
ZendCon 2015 was Joe's first ZendCon experience, and he was selected to give two talks, “Laravel Forge: Hello World to Hello Production” and “DevOps for Small Teams”. Read about his thoughts on the event.
Tutorials and Talks
The Beginners Guide to WooCommerce: Adding a New Order Part 2
In my last article I discussed the first section of Order Details when we were adding an order manually through the Add Order (WooCommerce > Orders > Add Order) button. Today I will be taking up the sections for Order Items, Custom Fields, and Downloadable Product Permissions. Let's see how to configure further.
Custom Display Suite Fields in Drupal 8
Without question, Display Suite is one of the most popular modules in Drupal’s contributed modules history. It allows the creation of layouts, fields and exposes all sorts of other powerful tools we use to build the presentation layer of our Drupal sites. In this article, we are going to look at how we can create our own Display Suite field in Drupal 8 using the new OOP architecture and plugin system.
Tracking PHP API Accesses using Google Analytics Part 1: Retrieving Access Statistics
Google Analytics is a popular tool used by many sites to keep track of the statistics of the visitors of the sites. However, it also provides an API that lets you do more than that, like for instance keeping track of the accesses to the APIs of your own sites, as well building custom user interfaces to view the access statistics in the way that is most convenient for the site managers. Read this part of the article to learn how to use the Google Analytics API to retrieve and display your site statistics that you need to generate custom reports.
Analyze the Quality Of Your PHP Code
In code reviews we often browse metrics, source code and reported code issues together with our customers. This leads to discussions about the current state of the code and possible improvements. First we used a bunch of shell scripts for that. In a second step we developed a simple PHP (Open Source) application helping us to do the job. Now we did the third step and rewrote that application into a React based client side (Open Source) application. Read on for the reasons and benefits.
How to Build an Auto-Ranking Twitter List with WordPress
My team and I recently built an awesome list template on WordPress that ranks a set of Twitter users based on follower count. It allows a content writer to easily add a list of Twitter handles, and generate a well designed post. The first piece of content we created with it generated a 1,212% increase in traffic to our site. Check out the tutorial below if you’re interested in building it as well.
Drush PHP Settings
My previous post gave an introduction to the drush php command and PsySH. I have not had a chance to look at integrating PsySH settings for this directly with drush settings yet. Hopefully sometime soon I will open a pull request to integrate shell settings with drush better. So for now, I just use the config file functionality that comes bundled with PsySH to add a config file. See here for more details.
How to Send Both HTML and Plain Text Password Reset Emails in Laravel 5.1
Laravel comes with an included Authentication system complete with password resets that saves you from the burden of having to set it manually on all your projects. In one of the apps I built, there have been reports of the password reset not making it to the end users. It just so happens that all email is being sent through a third party system which tracks sends and deliveries.
Render an Array Based on Accept Header
Rob Allen is currently working on an API using Slim 3 and needed a generic way to render arrays to XML, JSON or HTML based on the Request's Accept header.
Run PHP Script as Daemon Using Supervisord
This short post is just a reminder for myself when writing supervisord configuration files. It's extremely useful for running daemon workers (such as Laravel's queue workers). You'll need the supervisor Ubuntu package installed.
Building a Product CSV Import Tool in OpenCart: Part 2
In our last tutorial we discussed how to implement an import tool, in which we created an import button and its front-end template. Today we’ll learn how we can directly import the bulk data from our computers to our OpenCart System.
Docker and Dockerfiles Made Easy!
It’s become second nature for developers to use Virtual Machines to configure and manage their working environments. Most professionals who use VMs use Vagrant for dealing with their development environments. In this article, we’ll be moving from Vagrant to Docker, and use a small Laravel application to test that everything is working as expected.
Behat on CircleCI with Failure Screenshots
For KnpUniversity, we use both Behat and CircleCI for continuous integration. The combination works great, except for debugging. If you've done functional testing in a CI environment before, then you're probably familiar with (yikes!) phantom failures: those tests that only seem to fail on the CI server, making them nearly impossible to debug. I don't like to lose time debugging tests. And thanks to Behat and CircleCI, you can easily take screenshots of the browser at the moment of those failures and see them on the build afterwards. Now, when you forget to install wkhtmltopdf on your CI server, you'll see a big error screenshot that tells you so. Sweet!
New in Symfony 2.8: PropertyInfo Component
PHP is a weakly typed programming language. This means that you don't have to declare the type of the variables (e.g. int, bool) and you can store different kinds of data (e.g. numbers and strings) in the same variable. Developers have partially overcome this constraint thanks to type hints, phpDoc and, starting from PHP 7, return type declarations. However, in some cases it is still necessary to know the type of the PHP properties. That's why Symfony has added a new component called PropertyInfo.
|News and Announcements
php[cruise] Summer 2016 - July 17th-24th 2016, Out of Baltimore, MD
We’d like to announce php[cruise] is happening in 2016! This 7 day long conference-cruise to the Bahamas will be a unique event for the PHP community. Completely immersive and giving you, the attendee, a hands-on experience not to be matched!
WordPress 4.4 Beta 1 is now available
This software is still in development, so we don’t recommend you run it on a production site. Consider setting up a test site just to play with the new version.
Drupal 7.41 Released
Drupal 7.41, a maintenance release which contain fixes for security vulnerabilities, is now available for download. See the Drupal 7.41 release notes for further information.
PHP UnConference Europe - May 28-29th 2016, Majorca
In its 5th year, tickets are already available for the 2016 PHP UnConference. Further details to follow.
SymfonyCon - December 1-5th 2015, Paris
SensioLabs is proud to organise the third edition of SymfonyCon, the international Symfony conference. This year, to celebrate Symfony’s 10th birthday, the conference takes place in Paris, Symfony’s hometown! Two days of workshops, followed by the two day conference, finishing with a hackday. Tickets are available now.
Nomad PHP US - November 19th 2015 20:00 CDT
The School of [Database] Rock, presented by Fred Alger. Get back to fundamentals with this fast-paced dive into both database theory and practice. Learn about why Postgres might be a great option for your next project, and get a quick refresher on broad-level database concepts like ACID, transactions, and locking — and how to put them to use in your application. Then, learn the practical skills of a DBA — diagnosing & fixing slow queries, creating indexes, solving the eager loading / N+1 problem with or without a framework, setting up database replication, and more tips and tricks that will make you a better and more valuable developer.
Nomad PHP EU - November 19th 2015 20:00 CET
Asynchronous PHP, presented by Christopher Pitt. PHP has emerged from it’s dark past; just in time to learn from the advances in event-based programming languages/platforms. As a result; there is vast, untapped potential in developing event-based, real-time applications. Utilising emerging open-source projects, like ReactPHP and Ratchet, PHP developers can join the party.
The Loosely Coupled Podcast: Episode 26 - Project Managers
In this episode Jeff and Matt talk about our friends, allies, and sometimes sworn enemies in the development world: product managers and project managers. They will cover how to interact with these roles and even how to be a good manager.
Voices of the ElePHPant - Interview with Davey Shafik
This week Cal Evans chats with PHP developer and Tampa PHP user Group member Davey Shafik.
Acquia Podcast: Government as a Service - Architecting govCMS in Australia
All about govCMS - An interview with and presentation by Adam Malone--Acquia Solutions Architect, based in Canberra, Australia. In the podcast interview, we start off learning about Adam's background and history in Drupal. We touch on how Drupal has gone from being very specifically a content management system in the Drupal 6 days, to the power and flexibility of Drupal 7, to being a powerful framework, still with a great user interface, in Drupal 8. Make sure you check out the presentation video (embedded in this post below and here on youtube), in which Adam goes into detail about building and maintaining the govCMS platform and project.
MageTalk Magento Podcast #65 - Knock Knock
Kalen doesn't know what a knock knock joke is. The guys discuss Magento 2, the forums, security and more.
PHP Round Table Podcast Episode 33 - Design Pattermania
With a new design pattern coming out every week, it can be easy to get caught up in all the hype. If you frequently try to implement the latest-and-greatest design pattern and feel constantly paralyzed by the thought, "I know I'm doing this wrong," this episode is for you. We'll discuss how "not seeing the forest for the trees" might be a good thing as we try to narrow our focus, in order to write better code without thinking of patterns first.
Full Stack Radio Podcast Episode 28: Jeffrey Way and Dave Marshall - "Don't mock what you don't own"
In this episode, Adam talks to recurring guests Jeffrey Way and Dave Marshall about "don't mock what you don't own". They talk about how to design code that needs to work with external services, how you should test that code, and the pitfalls you run into when you use mocks incorrectly in your test suite.
Free The Geek Podcast: Episode 8 - Talking Technical Writing and Simplifying Deployment with Erika Heidi
In this episode, I have a fireside chat with the wonderful Erika Heidi, where we talk about technical writing. We also talk about simplifying deployment, naturally, with her preferred tools of Vagrant and Ansible. It was great to learn from her about what it's like to be a technical writer, as well as her tips and tricks for writing in a way that developers will know exactly what they'll need to do. That way, they'll get the most from our technical posts. We also talk about getting in to public speaking, whether that's hour long talks, or shorter lightning talks. As always, there's so much value, so much that you'll get out of it. Grab your favourite beverage, sit back, and get ready to grow.
How to Create a Zebra Striped Table With Odd Even Row Colors Using PHP
In this PHP tutorial, you’ll learn how to create a zebra striped table by adding odd and even classes in a loop using PHP.
Interviewing Jeremy Coates, the organizer of the PHP North West Conference
Yes, that’s right, another video interview. This one was recorded on October 4th in Manchester when I was at PHP North West Conference 2015, one of my favourite European community conferences. My special guest is the organiser of this very conference, Jeremy Coates.
IPC Munich Conference - Nginx Tricks for PHP Developers
My slides from the IPC Munich Conference on the topic of "Nginx Tricks for PHP Developers" are now available for download here.
Intro to Craft CMS
Craft is a rising star in the PHP CMS world, and for good reasons! Created on the cusp of the PHP renaissance, it embraces modern principles such as the use of familiar components. With Yii as the underlying framework and Twig as the template engine, PHP developers feel immediately at home and unbound by legacy systems. During this talk, we’ll take a quick peek at features developers appreciate most.
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@example.com
Interesting Projects, Tools and Libraries
PyroCMS is an MVC PHP Content Management System built to be easy to use, theme and develop with. It is used by individuals and organisations of all sizes around the world.
Requests for PHP is a humble HTTP request library. It simplifies how you interact with other sites and takes away all your worries.
The lightest PHP database framework to accelerate development.
Workerman is a library for event-driven programming in PHP. It has a huge number of features. Each worker is able to handle thousands of connections.
A deployment tool written in PHP with support for popular frameworks out of the box.
A powerful and modern PHP debugging tool.
ramsey/uuid is a PHP 5.4+ library for generating and working with RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).
PHPHub is a Forum project written in Laravel4.2, and it is also the project build up PHP & Laravel China community.
A small PHP class to generate YouTube-like hashids from one or many numbers. Use hashids when you do not want to expose your database ids to the user.
Modern and simple PHP task runner inspired by Gulp and Rake aimed to automate common tasks.
CLImate allows you to easily output coloured text, special formats, and more.
A Chainable, REST Friendly, PHP HTTP Client. A sane alternative to cURL.
Just an extremely simple naked PHP application, useful for small projects and quick prototypes.
Pheanstalk is a pure PHP 5.3+ client for the beanstalkd workqueue. It has been actively developed, and used in production by many, since late 2008.
Random data generator in JS, PHP and MySQL.
The modern, simple and intuitive PHP 5.3+ unit testing framework.
CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due.
|Please help us by clicking to our sponsor:
From our sponsors:
So, how did you like this issue?
Protect your PHP code with SourceGuardian 10. Free trial.