Skip to content

u/muglug

In this archive from Jan 2017 to Dec 2026

41
posts
767
comments
20
media
6.3k
score
3 saved before deletion

Top posts

Top comments

[Edit: to be explicit I'm Matt, author of the above-linked article]

That together with the fact the the core maintain of the official Laravel plugin for psalm also doesn't work with PHP anymore and cannot invest as much time in it as he used to, leaves me wondering whether we should start looking for altenatives.

The main alternative is Larastan, which has become incredibly popular in a short space of time. That plugin relies on PHPStan, and I encourage anyone who benefits from PHPStan to support its creator by either purchasing a PHPStan Pro subscription or by sponsoring him via GitHub.

Taylor's on record saying he doesn't care if Laravel code cannot be statically analysed. If you want things to change, you might use your influential position in the Laravel community to push back against that sentiment.

​

In an ideal world though, the [PHP] community would pick up the work on Psalm.

I made this point in the article, but it's worth restating: the community has picked up a lot of work on Psalm, though more help is always welcome. Closing minor bugs is thankless work but if lots of people do a bit, it becomes a lot easier.

​

[I] admit the problem space is far from my area of interest

That's fine, but let's encourage everyone to be interested in working on these sorts of tools. It's not just Psalm — PHPStan also benefits massively from open-source contributions. Taking a bit of time to work on static analysis tools helps one write better-architected code — trust me!

89 points

Could you use Laravel to power Facebook? Yes

This is technically true!

But Facebook's compute costs would explode, their response times would plummet, and users would leave the platform (faster than they're leaving already).

Facebook relies on some incredibly highly-optimised-for-their-use-case storage systems to power facebook.com.

That's not an argument against using Laravel, though. The probability that your Laravel application will have Facebook-or-Wikipedia levels of traffic is roughly 1 in a million.

Instead, focus on building something useful for your target audience. If Laravel helps you build that faster, that's great. You can solve the Facebook-sized scaling issues when you have Facebook-sized traffic.

67 points

u/azjezz this is the way.

For those who don’t know, I created Psalm and introduced function generics (though Phan was first with class generics).

Docblock types are implicitly erased, but as Seif points out there are a bunch of downsides to putting the types in docblocks.

I have now been writing Hack (Facebook fork of PHP) full-time for almost five years — alongside hundreds of other backend engineers at Slack — and it’s obvious to everyone around me that erased generics are a good idea.

56 points

I don't think the use of an internal framework is itself a red flag — many internet companies that started in the 2000s started with PHP, and many of those companies developed their own internal frameworks. Many of those frameworks are still around and in use today, having hopefully been refined in the intervening period. I know my company (Vimeo) has an internal framework, as does Etsy, Slack and Facebook.

If, however, it's recently-created company and it has its own internal framework I'd be a little more wary, given how many decent frameworks exist today.

54 points

Subreddits

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.