PHPNews

Tips on Sidekiq Queues

Sidekiq is great. It's a really handy way to take slow stuff that your application is doing like uploading images or sending emails, and get them out of the web request. Users don't want to sit around waiting for that stuff to happen most of the time, and if they do want to be alerted as to the success or failure of a …

Continue reading »

Written by Phil Sturgeon - - Aggregated on Wednesday November 16, 2016


Handling JSON data errors in Slim 3

When you send JSON data into a Slim Framework application with a content-type of application/json , then Slim will decode it for you if you use getParsedBody() : $app->post("/", function ($request, $response, $args) { $input = $request->getParsedBody(); var_dump($input);exit; }); Using …

Continue reading »

Written by Rob Allen - - Aggregated on Wednesday November 16, 2016


Faster Tests in PHP: Organising Test Suites

One way of keeping your test suites running fast is by organising them in a way that allows you to run the right tests at the right time. This might be running the faster, isolated tests to give you instant feedback in your TDD loop, or it might be running the most critical acceptance tests before you commit …

Continue reading »

Written by Dave Marshall - - Aggregated on Wednesday November 16, 2016


Faster Tests in PHP: Organising Test Suites

One way of keeping your test suites running fast is by organising them in a way that allows you to run the right tests at the right time. This might be running the faster, isolated tests to give you instant feedback in your TDD loop, or it might be running the most critical acceptance tests before you commit …

Continue reading »

Written by Dave Marshall - - Aggregated on Wednesday November 16, 2016


Interrupting Applications with Laravel Middleware

Before we launch into using middleware with Laravel, what is middleware? In general, middleware is software that connects different systems to one another. In Laravel , one of the most well known and robust PHP frameworks that are available for use today, middleware provides a way for you to filter out your HTTP …

Continue reading »

Written by Sitepoint - - Aggregated on Tuesday November 15, 2016


Rename & Destructure Variables in ES6

Last post we took a look at an intro to destructuring . Let’s take a look at another use case which would be renaming your variables. Sometimes data comes back in some odd names, and you might not necessarily want to use a property key as the end variable name. Maybe you don’t like that variable name or it’s already …

Continue reading »

Written by Wes Bos - - Aggregated on Tuesday November 15, 2016


Setting Default Values with JavaScript’s Destructuring

There’s one last thing we need to know about destructuring objects, and that is the ability to set defaults. This one’s a little bit confusing, so bear with me here and we’re going to circle back for another example later on in a couple of videos over at ES6.io . When you destructure an object, what happens if that …

Continue reading »

Written by Wes Bos - - Aggregated on Tuesday November 15, 2016


The Essentials Tools You Need To Teach Online

I appreciate that the process of creating online courses and podcasts might seem like a pretty complicated affair. Given that, I’d understand if you felt that you need a large array of equipment and software to make it all happen. But, the fact is that you don’t — at least not in my opinion. Over the years I’ve …

Continue reading »

Written by Matthew Setter - - Aggregated on Tuesday November 15, 2016


4 New String Methods in ES6 that you should know

The String type in ES6 has come with four new methods that are really handy, help us write a little bit more readable code, as well as reduce our reliance on using regular expressions, or RegExp, for certain things. .startsWith() and .endsWith() So I have a const variable named course , which has the value of …

Continue reading »

Written by Wes Bos - - Aggregated on Monday November 14, 2016


How to Sanitize Data with ES6 Template Strings

These last few examples we’ve been creating HTML and inserting it right into the DOM. If you have any sort of security background and you’re probably screaming, "Wes, you must sanitize that data before you put it into the DOM!!!" A Quick primer on XSS If you don’t know what that means, essentially when you …

Continue reading »

Written by Wes Bos - - Aggregated on Monday November 14, 2016


A letter to today’s young people

The strongest despair I’ve heard about this election has come from high school and college students. I don’t know if this will really help anyone, and I hope it’s not patronizing. But just in case it helps: George W. Bush was elected during my freshman year of college. For the next 8 years — all of college, my …

Continue reading »

Written by Marco Ament - - Aggregated on Friday November 11, 2016


From macOS to Windows 10 - Part 1

Those who follow me on Twitter noticed a tweetstorm about my unhappiness regarding the news of Apple updating their line of laptops. I've been using Mac laptops for almost 13 years now (I'm on my third one personally and used ones provided by employers), I own an old iPad 3 and are on my 3rd iPhone (4S, to 6, to …

Continue reading »

Written by Chris Hartjes - - Aggregated on Thursday November 10, 2016


On Being Explicit

Video of my talk at Agile Testing & BDD eXchange 2016 in London Video of my talk at the DDD London meetup Slides: Abstract “Make the implicit explicit” must be one of the most valuable advices I ever got about software modelling and design. Gather around for some tales from the trenches: stories from …

Continue reading »

Written by Mathias Verraes - - Aggregated on Wednesday November 9, 2016