@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.

dshafik, to random
@dshafik@phpc.social avatar

This is a great example of things you can do... but probably shouldn't: https://github.com/paragonie/typed-arrays (is paragonie in the fediverse?)

alessandrolai,
@alessandrolai@phpc.social avatar

@dshafik don't know about the company, but @scottarc is here

ramsey, to Symfony
@ramsey@phpc.social avatar

Why does define what appears to be a “real” value for APP_SECRET in the .env file that’s committed to your repository, and then, right above it, there’s a comment that says (in all caps):

“DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES.”

Where’s the documentation that explains what APP_SECRET is used for? Why doesn't it put this value in .env.local (ignored by .gitignore)?

alessandrolai,
@alessandrolai@phpc.social avatar

@ramsey @manal @nicolasgrekas well it's not sensible if it's used only locally, and then you use a .env.prod or (better) inject a real env variable in your prod environment.

In any case, you can suggest changes to this (like adding the link above in the default .env) in the recipes repo: https://github.com/symfony/recipes/tree/main/symfony/framework-bundle

ramsey, (edited ) to random
@ramsey@phpc.social avatar

I managed to avoid for 10 years, but it’s finally caught up to me, so I hope I’m a Kubernetes god after going through all this required (by job) Kubernetes training.

When do I start honking like a duck goose?

alessandrolai,
@alessandrolai@phpc.social avatar

@ramsey welcome to this new fun world! 😁 I assure you PHP plays very nicely with k8s... I even did a lightning talk about it some years ago!

I also wrote a small wrapper for long running processes, take a look here and play with it!

https://github.com/facile-it/terminable-loop-command

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

This Friday I'll be speaking at @phpday 2024, this time about my long story with queues and, in particular, about Messenger.

See you there?

alessandrolai,
@alessandrolai@phpc.social avatar

@ocramius @phpday 👋 😄

alessandrolai,
@alessandrolai@phpc.social avatar

@heiglandreas @phpday oh we finally meet! 😁 Know that you're my son's hero since you sent me all those DO's shark stickers 🤣

alessandrolai,
@alessandrolai@phpc.social avatar

@lmillucci @phpday happy to hear that! 😁

Skoop, to AdobePhotoshop
@Skoop@phpc.social avatar

could save so much money in customer support by creating self-service tooling that actually works.

alessandrolai,
@alessandrolai@phpc.social avatar

@Skoop @afilina with a select with LIMIT 1? 😅

dantleech, to random
@dantleech@fosstodon.org avatar

urgh, knee deep in Traits, *Aware interfaces, and Abstract classes.

alessandrolai,
@alessandrolai@phpc.social avatar

@maxalmonte14 @dantleech IMHO default implementations could be a good use case for traits. I rarely use them, but I consider them useful and good only with a few caveat:

  • they must be self-contained (no reliance on external properties/methods)
  • you have to remember that they are the same as copy-pasting code, without relying on inheritance
  • if you're tempted to rely on their presence, put an interface on it and rely on that
alessandrolai,
@alessandrolai@phpc.social avatar

@maxalmonte14 @dantleech another useful use case of traits for me is splitting utility code inside PHPUnit tests, where you're already bound by the TestCase inheritance chain.

alessandrolai,
@alessandrolai@phpc.social avatar

@afilina @dantleech @maxalmonte14 totally agree. And in fact your reply made me remember another use case for traits, exactly to avoid inheritance: a Timestampable trait with createdAt and updatedAt properties and getters to avoid to create an AbstractTimestampableEntity.

gianarb, to random
@gianarb@hachyderm.io avatar

It looks like tomorrow I am gonna get fiber at home o.O never had that before and I am not sure I am ready 🎊

alessandrolai,
@alessandrolai@phpc.social avatar

@gianarb good for you!

suggestion: check that your local LAN isn't a bottleneck! 😂 I have a docking station for my laptop with an ethernet cable, and switching to fiber made me notice that I was going at 100Mbit instead of 1Gbps 😅 and I had to replace the cable

grmpyprogrammer, to random
@grmpyprogrammer@phpc.social avatar

I know I said “no more talks about testing” but it sure feels like “Testing in the shadow of ChatGepetto” is a talk I should do

alessandrolai,
@alessandrolai@phpc.social avatar

@grmpyprogrammer would it be just one slide with "Use mutation testing. MSI 100%. Good luck!" ? 😬

evacide, to random
@evacide@hachyderm.io avatar

A journalist sent me a bunch of questions about Baby Reindeer, so I watched it this weekend, and not only did I not answer the questions, but now I really need to watch something that is not about stalking and sexual assault.

alessandrolai,
@alessandrolai@phpc.social avatar

@steve @steinarb @evacide do you know that the main actor, who portraits Donny, is also the author AND everything is autobiographical?

Yeah, let that sink in a bit.

jamesshore, to random
@jamesshore@mastodon.online avatar

New blog: "A Useful Productivity Measure?"

"In my new role as VP of Engineering, there was one question I was dreading more than any other: 'How are you measuring productivity?'

I can’t fault the question. I mean, sure, I’d rather it be phrased about how I’m improving productivity, rather than how I’m measuring it, but fair enough. There are real problems in the org, I do need to fix them, and I need to demonstrate that I’m doing so."

https://www.jamesshore.com/v2/blog/2024/a-useful-productivity-measure

alessandrolai,
@alessandrolai@phpc.social avatar

@jamesshore very interesting article! Also, "product bets" is a very interesting concept, but I fear it may hide a trap: since it considers the bet the number of eng-days to employ against future return over multiple years, it seems to me that it doesn't consider the ongoing cost that the new feature (or any shortcut take) may introduce.

Is there a failsafe against this problem? Maybe some detail that you didn't mention?

ramsey, to Starwars
@ramsey@phpc.social avatar

I’m only a few episodes into this season (3rd season) of , and wow! It’s darker and with an ambiance/tone like . I like it.

alessandrolai,
@alessandrolai@phpc.social avatar

@SenseException @ramsey I still have to see the lay episode, please don't spoil it! 😁

But overall I agree, it's a great series

sarah, to random
@sarah@phpc.social avatar

Spent the morning writing code to test a microservices architecture. Wondering at what point testing relationships between services becomes cumbersome.

alessandrolai,
@alessandrolai@phpc.social avatar

@sarah I was discussing contract testing w/ colleagues yesterday, which is exactly what you're talking about.

IMHO, you either go full-decoupled, and leverage stuff like OpenAPI to do contract testing in isolation, or you go full-coordination, and prop up choreography testing and enforce cross-referenced testing with some tooling like Pact and the like.

You pick your poison, but IMHO the middle ground is counterproductive, you don't get a clear architecture or a good collaboration environment

alessandrolai,
@alessandrolai@phpc.social avatar

@sarah that makes total sense, because those tests should not be too hard to develop/maintain, and you can easily put them in CI.

But I don't think they can replace contract testing, since they require merge/deploy, so I would consider them a "safety net", not a part of the vital "development feedback loop" that normal CI gives you.

Later, you can start deploying ephemeral environments from branches and run the smoke tests there, but that kind of stuff has a medium-to-high maintenance cost...

maks_rafalko, to random
@maks_rafalko@mastodon.social avatar

Discussing with @OndrejMirtes how PHPStan can be integrated into Infection "natively" to kill Mutants that aren't killed by tests.

https://github.com/phpstan/phpstan/discussions/10966

If you have ideas, please participate.

alessandrolai,
@alessandrolai@phpc.social avatar

@maks_rafalko @OndrejMirtes this is really interesting! I'll subscribe to this 😁

ollieread, to php
@ollieread@phpc.social avatar

I need to remember that Mastodon exists! I’m currently writing a bunch of content to do with PHP and this would be the perfect place to talk about that.

I’m currently trying to decide whether is an interesting enough topic that people may like an in-depth course/series on it. It seems to be something a lot of people are vaguely aware of, but don’t really know the details.

alessandrolai,
@alessandrolai@phpc.social avatar

@ollieread it's refreshing to read some PHP related content that gives recent language version for granted 😂

BTW, this article would be an ideal springboard to talk about generics; otherwise, to talk about this PHP-FIG bylaw: https://www.php-fig.org/bylaws/psr-evolution/

I wrote that, and it totally revolves around variance, since I had to devise a way around that to create a smooth migration path for PHP-FIG new typed interfaces...

alessandrolai,
@alessandrolai@phpc.social avatar

@ollieread well, the PSR scope is intentionally reduced to avoid over-standardization. And those are actively being used by multiple current frameworks and libraries right now.

Still, there are a couple of cases where we would like to do improvements, and the service registration for container is one currently being discussed in the mailing list.

alessandrolai,
@alessandrolai@phpc.social avatar

@ollieread that's surely an interesting approach, but IMHO you're venturing outside of the scope of PHP-FIG and onto the implementation space...

cabbey, to php
@cabbey@phpc.social avatar

ok folks, you were right Rector is pretty cool. The learning curve is steep AF, and the docs are, well, let's just say they're written by engineers for engineers. But given the target audience for this tool, that's OK. I've not yet done the changes I was originally asking about with it, because the config for it is going to be a PITA to build. I've been starting small. But what I've done so far has been pretty cool! I've done some wild things with RenameClassConstFetchRector for example. 🧵

alessandrolai,
@alessandrolai@phpc.social avatar

@cabbey @shudder yeah sorry, that's how it works.. That config option has some arguments though, you may try to see if there's one to help you there.

dragonmantank, to random
@dragonmantank@phpc.social avatar

Decided to switch back to android, going with the S24 Ultra.

I had forgotten how bad it is logging back into everything. At least the transfer app moved and downloaded all my apps for me.

alessandrolai,
@alessandrolai@phpc.social avatar

@dragonmantank if you transfer between Samsung, you basically don't have to re-log into anything, they have a dedicated app to transfer everything, even directly via an USB C cable between the two phones..

Otherwise, I've found that having a password manager reduces a lot the login friction, whenever a "login via Google SSO" is not available.

ramsey, to random
@ramsey@phpc.social avatar

Has fedi engagement picked up recently, or am I just posting quality content?

alessandrolai,
@alessandrolai@phpc.social avatar

@ramsey @thomas awesome! 🤣

This gives the same vibes of this from @bagder, Curl's creator: https://mastodon.social/@bagder/112313816741180729

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