The SitePoint PHP blog has a new tutorial for the Composer users out there talking about Composer plugin development and how they can add functionality to this already powerful tool.
Composer is the sharpest tool in the toolbox of the modern PHP developer. The days of manual dependency management are in the distant past, and in their place we have wonderful things like Semver. Things that help us sleep at night, because we can update our dependencies without smashing rocks together.
[…] Even though we use Composer so frequently, there’s not a lot of shared knowledge about how to extend it. […] Yet, recent changes have made it much easier to develop Composer plugins. […] So, today I thought we would explore the possibilities of Composer plugin development, and create a fresh bit of documentation as we go.
He walks you through the creation of a simple plugin: one that tracks users and the dependencies they require. He shows you how to create the initial plugin boilerplate and the creation of the
activate methods. These grab the dependencies being added and send the information off to a remote site.
On the Semaphore CI blog they’ve posted a great tutorial that wants to help you Docker-ize your PHP application and deploy the application easily out to Heroku (with some help from Semaphore, naturally).
In this tutorial, you will learn what Docker is and how you can use it to create sophisticated working environments. If you already have experience using VMs such as VirtualBox, Vagrant, etc., you’ll grasp the concept quickly.
To make things more concrete, we will use a demo application which interacts with the 500px API to list popular photos, view, upvote and comment on them. The application is built using Laravel 4, but this shouldn’t present an issue in our case.
They start with a brief introduction to what Docker is for those not familiar with the technology and some of the requirements you’ll need to use it. They help you get Docker installed on your local system and how to work with Docker images and containers to create a custom environment for the Laravel application. Next, he talks about Dockerfiles (configurations for Docker), spinning up the environment and an alternative to manual commands: Docker YAML configuration. The next move is to deploy to Heroku using the "heroku‘ command line tool and integrating it all with Semaphore for continuous deployment.
The Laravel News site has a new post today sharing the full schedule announcement for this year’s Laracon conference (happing in Louisville, Kentucky July 27th through the 29th).
Laracon just announced the preliminary schedule for this year’s conference. Just as in the past, it leaves ample time for hanging out and meeting others interested in the framework.
Sessions for this year’s conference include:
- "Test Driven Laravel" (Adam Wathan)
- "Servers For Hackers" (Chris Fidao)
- "PHP 7" (Zeev Suraski)
- "Tests Should Tell A Story" (Matthew Machuga)
- "YAGNI With Laravel" (Jason McCreary)
- "Lumen, Guzzle, & Swagger" (Jeremy Lindblom)
You can find more information about the conference and pick up tickets from the main conference website. There are discounts available for groups of 3 or more too.
In a post to his site Sebastian de Deyne makes the suggestion that you should normalize your values (input) as soon as possible.
Dynamic languages allow us to pass anything as a parameter without requiring a specific type. In turn, this means we often need to handle some extra validation for the data that comes in to our objects.
This is a lightweight post on handling your incoming values effectively by normalizing them as soon as possible. It’s a simple guideline worth keeping in mind which will help you keep your code easier to reason about.
He gives an example of a
HtmlClass object instance that can take in either a single string or an array of strings. With this structure he shows the complexity it would add for methods like
toString. Instead he recommends normalizing the value in the constructor, making it an array if it’s not already. The the code required in the rest of the class to use/translate it is much simpler.
That Podcast, a show hosted by PHP community members Beau Simensen and Dave Marshall, has posted their latest episode – Episode #26: Show me the Monii.
Beau and Dave start a series of episodes discussing Beau’s new startup, Monii. We talk briefly about the features and scope of their first product, including how he can really see how it would have helped him while he was self-employed.
We then take a dive in to some of the tech stack, with Beau telling us all about the front-end, including the frameworks, libraries and build tools.
Other topics mentioned in this episode include React, the JSON API project, Babel and Webpack. You can listen to this latest episode either through the in-page audio player or by downloading the mp3 directly. If you enjoy the show, be sure to subscribe to their RSS feed or on iTunes to get the latest episodes as they’re released.
The latest releases of all major (and minor versions) of the PHP language have been released with several bugfixes including correcting a few security issues: 5.5.33, 5.6.19 and 7.0.4.
The PHP development team announces the immediate availability of PHP [5.5.33, 5.6.19 and 7.0.4]. This is a security release in which two security bugs were fixed. All PHP users are encouraged to upgrade to this version.
You can find out more information about what changes were made in these releases in the PHP 5 Changlog and PHP 7 Changelog along with references to the related bug information. As always, you can download these latest releases from the main PHP.net site or your favorite mirror linked from the main downloads page. Windows users can get the latest binaries from windows.php.net.
The Voices of the ElePHPant podcast, hosted by PHP community member Cal Evans, has released their latest episode interviewing another member of the PHP community. In this latest episode Cal talks with Christian Wenz
They talk about Christian’s work with the core of the PHP language and its internals and his recommendation to those listening to help support it as well. They also talk about how he first got involved in contributing to the core of the language. Cal and Christian talk about his contributions to the Zend Certification Guide and bootcamp he (Christian) presents at the ZendCon conference to help teach people the information to pass the ZCE exam. They also talk some about their own experiences speaking at conferences.
You can listen to this latest episode either through the in-page audio player or by downloading the mp3 directly. If you enjoy the episode either subscribe to their feed or follow them on Twitter.