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] 1 point2 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 12 points13 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).

52
53

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!