Laravel Badge

Guide

Laravel Package Veteran: A Q&A with Wendell Adriel

By Peter Fox

If you've spent any time in the Laravel package ecosystem you've probably come across Wendell Adriel's work. He's on the Laravel OSS team, writes for PHP Architect, and has been quietly shipping packages for years — laravel-validated-dto and laravel-idempotency being the most well known. He does it all solo.

His newest is Laravel Expressive. The short version: it lets you generate typed objects from your Eloquent models. Run php artisan make:expressive and you get a strongly-typed class built from your model's attributes, casts, and relationships, no boilerplate to write yourself. It's a nice idea, and the docs are genuinely good.

We sent him a few questions.


Expressive ships with really excellent documentation. What tools and platforms did you use to create and host the docs?

I'm using VitePress, a really simple, yet powerful static site generator that lets us create documentation sites in a very quick and easy way, and it's very customizable. For this, I have a CI that builds the static site and then it's served in GitHub Pages. I just added to point to a custom domain.


AI has become a massive part of development these days, so I have to ask: how much of Expressive was actually built with the help of AI? And more broadly, do you use AI in any specific ways as part of your package-development workflow?

I created Expressive with a good amount of help from AI. I think nowadays I'm writing 80% to 85% less code than 6 months ago. I still review every line of code that's generated (that's the part that takes most time, TBH), and do small and fine adjustments where needed. My workflow is the same that I use for other projects, I start with a very detailed requirements markdown, then I ask an AI agent to generate a plan based in the requirements, do some iterations with the agent until I think the plan is solid. Always ask the agent to use a TDD approach, then I start another agent with clean context to implement the plan. After that it's the review phase, and only then I commit and push things to the repo.


You've now built several packages as a solo developer—very different from the large-team model that Spatie uses. What routines or habits have you developed to keep your packages maintained and healthy over the long term?

What I think that makes much easier to maintain is having a strong test suite, I also like to have the PEST type coverage and keep it at 100%, this removes a lot of headaches, and other tools like PHPStan and Rector are also very valuable when it comes to maintaining packages, or any other codebases TBH.


What criteria do you personally use to decide whether an idea is worth turning into an open-source package that you'll share with the entire Laravel community?

Most packages I created were based on needs that I had in multiple projects, so it's basically to scratch my own itch xD Sometimes it does help other people out there, but I also already launched some packages that had 0 traction.


Looking back to when you first started creating packages, is there anything that has since become a non-negotiable "must-do" for you every time you begin a new one?

I really like to have tools like PEST type coverage, PHPStan and Rector. I think it makes my life easier to have good code that's easier to maintain in the long run. Also, since Pascal (THANK YOU) showed me VitePress, for me is a must have for documentation.


Have you ever created a package that you eventually felt you no longer wanted to maintain? If so, how did you handle that situation?

Yeah, it already happened. It has two different approaches. If it's a package that I no longer want to maintain because it didn't have a lot of traction, I usually just mark it as abandoned in Packagist and the repo as read-only on GitHub. If it's a package that I see that it's being used, I usually don't work on new features, but I still maintain the package for fixes and compatibility with Laravel's newer versions.


Laravel Expressive is available now via Composer:

composer require wendelladriel/laravel-expressive

The full documentation is at expressive.wendelladriel.com.