@alessandrolai@phpc.social
@alessandrolai@phpc.social avatar

alessandrolai

@alessandrolai@phpc.social

Head of Platform @ Facile.it, https://phpc.social/@phpfig secretary, @MilanoPHP coordinator, computer science passionate, retired netgaming nerd

This profile is from a federated server and may be incomplete. Browse more on the original instance.

taco, to php

can someone convince me why is good actually

alessandrolai,
@alessandrolai@phpc.social avatar

@matzipan @Crell @taco in my example, both are queue consumers, but I've seen the same when providing HTTP APIs, you just have to add 5-8 seconds to both for healtchecks to pass. I also heard of pretty worse situations like Java, where you need upwards of 5 minutes to launch a pod, which requires 5-10 times the amount of memory for a single replica...

alessandrolai,
@alessandrolai@phpc.social avatar

@matzipan @Crell @taco but the startup time of PHP is more than enviable. I'm currently using it under k8s and I can scale up to dozens of pods in a matter of seconds (using a not-lightweight framework like Symfony), while other projects take minutes to go up (I oversee a Nest.JS one, for example, which takes at least 120s to boot).

jrf_nl, to random
@jrf_nl@phpc.social avatar

What the f*ck people ?
Copying code I wrote into your own project and then reporting bugs which don't exist in the original project and expect me to solve your shit ????

Seriously, use Composer like a normal person and don't rip off other people's code....

And yes, they are violating the project license as well.

alessandrolai,
@alessandrolai@phpc.social avatar

@afilina @jrf_nl I have to just hope that's only partially malicious, and it's just uneducated people that do not know how OSS licenses work, and they think that "open" means "I can do what I want with that".

dandb, to php
@dandb@mas.to avatar

Generics in would make my life so much easier today.

alessandrolai,
@alessandrolai@phpc.social avatar

@ramsey @dandb @wogan absolutely! I use generics in annotationa a lot in pairing with @phpstan, and for closed projects IMHO you get 80-90% of the benefits with it

kboyd, to php
@kboyd@phpc.social avatar

I'm sure a number of folks on this instance have heard of The PHP League (aka The League of Extraordinary Packages) https://thephpleague.com/

But tell me - which packages do you use (or that you've used in the past)? What do you like about them?

#php

alessandrolai,
@alessandrolai@phpc.social avatar

@kboyd FlySystem (over and over), CSV, Commonmark (for the @phpfig website)

thomasfuchs, to random
@thomasfuchs@hachyderm.io avatar

I spare you the Space Karen screenshot but he wants to remove the “block” feature from Twitter.

He’s like an AI model trained to ruin nice things.

alessandrolai,
@alessandrolai@phpc.social avatar

@thomasfuchs I bet that's because he doesn't want people to block HIM.

ian, to random
@ian@phpc.social avatar

So, back on May 26 or so, the versions of the @getsentry PHP SDK being used in one of my projects started not getting payloads to Sentry, albeit just in an AWS environment. Bumping to Sentry's latest SDK fixed it (from 3.12 to 3.19.1) but I really want to know what broke.

@alessandrolai, any ideas here?

alessandrolai,
@alessandrolai@phpc.social avatar

@ian @getsentry there were some recent issues on the HTTP layer, due to sub dependencies. Maybe you changed something there?

nunomaduro, to random
@nunomaduro@mastodon.social avatar

It is unlikely that the RFC for "interface default methods" will be accepted, and that's perfectly alright! If a feature does not gain widespread acceptance, it is best to not have it in the language. https://wiki.php.net/rfc/interface-default-methods

alessandrolai,
@alessandrolai@phpc.social avatar

@hugot @nunomaduro with an abstract class you're locked into inheritance, but not with an interface

ramsey, to php
@ramsey@phpc.social avatar

The @phpfig PSRs should also define the names of the packages that include the interfaces, as well as the name used to indicate implementations of the PSR.

i.e., PSR-17 would include psr/http-factory and psr/http-factory-implementation, so I don’t have to go searching for these names every time.

alessandrolai,
@alessandrolai@phpc.social avatar

@lewiscowles1986 @ramsey no they didn't. A couple of them left the "project representative" position inside the @phpfig, but i.e. Symfony is still implementing those. Latest example, PSR-20 and the Clock component: https://symfony.com/doc/current/components/clock.html#usage

derrabus, to random
@derrabus@phpc.social avatar

It's done. Symfony 7 won't support Doctrine Annotations anymore. PHP's attributes are the future.

alessandrolai,
@alessandrolai@phpc.social avatar

@Skoop @derrabus aren't attributes the same as annotations in terms of names/classes? I already migrated a couple of projects (thanks to Rector) and it was so identical that the git diff was minimal...

wyri, to php
@wyri@haxim.us avatar

A random unit test breaks in one of my packages, but only on , both and are fine. And of course, it's about \r and
🤦

alessandrolai,
@alessandrolai@phpc.social avatar

@wyri @kboyd i see it as an actual new line on Tusky, lol! 😁

mbbroberg, to privacy
@mbbroberg@floss.social avatar

This Zoom terms of service update is wild. Can anyone elaborate on what it means in practice?

Can they recreate our likeness and voice via AI without further consent? Is this update mean they’re not HIPAA compliant?

Would love a more educated read on it.

alessandrolai,
@alessandrolai@phpc.social avatar

@mbbroberg let me guess: these changes are not effective in the EU.

Thanks again, GDPR.

grmpyprogrammer, to random
@grmpyprogrammer@phpc.social avatar

After many years of trying I finally summoned the patience to make a good omelette

alessandrolai,
@alessandrolai@phpc.social avatar

@grmpyprogrammer and you're getting it at breakfast! That's a big step up from other non-Italians 😂

herndlm, (edited ) to php
@herndlm@phpc.social avatar

I think there was a composer plugin or smth that makes sure typical dev dependencies never end up in the require section of the lockfile, right? Which one is it? #followerpower #php #composer

Background: A colleague added a composer dev dependency by mistake to the require section in an internal plugin and nobody noticed. When requiring that plugin the dev dependency ended up in the lockfile and vendor of the main app and again nobody noticed. And I'd like to catch that.

alessandrolai,
@alessandrolai@phpc.social avatar

@herndlm you can probably use Composer Unused? But I'm not sure it covers your use case.

Otherwise, what you require is the reverse of Composer Require Checker, so still out of luck...

theseer, to random
@theseer@phpc.social avatar

I have an question: The _Throws-Mutation effectively removes my exit condition to avoid an endless recursion loop and thus runs into a Timeout.

The Timeout though apparently is considered bad, given it's not considered a "killed" mutation.

So, how do I make infection happy? I don't know how to avoid an endless recursion when infection would mutate my exit condition away ;)

alessandrolai,
@alessandrolai@phpc.social avatar

@theseer happy to have been of help 😁 it's just that I stumbled on the same issue before 😬

alessandrolai,
@alessandrolai@phpc.social avatar

@theseer can't you enforce the timeout at the test level, setting a size? That should count as a failed test. IIRC I had to do it like that somewhere for the same situation.

tdpauw, to random
@tdpauw@mastodon.social avatar

In IT more people should do an internship in a factory. Not in the offices, but on the work floor! Just to understand the effects of queuing, batch sizes and inventory.

The number of people that do not understand these effects is abysmal 🙄

alessandrolai,
@alessandrolai@phpc.social avatar

@tdpauw that's one of the reasons that made me love The Unicorn Project! It describes this perfectly, with a constant parallel toward software development

alessandrolai,
@alessandrolai@phpc.social avatar

@tdpauw ouch my mistake, I was thinking of the Phoenix Project, I messed up the titles! But IIRC there's some bit of that there too, since it's a parallel storyline...

nebucatnetzer, to programming

Still a great talk by @vanamerongen about how to use properly. It’s a very down to earth talk and explains things in a way that doesn’t make you feel stupid. Would recommend it everyone who has basic knowledge about git but felt they should be better by now.

https://www.youtube.com/watch?v=_e5oq4JT4_8

alessandrolai,
@alessandrolai@phpc.social avatar

@vanamerongen @nebucatnetzer immediately added to "Watch it later", thank you!

alessandrolai,
@alessandrolai@phpc.social avatar

@nebucatnetzer @vanamerongen is the content the same as this one other, more recent recording? I definitely loved this one, and it had an immediate influence on how I do my commits: https://youtu.be/Qf5LYx5l9Qc

ian, to random
@ian@phpc.social avatar

Strict orders on purchased or long-term-leased space is sunk cost fallacy corporate copium.

That's it. That's the post.

alessandrolai,
@alessandrolai@phpc.social avatar

@ian or it's a "silent layoff"...

A way to (stupidly) kick off staff without doing am actual layoff. And whoever stays gets to be micromanaged to hell and back.

jessicamauerhan, to random
@jessicamauerhan@phpc.social avatar

Does anyone use an app for meeting reminders? The built in notifications for Google calendar or the calendar app on the Mac are too quiet and not visible enough.

If I'm hyper focused on actual coding, I need something that will actually interrupt that to get me to meetings on time.

alessandrolai,
@alessandrolai@phpc.social avatar

@jessicamauerhan I use the Google Calendar integration in Slack to get a notification 1 minute before the actual meeting. That counts as a private message notification there, so it's really good to be on time. On top of that, I have a BT band on my wrist that forwards notifications from my phone, in the event that I'm not in front of my screen.

alda, to php
@alda@topspicy.social avatar

As Chrome/Chromium does not include an Icelandic locale for currency and number formats in its JavaScript API, I'll have to resort to rendering currency in the backend using the NumberFormatter class.

Aren't Intl and NumberFormatter usually included with most hosting packages or do I need to worry about that as well?

alessandrolai,
@alessandrolai@phpc.social avatar

@alda you can cover your bases with the polyfill: https://packagist.org/packages/symfony/polyfill-intl-icu

alessandrolai, to php Italian
@alessandrolai@phpc.social avatar

Another release fresh off the press!!

I've finally tagged 2.0.0 stable of facile-it/doctrine-mysql-come-back (after a month of BETA4), which brings support for @doctrine DBAL v3 (3.6+ to be precise)

This small library is a connection wrapper that reconnects automatically when the infamous "MySQL has gone away" error (or similar ones) pops up. If you ever encountered that, try it out, it's automagic!

https://github.com/facile-it/doctrine-mysql-come-back/releases/tag/2.0.0

alessandrolai, to random Italian
@alessandrolai@phpc.social avatar

I just released 2.2.0, which adds support for the Cobertura XML coverage report, leveraging the underlying @phpunit feature.

This was useful for me to feed it to GitLab's test code coverage visualization feature.

https://github.com/facile-it/paraunit/releases/tag/2.2.0

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • thenastyranch
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • ngwrru68w68
  • provamag3
  • magazineikmin
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • JUstTest
  • All magazines