Posts tagged with php
How to generate and view code coverage reports in PhpStorm using PHPUnit and Xdebug
In this video, you'll learn how to generate code coverage reports, and how to display them directly in PhpStorm.
This video is part of our Laravel Package Training video course. In that course, you'll learn how to create both framework agnostic and Laravel specific packages. We'll also source dive some popular Spatie packages together, so you can pick up some tricks we apply there.
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.
"Freek publishes a super resourceful and practical newsletter. A must for anyone in the Laravel space"
How to Build and Autoload Your Own PHP Package Locally
Matt Stauffer shows a good workflow for this.
Read more [mattstauffer.com]
Learn how to create PHP and Laravel packages using our new premium video course original
Together with my colleagues at Spatie, we have produced over 200 packages with more than 75 million downloads in total.
We learned a lot by quality packages like laravel-permission, laravel-backup, browsershot, laravel-medialibrary, and many more. We feel we have a pretty good workflow to produce reliable, readable, and maintainable packages.
We want to share the knowledge we have built up over the year with you in our new premium video course, titled Laravel Package Training.
How we created over 200 PHP and Laravel packages original
I work at and co-own a company named Spatie, which specializes in creating large Laravel applications for our clients. Our team is rather small: we consist of only 10 people. At first glance we are a software development company like there are so many others. But there’s one thing that sets our company apart: we have an open source first policy. We try to create and contribute to open source as much as possible.
Currently we have around 200 open source repositories on GitHub. Our packages have been downloaded nearly 75 million times. They are being downloaded 4,5 million times each month. Probably we will hit 100 million downloads by the end of this year.
We've also just released our premium video course, titled Laravel Package Training. In this course, we use our experience to teach you how to build reliable and maintainable packages.
This all did not happen overnight. Read on to learn the story behind our open source efforts.
Avoiding inheritance in Laravel
Jason McCreary makes the case for using traits over reaching for inheritance.
Read more [jasonmccreary.me]
In defence of mocking frameworks
Dave Marshall replies to a blogpost that Frank De Jonge published recently.
Read more [davedevelopment.co.uk]
PHP Versions Stats - 2020.1 Edition
Jordi Boggiano - also known as Mister Composer - published some fresh stats on PHP version usage.
Read more [blog.packagist.com]
Sharing PHP-CS-Fixer rules across projects and teams
Tim MacDonald shares a nice way to go about this.
Read more [laravel-news.com]
Attributes in PHP 8
My colleague Brent clearly explains an awesome feature coming in PHP 8.
Read more [stitcher.io]
Composer 2: Platform Check
Composer v2 has a new feature that your server environment is checked at the run-time before the autoloader is even initialized. This is everything you should know about it
Read more [php.watch]
New in PHP 8
PHP 8, the new major PHP version, is expected to be released by the end of 2020. It's in very active development right now, so things are likely to change a lot in the upcoming months.
Read more [stitcher.io]
Improving PHP's object ergonomics
Larry Garfield has some interesting thoughts on how PHP can be improved.
Read more [hive.blog]
Static Constructors in PHP
– liamhammett.com - submitted by Liam Hammett
A static constructor is just a method the developer can define on a class which can be used to initialise any static properties, or to perform any actions that only need to be performed only once for the given class. The method is only called once as the class is needed.
Read more [liamhammett.com]
Application Instrumentation with Aspect Oriented Programming in PHP
– medium.com - submitted by Vasily
A nice introduction to AOP in PHP, with a focus on performance, with a lot of benchmarks.
Read more [medium.com]
Rethinking Laravel's middleware argument API
– timacdonald.me - submitted by Tim Mac
String concatenation is the current way we can pass arguments to Laravel middleware - but what if there was another way
Read more [timacdonald.me]
Composer 2: What's new and changed
Composer version 2 will be mostly compatible with your existing workflows, while bringing some more great new features.
Read more [php.watch]
Using the spread operator in PHP 7.4
Did you know that since PHP 7.4, it's possible to use the spread operator in arrays? 👨🏻🔬 pic.twitter.com/Wg6Ouc5OYj
— NUNO MADURO (@enunomaduro) April 10, 2020
Query time casting in Laravel
🧙♂️ One of my favorite Laravel 7 features is query time casting. This is super handy when using a subquery to get extra "non-model" data, such as a date. By default it would be a string. This feature lets you cast it to a Carbon instance "on the fly". 👌https://t.co/Kd94iMsomA pic.twitter.com/VIzowGy3um
— Jonathan Reinink (@reinink) April 15, 2020
Read more [twitter.com]