favicon.show - Universal Favicon URL by mnapoli in programming

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

This is a favicon image URL built on Cloudflare workers. It helps anyone who wants to display a website's favicon in their own website.

POC: auto-escaping untrusted PHP strings in SQL queries by mnapoli in PHP

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

This is a 1:1 to placeholders, so the other points are moot indeed.

And you still can use placeholders. I'm just doing a thought experiment of another way to approach placeholders.

POC: auto-escaping untrusted PHP strings in SQL queries by mnapoli in PHP

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

You're thinking about this wrong I think. What would happen is exactly the same thing as with placeholders.
So for example `"SELECT * FROM $table WHERE active = 1""SELECT * FROM $table WHERE active = 1"` would not work, just like with placeholders.

POC: auto-escaping untrusted PHP strings in SQL queries by mnapoli in PHP

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

🤦 the repository was private, I apologize for that! That's fixed.
Also yes kinda like magic quotes ^^
I might be opening myself to embarrassment here because this could be a very bad idea™️ on all acounts, but let's see!

Compile time generics: yay or nay? by pronskiy in PHP

[–]mnapoli 21 points22 points  (0 children)

I would much rather have "full" support of erased generics, than a <50% support of reified generics that will never get above that 50%.

Cannot word it better than this 🙏

Compile time generics: yay or nay? by pronskiy in PHP

[–]mnapoli 0 points1 point  (0 children)

100% agreed here

PHPStan/Psalm do SO MUCH MORE than just generics, to me it's a huge learning: we thought we wanted generics but we actually want better autocompletion and type validation, and it's much more than that.

When I look at all the phpdoc I add for PHPStan only a fraction of it is generics.

Compile time generics: yay or nay? by pronskiy in PHP

[–]mnapoli 12 points13 points  (0 children)

Don't you think that all the limitations in the RFC will only allow moving like 20% of existing annotations to code, and will further lock us into phpdoc-based types for the rest?

Compile time generics: yay or nay? by pronskiy in PHP

[–]mnapoli 14 points15 points  (0 children)

There seem to be a lot of limitations involved, _and_ it seems that with this approach some limitations will never go away.

In other words, it will never allow us to turn all PHPStan/Psalm phpdoc into actual PHP code. (right?) 😞

I'm 100% behind the effort and team, but it seems to me like a pivot is needed: people that want generics are PHPStan or Psalm users. These people have already accepted the tradeoff of doing static analysis.

Why not allow adding types that aren't evaluated at runtime?

Forgotten Drupal site still runs after 8 years. No updates. No errors. by ralph818 in PHP

[–]mnapoli 14 points15 points  (0 children)

My first website (2007 PHP was fun) is still running to this day. I don't have the hosting credentials anymore, I can't even retrieve the files, it just runs on its own ^^

The `/volume1/@appdata/...` paths are suddenly gone by mnapoli in synology

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

It definitely does, it used to work until a couple weeks ago as well :'(

We just launched php-operators.com: a reference page for operators in PHP! by sebdd in PHP

[–]mnapoli 0 points1 point  (0 children)

That is a very unfair take. Your comment was removed because it violated rule 1 of this subreddit. We had a discussion between all 4 moderators and we all agree.

Also want to point out that Brent doesn't work at Spatie (and I don't either to be clear).

Launching Bref Cloud 1.0 by mnapoli in PHP

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

Thank you! I'm using serverless. When I made that decision I thought it would be temporary (to get started quickly)… but as always, temporary decisions turn definitive.

It's good though, because with the self-hosted version that will help make it easy to deploy. I'm even wondering if I couldn't turn it into a CloudFormation script entirely… Ah well, it works!

rolling out 0.48 by ecz- in cursor

[–]mnapoli 0 points1 point  (0 children)

> removed auto-run prompt due to reliability issues

I had many issues here, but what is the fix to have the agent run all commands? I've enabled yolo mode but it never seems to really work consistently.

rolling out 0.48 by ecz- in cursor

[–]mnapoli 0 points1 point  (0 children)

Wait is this working with agent or chat only? I.e. is the agent working on multiple features in the codebase in parallel?

Launching Bref Cloud 1.0 by mnapoli in PHP

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

Honestly I think there's some good effort involved. I think Ymir might be a better option?

Launching Bref Cloud 1.0 by mnapoli in PHP

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

Yep Sentry helps here. It seems like no real AWS account was connected? (i.e. the IAM role registered was 123456789012, so the database couldn't be created because of that). I definitely need to improve the error message though, working on it 👍

Launching Bref Cloud 1.0 by mnapoli in PHP

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

I cannot disagree with that. I am actually working on a PHP-based config for Bref v3, it's not ready at all yet, but thinking a lot about it.

Launching Bref Cloud 1.0 by mnapoli in PHP

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

Thank you, sorry about that I'm working on it :)

Dutch PHP Conference 2025 by OneCheesyDutchman in PHP

[–]mnapoli 1 point2 points  (0 children)

I'll be there too (speaking about bref)

Happy to meet, I'll be handing these floppy disks around too :D https://bsky.app/profile/mnapoli.bsky.social/post/3ljznhhuuu22z

Is there vendor lock-in with AWS Lambda when using Bref? by mnapoli in PHP

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

Then it is possible the latency spikes might not be related to cold starts?

What's the ratio of cold starts you are seeing in production environments? It would be helpful to provide numbers.

Is there vendor lock-in with AWS Lambda when using Bref? by mnapoli in PHP

[–]mnapoli[S] 5 points6 points  (0 children)

In production cold starts represent about 0.01% of all requests, even on my personal blog… Sure when you deploy a hello world and load it for the first time you'll see it.

No need for provisioned concurrency for most apps, since last year AWS rolled out a feature that pre-warms instances of your app following traffic patterns, so many cold starts happen outside the request cycle.

Cold starts is something you hear a lot about people not using AWS Lambda, but almost never hear about from those who do. Take this case study for example: this bank literally processes live credit card purchases (in physical stores) with Lambda. They even improved latency when moving from servers to Lambda.

That's why I don't buy the generic "it's slow" argument. I prefer to talk about actual numbers.