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

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.

asgrim, to random
@asgrim@phpc.social avatar

I wonder if the Bri'ish "bo'u'o'ua'ah" is the longest English string of vowels in a word? 🤔

alessandrolai,
@alessandrolai@phpc.social avatar

@derickr @asgrim and I thought that the Italian "aiuola" was stretching the mark 😂

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

cspray, to php
@cspray@phpc.social avatar

I have found myself, for the first time, having to write what I consider worse code to satisfy Psalm static analysis. Here's a watered-down example showing what I consider odd behavior.

https://psalm.dev/r/5862a290e2

I'm not certain why the 2nd call to doSomething() is valid but the 1st call is not.

alessandrolai,
@alessandrolai@phpc.social avatar

@sidawson @cspray that's not the issue here. The same snippet should trigger PHPStan errors too, because it was the starting definition too strict, since it requires "list".

List is an array with only consecutive integer keys. If you don't re-index (and the spread operator does) you don't have a (guaranteed) list anymore.

Crell, to php
@Crell@phpc.social avatar

Proposal for a conference talk: How to configure and all its tooling extensions (xdebug, phpstan, php-cs-fixer, etc.) to use a docker container consistently.

That could easily fill a tutorial...

alessandrolai,
@alessandrolai@phpc.social avatar

@Crell why do you find it so hard? Isn't enough to define it as the default interpreter, and put "default interpreter" as the runtime for each tool?

The only other fix that I need is to use relative paths when defining tools and their configs..

alessandrolai,
@alessandrolai@phpc.social avatar

@Crell I doubt I'll have enough time to do it 😵 hopefully this summer...

alessandrolai,
@alessandrolai@phpc.social avatar

@Crell I'm just swamped at work! 😭

alessandrolai,
@alessandrolai@phpc.social avatar

@herndlm @Crell no you can't. Other IDEs like VS code solve the issue with dev containers, basically running the IDE from the inside of Docker.

I have many colleagues with Macs and they all solved the performance issues with some tool, but I don't know how.

ian, to random
@ian@phpc.social avatar

MySQL 8.0.25 or so and above allows indexes of a, b, c to work with queries with WHERE on a and c only. This is pretty new. - @Stoker

alessandrolai,
@alessandrolai@phpc.social avatar

@ian @Stoker wow this is really interesting!! I would very liked to have seen this talk :(

beberlei, to random
@beberlei@phpc.social avatar

Together with my new co-author @timwolla we are restarting the discussion on the #[\Deprecated] attribute RFC.

See https://wiki.php.net/rfc/deprecated_attribute and thread on internals ML.

alessandrolai,
@alessandrolai@phpc.social avatar

@beberlei @timwolla really interesting!

A suggestion that popped into my mind: would it be possible to pass a callable as a argument that would make the deprecation conditional, depending on the arguments? Something that would accept the arguments and returns a bool..

a_smeriglia, to random Italian
@a_smeriglia@mastodon.uno avatar

Perché i no vax sono tendenzialmente anche pro Putin?

(La risposta “perché sono scemi” non mi soddisfa. Uno scemo dovrebbe ogni tanto, anche per caso, imbroccare la scelta giusta. Fare sempre sistematicamente la scelta sbagliata significa riconoscere quale sarebbe la scelta giusta e per qualche motivo fare l’opposto).

alessandrolai,
@alessandrolai@phpc.social avatar

@grimjfoot @a_smeriglia esatto, si sospetta che molte campagne di disinformazione anti vax siano di origine russa...

mandrasch, to php
@mandrasch@social.tchncs.de avatar

I love for its stable deploy process (project config in git). But I haven't found a quick way for setting up & deploying hobby projects yet on small VPS. Same with other CMS / frameworks.

Laravel Forge or ploi are great helpers, but with extra costs.💰 But ...1/

alessandrolai,
@alessandrolai@phpc.social avatar

@mandrasch maybe @platformsh can work for you?

mwop, to firefox
@mwop@phpc.social avatar

So irritated that decided NOT to support PWAs on Linux. (Yes, I know about the extension, but it's a PITA to keep up-to-date, and because it uses an ADDITIONAL runtime in the background, it's a waste of system resources.)

I've concluded that the only way to use Outlook consistently on Linux is via the web (love OWL for TB, but invites/events often disappear)... and without reasonable PWA support in FF, I'm having to contemplate returning to a chromium-based browser. 😥

alessandrolai,
@alessandrolai@phpc.social avatar

@mwop @wez i had the same doubt for Meet, but I resorted to have it via Chrome, but I still keep Firefox as my daily browser.

Only downside, if I click a link in the Meet chat, it tries to open it in Chrome, even if it's not the default browser.

alessandrolai,
@alessandrolai@phpc.social avatar

@mwop @wez I thought the same as soon as I hit "reply" 😅 in fact my client (I use Gmail) is a pinned tab in my Firefox instance, alongside a couple more tools (calendar, Jira...)

saki, to random
@saki@phpc.social avatar

I am now the release manager (rookie) for php8.4. 8.4 is going to be the version I'm most attached to. 🎉

alessandrolai,
@alessandrolai@phpc.social avatar

@saki congratulations! And thank you for taking this role!

Skye, to php German
@Skye@chaos.social avatar

Gargh, I got really used to Laravel Dusk letting me write super simple browser testing tests with #phpunit / #pest but now I need that kinda test in a non-Laravel #php project.

I guess my best bet is straight up Selenium? :/

alessandrolai,
@alessandrolai@phpc.social avatar

@Skye I would suggest Playwright (if you can venture outside of PHP, it's really straightforward) or Symfony Panther (if you don't).

baethyn, to webdev

I have an ask for my technologically adept fedi friends. I am trying to set up a local development environment on my computer. the catch is that I'm and sort of a newbie at this. I got all excited when I heard about XAMPP only to find out it is a giant pile of shit for accessibility. I even tried WAMP only for it to tel me I needed some other things, which I didn't quite understand and haven't had a chance to investigate. I am getting frustrated and would like some advice. Do I really need the kind of local environment that wamp would provide? I will probably need sql and php, but if that's all I need how do I set this up? I've never worked with php before and only recently taken a tutorial on sql. Any help would be great.

alessandrolai,
@alessandrolai@phpc.social avatar

@bhhaskin @baethyn I second the Docker suggestion, even in Windows you can pilot everything in the terminal thanks to WSL, and it opens up any tech that you want, not only PHP.

If you go down that route, the next step is Docker Compose, which simplifies running multiple Docker container together, like having PHP + MySQL.

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