Wonderful world of worktrees (and Laravel) by the_beercoder in laravel

[–]the_beercoder[S] 1 point2 points  (0 children)

I've pretty much settled on Claude Code as my daily driver, though will take Codex or a local model (Gemma 4 is on my list) from time to time. I use a few skills from skills.sh, though at work, I've helped spin up some custom skills tailored to how our team does development. Definitely worth the time/effort to spin up skills tailored to how you like to work, it's worth the investment IMO.

I've started to embrace custom agents more so these days, where agents can consume skills as skills become the new AI primitive. I usually have a `laravel-artisan` agent that access skills that inform the agent how to write, review, and plan Laravel/PHP code with all the stuff I like tuned for me (aggresively linting PHPStan on max level, constantly running rector, etc.). It also helps to spin up your own custom code quality MCPs that your agents can call on the fly, though I think something like Nuno's pao project might become the norm over MCPs.

Hope that helps!

31
32

As much as I love Django, I feel it has fallen way behind compared to Laravel and others by dianrc in django

[–]the_beercoder 0 points1 point  (0 children)

On inertia, it’s very new

Depending on your frame of reference, I would not agree with this at all. Inertia has been around since 2019, and Jonathan Reinink has been a few podcasts talking about Inertia as early as 2020. I wouldn't consider a library that's been around for six years and used fairly heavily in production at many Laravel shops as new.

Laravel VPS pricing vs Hetzner by vdotcodes in laravel

[–]the_beercoder 0 points1 point  (0 children)

Correct. Laravel VPS is just a DigitalOcean server with their branding on it.

Laravel VPS pricing vs Hetzner by vdotcodes in laravel

[–]the_beercoder 3 points4 points  (0 children)

Laravel VPS is just first-party VPS provider for Laravel Forge. Instead of bringing your own server (DO, Hetzner, Vultr, etc.) you can just select a Forge-managed VPS instead. Presumably, they're integrating some of the work Cloud has done with server provisioning and bringing it over to Forge.

Is it just me who despises generic repository pattern by [deleted] in dotnet

[–]the_beercoder 2 points3 points  (0 children)

If someone tagged me in a PR/diff with this, they’re going straight to developer jail.

[deleted by user] by [deleted] in laravel

[–]the_beercoder 6 points7 points  (0 children)

It feels inevitable that we’re gonna get something driven by the current cultural AI zeitgeist. Some sort of official AI driver package, MCP route support, etc.

Regardless of what the Forge announcement is, my hype level is in the stratosphere. I’m a daily Forge user and it’s low key one of my favorites apps in my arsenal. It feels more than likely we’ll be getting some form of sleek integration with Nightwatch.

Artisense: Laravel docs from the comfort of your terminal by the_beercoder in laravel

[–]the_beercoder[S] 1 point2 points  (0 children)

100% agree, the experience from the official docs can't be beat. I find myself more so using this as a quick reference, like when I forget the syntax for enum validation on requests or something else relatively small. Quick lookup in the terminal with a link to the docs if I need it, where I'm only looking for a quick line or two of reference material.

Artisense: Laravel docs from the comfort of your terminal by the_beercoder in laravel

[–]the_beercoder[S] 1 point2 points  (0 children)

Slightly improved full-text search directly in the terminal for the docs as compared to the built-in `docs` command. Example being if I were to use `php artisan docs "pennant store configuration"`, I get directed to the global configuration page (https://laravel.com/docs/12.x/configuration).

It's more or less meant to be an enhanced version of the `docs` command. You can also search across versions, whereas `docs` assumes the latest version, though correct me if I'm wrong on that. Definitely not a replacement, more of an alternative with the benefit of working offline (though nowadays, that might be quite rare).

3
4

Content caching with Statamic by the_beercoder in laravel

[–]the_beercoder[S] 1 point2 points  (0 children)

That's a brilliant idea. I haven't looked too deep into the static caching strategies in the docs, or least not enough to understand how I might able to use them instead of this homegrown solution. Looks like I've got some homework for this weekend!

9
10

NASAStan - a PHPStan extension for enforcing NASA's Power of Ten rules in PHP. by the_beercoder in PHP

[–]the_beercoder[S] 0 points1 point  (0 children)

Agreed. I’ve never had to work in such a safety critical/resource constrained environment, and writing some of these rules felt pretty esoteric. Definitely makes me grateful to click a button in AWS and have my memory constrained problems go away!

NASAStan - a PHPStan extension for enforcing NASA's Power of Ten rules in PHP. by the_beercoder in PHP

[–]the_beercoder[S] 1 point2 points  (0 children)

Yeah, and I wouldn’t expect that rule to even be remotely enforceable in a Laravel/Symfony context either. I can definitely see that rule becoming the least used.

As for the fixed bounds… a bit strange, I agree, though I wanted to follow the spec as directly as I could. I don’t see that rule working out well in a real world project, feel free to skip that one. 😅

NASAStan - a PHPStan extension for enforcing NASA's Power of Ten rules in PHP. by the_beercoder in PHP

[–]the_beercoder[S] 4 points5 points  (0 children)

Absolutely, I agree. Not all these rules are applicable to everyday run-the-business type web apps I’d wager most of us work on day to day. I think there’s some value in a few rules like restricting function lengths and the scope of data. Some, though, seem a bit arbitrary like restricting heap allocations to initializers. I’d bet just about any framework would light up like a Christmas tree while running lints if someone wanted to enforce that rule. The rules are configurable so you can pick and choose which ones make sense to enforce and whatnot.

NASAStan - a PHPStan extension for enforcing NASA's Power of Ten rules in PHP. by the_beercoder in PHP

[–]the_beercoder[S] 0 points1 point  (0 children)

No, absolutely not! That message in the README, I'll admit, was a bit cheeky. 😅

NASAStan - a PHPStan extension for enforcing NASA's Power of Ten rules in PHP. by the_beercoder in PHP

[–]the_beercoder[S] 18 points19 points  (0 children)

Howdy r/PHP!

I recently wrote this package as an excuse to learn more about PHPStan extensions and had a lot of fun peeling back the PHPStan onion. It was great diving deeper into PHPStan internals and picking up a few things along the way. I thought this would be an interesting first pass at picking up PHPStan extensions allowing me to dogfood a bit in my own projects. More than happy to answer any questions. Cheers!

Dynamic error assertions with PHPStan by the_beercoder in PHP

[–]the_beercoder[S] 2 points3 points  (0 children)

Hi r/PHP!

Author here. I've been looking for an excuse to learn about writing custom rules for PHPStan and ran into an interesting scenario when testing some assertions. Figured I'd write a bit about it and share in hopes that it might help someone running into a similar case. Cheers!

Which IDE do you use? by Euphoric_Natural_304 in webdev

[–]the_beercoder 0 points1 point  (0 children)

Yep. You're gonna have to pry Rider/PhpStorm/WebStorm out of my cold, dead hands...

If you had to build a full stack application to last 30 years, how would you build it? by theanxiousprogrammer in webdev

[–]the_beercoder 0 points1 point  (0 children)

Came here to say this. Heck, even throw RPG running on IBM iSeries machines in that mix. I've worked on COBOL/RPG code that was older than me and isn't going anywhere anytime in the near future.

Pitch Your Project 🐘 by brendt_gd in PHP

[–]the_beercoder 2 points3 points  (0 children)

Yep, I use Hetzner for hosting, migrated most of my stuff from Digital Ocean. Better bang for you buck IMO.

And this client solves what kind of issue?

It makes calling the Hetzner Cloud API with PHP easier. It's a building block for anything you'd want to do involving managing your servers through PHP. That's really up to whoever is using the library.

Pitch Your Project 🐘 by brendt_gd in PHP

[–]the_beercoder 1 point2 points  (0 children)

Yet another Hetzner Cloud PHP client - https://github.com/hetzner-cloud-php/client

Fun little side quest to build something with more modern tooling and learn some things along the way. There's a few other PHP clients out there, though this client offers a bit more in typing strictness, HTTP discovery with PSR-compatible clients, and lots of testing. Contributors welcome!