|Welcome to this weeks edition of phpweekly news.
Ever thought about starting up your own user group? Memphis PHP developer Joe Ferguson draws on his own experience to offer great advice on the do's and don'ts, and where to get the best support.
Also this week, how to build a reader for Hacker News, using the Lumen framework.
Symfony Catalunya 2016 has been announced for this summer, in Barcelona. The Call for Papers is open for one more week.
Plus the latest That Podcast episode is out now, featuring an interview with the Grumpy Programmer himself, Chris Hartjes.
And finally, on the Acquia blog this week, Sebastian Bergmann, the maintainer of the PHPUnit testing framework, talks about PHP, PHP FIG and the PSRs, and of course testing.
Enjoy your read,
Katie and Ade
We love our sponsors. Why not try them?
Why Laravel is the Best PHP Framework for Web Development
Models and libraries can be used easily with Laravel object oriented libraries supported by auto complete feature. Its stability, incredibly ease to learn, extensions, good support, and good community around it has attracted many larger organisations towards Laravel web application development. Let's have a look at the numerous features offered by Laravel.
Stack Overflow Developer Survey Results 2016
This year, over fifty thousand developers shared where they work, what they build, and who they are. You are about to read the results of the most comprehensive developer survey ever conducted.
Producer: Validate and Release PHP Library Packages
Producer will look over your Composer-based library package just before you are ready to tag it for release, make sure it appears ready-to-go, and then do the release for you through Github, Gitlab, or Bitbucket. Producer works with both Git and Mercurial.
Why Architecture is Important
We experience that the system architectures of our customers grow more and more complex. This is either because of scaling requirements or because developers like to try out new technologies, like implementing Microservices in other languages than PHP (Node.js, Go, …) or different storage technologies (MongoDB, CouchDB, Redis, …). Depending on the application it is also common to introduce dedicated search services (Elasticsearch, Solr, …), queueing systems (Beanstalk, RabbitMQ, ZeroMQ, …) or cache systems (Redis, Memcache, …).
Embracing the WordPress REST API
The WordPress REST API may still be under development, but that hasn’t stopped it from becoming quite the topic of discussion. Recently I attended my local WordCamp and, sure enough, there was a session dedicated to it. For those who aren’t familiar with the REST API, it essentially allows data from your WordPress website to be made available to other applications.
How Should You Decouple Drupal?
User Group Advice
When I introduce myself before I give a talk at a conference or a user group, I mention I am a user group leader and very passionate about community. I happily receive questions from people starting new user groups or reviving old groups.
Tutorials and Talks
Master PHP DateTime
It's a common task to work with date and time as a web developer. If you are still using functions like strtotime and date to work with date and time, you are missing out. PHP provides a dedicated class DateTime for dealing with date and time. Most people have been ignoring it, despite the fact it has been available since PHP 5.2.
Websockets in Your Synchronous Site
I’m always yammering on about writing asynchronous PHP code, and for a good reason. I think it’s healthy to get fresh perspectives – to be exposed to new programming paradigms. Asynchronous architecture is common in other programming languages, but it’s only just finding its feet in PHP. The trouble is that this new architecture comes with a cost.
How to Use Queue To Speedup PHP Processing Tasks Part 2: Processing Queued Tasks
As it was explained in the first part of this article, queues are great to defer the processing long tasks, allowing to provide faster user interfaces so users do not have to wait for those tasks to complete. Read this article to learn how to efficiently process queued tasks in PHP and keep track of the results.
The Repository Pattern in Laravel 5
The repository pattern was introduced for the first time by Eric Evans in his Domain-Driven Design book. The repository is, in fact, the entry point for the application to access the domain layer.
Change Form Input Type in CakePHP3
I've been having my first experiences with generated code, generating a new admin backend using CakePHP3 (yes CakePHP is still around, it's alive and doing rather well in fact!). So far it's going great and producing a much more complete solution than I'd have managed for myself on this timescale. One thing is bothering me though: it guesses form input types from the database column types, which mostly works well, but sometimes it picks something that doesn't reflect the way that the user will store information in this field.
Add Laravel Unit Tests Directly From Chrome
Recently Marcel Pociot launched a new Chrome Extension that allows you to visually create acceptance tests directly from the browser. Here is a quick demo of it in action.
Fixing Doctrine Segfaults
I had a tricky segfault when trying to save a very simple Doctrine object. Here’s my debugging process and solution.
PHP Email Verification using the MailboxLayer API
Checking an e-mail address for the proper format is the first and most common method used to determine if an address is valid. To really put it to the test, we need to take it a step further using real time verification to check DNS records and SMTP servers, while excluding known disposable e-mail providers. While PHP provides some functions for the basic tasks, there is a need to implement more advanced verification to avoid using addresses that are not valid. Read this article to learn how to implement more advanced verification methods using the MailboxLayer API and the PHP Email Validation Quality package.
Building a Hacker News Reader with Lumen
In this tutorial, we’re going to build a reader for Hacker News. We will be using the Hacker News API and the Lumen framework to implement this.
Command Line Features in Magium
CLI tooling is fairly popular in PHP-land and, given that I want to be popular too, I figured it would be a good idea to add some CLI tooling to Magium. Some of this is in preparation for some new tooling I will be adding to the magiumlib.com website in the next few weeks.
Sending Mails with Attachments in Magento 2
The Magento 2 Transport Builder, responsible for preparing a mail message, wraps the mail component of the Zend Framework. Unfortunately it is missing a method to add attachments. I submitted a Pull Request to Magento 2 to fix the issue, but for now we need a work-a-round in our project.
str_plural(): Quickest Way to Show Plural Noun
Laravel has a lot of helpers, for example to work with strings or arrays. One of them in particular helps with pluralisation. Here’s what I mean. Imagine a situation where you have to show text “X item(s)”, where if X > 1 then it’s “items”, otherwise “1 item”. How do we do that in Blade with simple IF?
Adding Homestead to a SlimPHP App
I’ve been a fan of SlimPHP for a really long time. Recently I started using it for a site that I do freelancing development for and wanted to share a quick solution to local development. It’s no secret that I love Laravel’s Homestead vagrant environment. Using the per-project installation method, you are only three commands away from running a SlimPHP skeleton application in a local Homestead VM.
|News and Announcements
WordPress 4.5 Beta 4
WordPress 4.5 Beta 4 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.
CodeIgniter 3.0.6 Released
CodeIgniter 3.0.6 was released today, with some bug fixes and a minor feature. Most importantly - it fixes a critical bug where a manually-crafted input could bypass Form Validation rules, so if you're using the Form Validation library, please update your application ASAP!
SymfonyLive - April 5th-8th 2016, Paris
SymfonyLive, the Paris conference in 2016, is a unique opportunity to exchange not only with the team and the Symfony community, local and international experts, but also to discover the latest features of Symfony, the most advanced usages and its evolution in the months and years ahead. Last Minute tickets are on sale now.
Lone Star PHP - April 7-9th 2016, Dallas
Welcome back to Lone Star PHP for another great year! We're in our sixth year and we're making things better all the time. This year's event will provide all of the great PHP speakers and content you've come to expect from Lone Star PHP. After great success, we are bringing back the Training Day which will provide a more hands-on experience for all that attend. The last few tickets are on sale now.
Symfony Catalunya 2016 - July 22nd-23rd, Barcelona
The latest International Symfony event to be announced, Early Bird tickets are on sale now. The Call for Papers is open until the end of March.
Voices of the ElePHPant - Interview with Jeff Carouth
This week Cal Evans talks to web application developer Jeff Carouth, co-host of the Loosely Coupled podcast.
Laravel IO Podcast - Episode 43: Open Source Money & Rocket League
In this episode, the crew talks about making money from open source and Taylor's utter dominance at Rocket League.
MageTalk Magento Podcast #84 - A “Clothing Optional” Environment (feat. Kevin Schroeder)
Phillip wins a Magento Masters award, Kalen pouts about it, and Kevin Schroeder drops by to talk Magium, Testing, Magento ECG and more.
Free The Geek Podcast: Episode 14 - Talking Slim 3, PSR-7, Constraints & Decisions with Rob Allen
In this episode I have a fireside chat with sagely Rob Allen, about being one of the leads on the Slim 3 project, and about the constraints and decisions developers need to make. This was one of the best fireside chats I’ve had, because the advice resonated so deeply with me. Besides getting an inside glimpse into the Slim project, and what it’s like to be a maintainer on such a wildly popular and successful open source project; Rob shared with me the importance of other areas, besides the code, which we often are all so precious about. So grab a coffee, or put the kettle on - this is a fireside chat I know you’ll love.
The Laracasts Snippets Episode 18 - The Unfortunate Reality of Continuous Learning
Here's the thing about code-focused workshops, magazines and commercial blogs: they may not always have your best interests at heart. Let me explain...
PHP Round Table Podcast Episode 42 - Staying Relevant For Web Development
The technologies that run the web are constantly changing. We discuss strategies for staying on top of the constant flux with continuous learning throughout your career, having mentors, engaging regularly with your peers, contributing to open source projects, voracious reading, and travel to programming events.
That Podcast Episode 27 - A Little Less Grumpy
Beau and Dave talk to Chris Hartjes, commonly known as the Grumpy Programmer. They talk about how Chris grew his personal brand to support his collection of educational products, testing and testing tools, frameworks and components, and OpenCFP. Sorry about the recording issues folks, hopefully we'll get another chance to speak to Chris and fill in some of the gaps.
Hacking on PHP 7 with Joe Watkins
In this screencast episode Edd n’ Joe discuss designing language constructs for the PHP 7 core. Following you through firstly a simple ‘hipster’ example, this will give you a good basis to understand the places (Lexer, Parser and Compiler) that will need to be modified to create features that you typically see in RFC proposals.
Peter Maynard – An Englishman in Belgium, Microsoft, Liverpool & Banter
Peter Maynard is a Senior Audience Evangelism Manager at Microsoft. He focuses on Emerging Audiences and is part of the Developer Experience team in Belgium & Luxembourg. Peter is an Englishman, hailing from the North West of England. He now lives in Belgium. We talk about what it’s like living in Belgium as a “foreigner”.
Technically Creative PHP Developer Frank De Jonge Talks About His Working Style
Frank de Jonge is a freelance PHP developer. He is a member of “The PHP League” which is a PHP user group of developers sharing common goals. He has been a great PHP speaker at various conferences like PHPBenelux, SymfonyCon and LaraconEU.
Leveraging Your Tools With Automation
A good rule of thumb is: if you have to do something more than 5 times, automate it. What are the things that you do everyday when you’re developing software? I’ll discuss some approaches for customising your environment for increased effectiveness. As developers, we use systems to leverage our efforts. It’s why we use things like mvc frameworks, and content management systems. The tools we use to craft them are powerful. The command line and your IDE are two essential tools for any developer. Learning how to customise them, to fit the way you work, will help you become more effective. The focus will be on Bash and Vim, but you’ll be able to use the concepts for other shells and IDEs.
Benefits of Testing, PHP FIG, Drupal 8 - with Sebastian Bergmann, 2 of 2 [video]
Part 2 of 2 - Sebastian Bergmann, the maintainer of the PHPUnit testing framework, came to our office in Cologne, Germany to talk with Campbell Vertesi (@CampbellVertesi) and me about PHP, PHP FIG and the PSRs, and of course testing. It is another in the series of interviews we carried out with important and interesting people from the PHP community in preparation for DrupalCon Asia in Mumbai.
Let’s #phpGreen – With 7PHP At National Park Mauritius
This early morning, while going for a walk at National Park (Mauritius) to relax and regenerate myself, I constantly have a thinking mind. And this time, I was “with” nature and also thinking about php/#PHPc (as always) – and thus came the idea for #phpGreen. To know more, watch this small video.
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
High performance PHP router.
Less than a framework, more than a library.
Laravel Form builder for version 4 and 5.
Native PHP template system that's fast, easy to use and easy to extend.
The Drupal Console is a CLI tool to generate boilerplate code, interact and debug Drupal 8.
Cloudinary is a cloud service that offers a solution to a web application's entire image management pipeline.
A PHP 5.4 library to control dynamic image assets in a cloud environment.
A PHP class for retrieving accurate IP address information for the client.
Proton is a StackPHP compatible micro framework.
Tools for performing content negotiation.
A simple but sturdy support framework.
Standalone PHP library to integrate with the Clickatell SMS gateway.
Trait for validating Eloquent models on save in Laravel 4.2 and 5.0.
PHPMailer is a full-featured email creation and transfer class for PHP.
PHP Helper Library for the Clarify API.
Convention based routing for PHP based on Symfony components.
|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.