Sevalla is the all-in-one PaaS for your web projects. Host and deploy your applications, databases, object storage, and static sites. Enjoy advanced deployment pipelines, a complete database studio, instant preview apps, and one-click templates. The pricing is simple: no hidden fees, no seat-based pricing, and you pay only for what you use. Get real human support from developers.

Get started now with a $50 credit at Sevalla.com.

What's new in PHP 7.1

Link –

With PHP 7.1 scheduled to be released next week, it's probably a good idea to go over the new features is offers.

The newest version of PHP – 7.1.0 – is already at RC6 (Release Candidate 6) status, which means it will be out soon. After a huge update that took PHP from 5.6 straight to 7.0 increasing speeds considerably, PHP is now focusing on core language features that will help all of us write better code. In this article I’ll take a look at the major additions and features of PHP 7.1.0 which is just around the bend.

https://kinsta.com/blog/php-7-1-0/

Read more

Stay up to date with all things Laravel, PHP, and JavaScript.

You can follow me on these platforms:

On all these platforms, regularly share programming tips, and what I myself have learned in ongoing projects.

Every month I send out a newsletter containing lots of interesting stuff for the modern PHP developer.

Expect quick tips & tricks, interesting tutorials, opinions and packages. Because I work with Laravel every day there is an emphasis on that framework.

Rest assured that I will only use your email address to send you the newsletter and will not use it for any other purposes.

murze.be is two years old

Original – by Freek Van der Herten – 3 minute read

I'm happy to share that this blog now celebrates its second anniversary. Two years ago I started murze.be to share my bookmarks and interesting links I found with other developers. Along the way I started to write some articles of my own, mainly introductory posts to the now 100+ packages my team…

Read more

An uptime and ssl certificate monitor written in PHP

Original – by Freek Van der Herten – 9 minute read

Today we released our newest package: spatie/laravel-uptime-monitor. It's a powerful, easy to configure uptime monitor. It's written in PHP and distributed as a Laravel package. It will notify you when your site is down (and when it comes back up). You can also be notified a few days before an SSL…

Read more

PHP 7 is gaining ground fast

Link –

Jordi Boggiano shared some new stats on PHP version usage he collects via Packagist.

A few observations: 5.3 and 5.4 at this point are gone as far as I am concerned! 5.5 still has a good presence but lost 12% in 6 months which is awesome. 5.6 basically stayed stable as I suspect people jumped from 5.5 to 7 directly probably when upgrading Ubuntu LTS. 7.0 gained 15% and is now close to being the most deployed version, 1 year after release! That should definitely encourage more libraries to require it IMO, and I hope it is good encouragement to PHP internals folks as well to see that people actually upgrade these days :)

It's very cool that PHP 7 is being adopted so quickly. I suspected that it would go down this way. Unfortunately the majority of package creators are still targeting PHP 5. Jordi has this to say on that.

As I wrote in the last update: I would like to encourage everyone to be a bit more aggressive in bumping PHP requirements when tagging new major releases of their libs. Don't forget that the old code does not go away, it's still there to be used by people using legacy PHP versions.

Amen!

Read Jordi's blogpost here: https://seld.be/notes/php-versions-stats-2016-2-edition

Read more

An unofficial Forge API

Link –

You might not know this but Forge already has an API, it's just not a documented and feature complete one. Open up your dev tools and inspect the web requests being sent while you do various stuff on Forge.

Marcel Pociot published a new package called Blacksmith (great name Marcel) that can make calls to that API. Here are a few code examples taken from the readme:

$activeServers = $blacksmith->getActiveServers();

$server = $blacksmith->getServer(1);

$sites = $server->getSites();

$newSite = $server->addSite($site_name, $project_type = 'php', $directory = '/public', $wildcards = false);

$jobs = $server->getScheduledJobs();

$newJob = $server->addScheduledJob($command, $user = 'forge', $frequency = 'minutely');

Very cool stuff. Because the Forge API doesn't include a method to login, the package will under the hood just submit a filled in login form.

An official API for Forge has been on my wishlist for quite some time. Because Forge's code base already includes an API my guess is that it wouldn't be too work to grow it in to a full, publicly available one. Though I surely cannot read Taylors mind, I think that if there were some more indications that a Forge API would be used by enough people, there's a higher chance that an official API would be built. I think the only reason why the API hasn't been built yet is because not enough people are asking for it. It makes sense for Taylor to only work on things that would actually be used. So if you are using Forge and do want an official API go ahead and star the BlackSmith package on GitHub and make some noise about it.

Read more

A full web request may be faster than a SPA

Link –

At this years Chrome Dev Summit Jake Archibald gave an excellent talk on some new features that are coming to the service worker. In case you don't know, a service worker is a piece of JavaScript that sits between the network request sent by the JavaScript in your browser and the browser itself. A common use case for a service is to display a custom page when there is no internet connection available instead of showing the default error message in your browser. And of course you can use a service worker to have a high degree of control on how things are cached.

I really like Jake's presentation style in general. He always injects a lot of humour. This time he's presenting in a tuxedo, with no shoes on and he uses a Wii Controller to control his slides. Go Jake!

A very interesting part of the talk is when he touches on the time needed to display a page. Turns out a full web request can be a faster than a fancy single page application. Watch that segment on YouTube by clicking here.

Or you can choose to just watch the whole presentation in the video below.

Read more

Let’s talk about phone numbers on mobile sites

Link –

Wes Bos shares a quick tip to make phone numbers on websites tappable.

I’m talking about when phone numbers on a website aren’t tapable. Often the HTML is so that mobile operating systems cannot select the phone number alone and you are forced to remember/recite or write down the actual number.

So, when you put a phone number on a website, don’t just use any old element, use a link with the tel protocol.

http://wesbos.com/lets-talk-about-phone-numbers-on-mobile-sites/

Read more

PHP 7 at Tumblr

Link –

Another big boy on the web upgraded to PHP 7. If you're not yet on the train heading for PHP7-ville, best get your ticket soon, you won't regret it.

At Tumblr, we’re always looking for new ways to improve the performance of the site. This means things like adding caching to heavily used codepaths, testing out new CDN configurations, or upgrading underlying software. Recently, in a cross-team effort, we upgraded our full web server fleet from PHP 5 to PHP 7. The whole upgrade was a fun project with some very cool results, so we wanted to share it with you.

https://engineering.tumblr.com/post/152998126990/php-7-at-tumblr

Read more

Laravel service provider examples

Link –

On his blog Barry van Veen listed some examples of things you can do within a Laravel service provider.

Currently, I'm working on my first Laravel package. So, it was time to dive into the wonderful world of the service container and service providers.

Laravel has some great docs about, but I wanted to see some real-world examples for myself. And what better way than to have a look at the packages that you already depend on?

This post details the different things that a service provider can be used for, each taken from a real open-source project. I've linked to the source of each example.

https://barryvanveen.nl/blog/34-laravel-service-provider-examples

Read more

Testing interactive Artisan commands

Link –

For a new package I'm working on I had to test some Artisan commands. The commands I want to test contain calls to ask and confirm to interactively get some input by the user. I had a little trouble finding a way to tests such commands, but luckily a blogpost by Mohammed Said pointed me in the right direction, which was to leverage partial mocks.

Here's the most interesting part, Artisan Commands can ask the user to provided specific pieces of information using a predefined methods that cover all the use cases an application might need. ... So we mock the command, register the mocked version in Kernel, add our expectations for method calls, and pretend the user response in the form of return values. ...

http://themsaid.com/building-testing-interactive-console-20160409/

Read more

On Being Explicit

Link –

Mathias Verraes, one of the organizers of DDD Europe, recently gave a talk at DDD London on how to name things to both improve your code and to improve communication with the business.

“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 software projects where identifying a missing concept, and bringing it front and centre, turned the model inside out. Our tools: metaphors, pedantry, type systems, the age old heuristic of “Follow the money”, visual models, and a healthy obsession with language.

https://skillsmatter.com/skillscasts/8806-ddd-meetup

Read more

Does code need to be perfect?

Link –

Andreas Creten explains his view on wether you should always try to write perfect code. Spoiler: no.

The engineers want to write perfect code using the latest techniques, make sure that the code is well documented so they can fully understand how everything works and that it has tests so they can easily update things later. Product owners on the other hand just want things to be done, fast and cheap, so they can ship new features or convince new clients. How can you make these conflicting views work together?

https://medium.com/we-are-madewithlove/does-code-need-to-be-perfect-a53f36ad7163

Read more

Some people to follow on Twitter

Original – by Freek Van der Herten – 2 minute read

There are a lot of developers active on Twitter. Most of them tweet out interesting links, their opinions or stuff they're working on. I think Twitter is an excellent tool to stay in touch with what's going on in the Laravel and PHP community. If you're looking for some people to follow here are…

Read more

How I Learned to Stop Worrying and Love Giving a Talk

Link –

Iain Poulson wrote a good article on public speaking.

"But Speaking Is For Experts" This is a common fallacy that needs to be dispelled if you are to get up and start speaking. Conference speakers are not necessarily experts that know more than you. They are just people who have stood up! ... Anyone can do a talk, regardless of your background and skills – you have something to offer.

https://deliciousbrains.com/stop-worrying-love-giving-a-talk/

Read more

A magic memoization function

Original – by Freek Van der Herten – 4 minute read

Last friday Taylor Otwell tweeted an easy to use memoization function called once: Wanted a slick way to generalize class method memoization. Y'all don't even want to know how it works. ? ? pic.twitter.com/xRJAY1C14y— Taylor Otwell (@taylorotwell) November 4, 2016 Taylor was kind…

Read more