Creating PHP interfaces, traits, and classes dynamically at runtime
PHP is a wonderful dynamic language that's capable of many cool things. I recently stumbled upon something quite fantastic that I want to share with you.
In this section you can read posts I've written myself.
PHP is a wonderful dynamic language that's capable of many cool things. I recently stumbled upon something quite fantastic that I want to share with you.
A couple of months I go I had the honour giving a talk at the GPUG usergroup on how to convert a PHPUnit testsuite to Pest.
Nowadays, I use Pest as the default testrunner for every package / project that I start.
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.
I'm proud to announce that our new premium course on writing readable PHP is now available. It's called Writing Readable PHP.
This course contains a collection of bite-size tips (both in written form and videos) that make your code a joy to read for your co-workers and future self. These tips are aimed towards developers who know the basics of PHP and want to improve their craft. As a bonus, you'll learn to use static analysis to ensure that your code is understandable and correct.
Writing Readable PHP has been created by our team and Christoph Rumpel. It contains our combined knowledge on how to write the best PHP possible.
Passing booleans to a method can be code smell, as it is not clear what a boolean does by reading the calling code.
Using else often encourages complexer code structure, makes code less readable. In most cases you can refactor it using early returns.
Original – by Brent Roose & Freek Van der Herten – 2 minute read
Have you ever needed to maintain a project that wasn't yours? A project that, when you first opened it, gave you chills down your spine? Even without reading the code in detail, you could already tell it was a mess.
In this stream on YouTube, Francisco Madeira, co-creator of Termwind, guides me through the source code of his amazing package to style content on the CLI
I'm proud to share that our team has launched a new CLI tool called GitHub Actions Watcher.
I'm proud to announce that our team has released a new package called spatie/laravel-route-discovery. This package can be used to automatically discover and register routes by looking at your controllers and views. Of course, you can also still register routes like you're used to in a routes file.
In this blog post, I'd like to tell you all about this package.
Our team has released a small package called spatie/laravel-slack-alerts. It can be used to send a message to Slack quickly. In this blog post, I'd like to share why we've created this package and how you can use it.
Ignition is the most beautiful error page for PHP apps. Yesterday, we launched a new major version of Ignition - you can check out all the details in this blog post.
Ignition used to be Laravel specific, but we've now created a framework agnostic version as well. Let's try using Ignition in a simple Symfony app.
I'm proud to share that our team has released a new major version of Ignition, the most beautiful error page for Laravel and PHP. It has been redesigned from the ground up. Here's how it looks like. This error page will be the default in Laravel 9. You can optionally install it into any Laravel 8 or…
Now that we are in the final days of 2021, let's take a look back at that stuff my team and I did in 2021.
Whenever I upgrade PHP, I seem to have troubles installing imagick. This command pecl install imagick always results in an error "'pcre2.h' file not found". To fix that error, you should issue these commands: brew install pcre2 ln -s /opt/homebrew/Cellar/pcre2/10.39/include/pcre2.h…
I'm proud to announce that we've released a new package called Laravel Health. As the name implies, this package can be used to monitor the health of your Laravel application.
It offers many checks out of the box, and an easy way to create custom checks. When something is wrong, you can get a notification, or view the status on a dashboard.
The package also offers deep integration with Oh Dear, allowing for even more robust monitoring
I want to tell you all about it in this blog post. Let's go!
I've used this little bash alias for many years to quickly run the tests inside of a project.
alias p="vendor/bin/phpunit"
With this alias in place, I can run the tests by typing "p" on the CLI. Nice!
For a long time, everything was great! But then, Pest appeared on the scene. It's an alternative test runner for PHP with a high focus on developer experience.
Earlier this week the PHP Foundation was announced. In this stream on GitHub, my buddies Christoph Rumpel, James Brooks and I discuss what we think this means for the future of PHP.
For years, my team and I manually updated the changelog for our 250+ packages. Recently, we've improved how we go about this.
In this blog post, I'd like to tell you all about it.
I am excited to share that my team and I have just launched v2.0 of our Laravel Package Training video course.
Here's a the introductory video for the course:
In your tests, you might have used assertDatabaseHas
to make sure that a model actual is persisted.