Meet the community: PHPUK 2018
Allround awesome dude Frederick Vanbrabant and I recently were at the excellent PHP UK Conference. There Frederick did some nice interviews with Marcel Pociot, Jenny Wong, Rob Allen, James Titcumb and many more.
Posts tagged with php
Allround awesome dude Frederick Vanbrabant and I recently were at the excellent PHP UK Conference. There Frederick did some nice interviews with Marcel Pociot, Jenny Wong, Rob Allen, James Titcumb and many more.
Nathan Dench, organiser of the Brisbane PHP meetup, wrote a good summary of what's been happening in PHP land recently
https://ndench.github.io/brisphp/brisphp-news
Join 9,500+ smart developers
Get my monthly newsletter with what I learn from running Spatie, building Oh Dear, and maintaining 300+ open source packages. Practical takes on Laravel, PHP, and AI that you can actually use.
No spam. Unsubscribe anytime. You can also follow me on X.
"As a Laravel developer, this is the one newsletter I most look forward to. Freek has a talent for distilling packages or techniques down to something immediately useful - one tip can save you hours and even weeks. It's concise and practical and highly relevant."
On his blog Christoph Rumpel explains how you, using BotMan, can create a bot where users can subscribe to content updates.
Email has been a great channel for staying in touch with your audience for years. But times are changing and messengers are taking over communication. Let's see how I used Facebook Messenger to build a little newsletter bot for my upcoming book "Build Chatbots with PHP".
https://christoph-rumpel.com/2018/02/build-a-newsletter-chatbot-in-php-part-1
Pretty cool! I might add a bot to this very blog soon.
phpCE 2017 was held last november in Rawa Mazowiecka in Poland. The organisers recently released videos of all the talks. You'll can watch them all using this YouTube playlist: https://www.youtube.com/playlist?list=PLWKBHVGdyqQKjzraZqkQ69PJQmnGdXrVa
Here's the recording of Hannes Van de Vreken's talk on IoC containers.
On the Hackernoon site Nicolò Pignatelli wrote a good guide on how to write Value objects in a good way.
This is the list you must always check it against:
https://hackernoon.com/value-objects-like-a-pro-f1bfc1548c72
Sebastiaan Luca, a freelance Laravel developer from Antwerp, coded up a couple of functions that mimic a pipe operator.
An interesting RFC proposal by Sara Golemon submitted in April 2016 suggested the use of a pipe operator to enable method chaining for any value and method. Yet as of today, it's still being discussed and there's no saying if it will ever make its way into PHP. So in the meantime, here's a solution!
https://blog.sebastiaanluca.com/enabling-php-method-chaining-with-a-makeshift-pipe-operator
Let's hope a real pipe operator will land someday in PHP.
I'm hopeful. Done well, I think it needs partial function application first, so that no additional syntax is required for the rhs.
— SaraMG (@SaraMG) February 21, 2018
By default all scripts on a webpage are allowed to send and fetch data from and to any site they want. If you think about it, that's kinda scary. Imagine that one of your JavaScript dependencies would send all keystrokes, including passwords, to a third party website. That would be pretty bad. In…
? Ever wanted to use the same controller to serve multiple formats?
— Adam Wathan (@adamwathan) February 15, 2018
Check out this set of macros that let you hit a single endpoint with different extensions to request the format you want:https://t.co/2sFGNf97be pic.twitter.com/HMNdicUWAy
?? Here's what it looks like in use: pic.twitter.com/zHo0GlAU6w
— Adam Wathan (@adamwathan) February 15, 2018
Read more [twitter.com]
???? Forgot about this little validation trick that had snuck by undocumented. pic.twitter.com/Hb5QUJY3ix
— Taylor Otwell ????♂️ (@taylorotwell) February 11, 2018
Read more [twitter.com]
Frank de Jonge, creator and maintainer of Flysystem, recently started using Docker to test the FTP driver. On his blog he explains the why and how.
For Flysystem, an open source PHP package to deal with filesystems, I needed a way to test FTP (barf) interactions. FTP servers are notoriously bad at abiding by the spec. ... For Flysystem's FTP(d) adapter an integration test, using an actual FTP server, brought back the level of confidence it needed.
https://blog.frankdejonge.nl/regaining-trust-in-your-tests-with-docker/
Small #PHP tip: Want to before sure multiple keys of an array are set? Define them in one isset() call, it's so much clearer!
— Frank de Jonge (@frankdejonge) February 12, 2018
if ( ! isset($a['q']) || ! isset($a['w']) || ! isset($a['e'])) {
// PANIC
}
# Becomes
if ( ! isset($a['q'], $a['w'], $a['e'])) {
// OH NO!
}
Read more [twitter.com]
Imagine you want to have an Eloquent model hold a status. It's easily solved by just adding a status field to that model and be done with it. But in case you need a history of status changes or need to store some extra info on why a status changed, only adding a single field won't cut it. To handle…
Laravel has a very powerful notification system. From the docs:
Laravel 5.6 will probably ship this wednesday. One of the cool new features is the ability to register Blade component aliases, which was PRed by my colleague Seb. On his blog Seb guides you through the new functionality.
Laravel 5.6 adds the ability to register alias directives for Blade components. Let's review some background information and examples.
https://sebastiandedeyne.com/posts/2018/blade-component-aliases-in-laravel-56
Together with Dries Vints and Frederick Vanbrabant I organise our local usergroup PHP Antwerp. We recently bought some A/V equipment to record all the awesome talks given at our meetup. Here's the first one: a fine talk by Bobby Bouwmann about some cool design patterns used in Laravel.
PHP 7.2 was released almost two months ago. I decided to wait a bit until a stable version of Xdebug with PHP 7.2 compatiblity was available. And that happened yesterday with the release of Xdebug 2.6. I'm on MacOS and use brew to install stuff. Upgrading from PHP 7.1 to 7.2 is laughably easy. These…
Laravel 5.5.29 introduced the ability to group a collection on multiple levels. In a new post on his blog, Christopher Rumpel demonstrates the new feature with some good examples.
https://christoph-rumpel.com/2018/01/groupby-multiple-levels-in-laravel
Barry Van Veen shares how you can install a package from a local path into your project. This is extremely handy when developing a package because you can immediately toy with it in a full application.
This article explains how you can require a package from a local path into your project with Composer. This way you can run a local copy of a repository and test any changes you make. Because the local repo will be symlinked changes are shared in real-time, there is no need for intermediate committing and updating.
https://barryvanveen.nl/blog/44-package-development-run-a-package-from-a-local-directory
The Vancouver PHP user group recently had a Q&A session with Laravel's creator Taylor Otwell.
Cool Nova tidbit revealed in the video: it'll be a package.
In a new post on his blog Matthieu Napoli, creator of PHP-DI, explains how he made v6 much faster.
But the good thing is that, after 6 years of existence, the project has matured and is now quite stable. The original objectives are met, even though there is of course always room for improvements and innovation. There is room to push the container to be better on other levels. And the most obvious one is performances.
PHP-DI 6 will be much, much faster because it is a compiled container.
http://php-di.org/news/21-php-di-6-compiled-container.html