Replies

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

ramsey, to Kubernetes
@ramsey@phpc.social avatar

Why isn’t --record=true the default behavior when applying changes to a deployment?

alessandrolai,
@alessandrolai@phpc.social avatar

@ramsey what command are talking about? I do not use kubectl so much since Helm took over in my projects, but I don't remember that option though

alessandrolai,
@alessandrolai@phpc.social avatar

@ramsey I always only did kubectl apply for changes, never delved deeper so I didn't know this option! I switched to Helm that handles revisions automatically for rollbacks too...

I was searching around to understand it and I stumbled on this, it seems they're deprecating it: https://stackoverflow.com/questions/73814500/record-has-been-deprecated-then-what-is-the-alternative

donatj, to php
@donatj@mastodon.social avatar

You know, while we’re dropping parentheses on things in I’d like it if we dropped them from control structures like if/for/while

End the argument of

if($foo) {

vs

if ($foo){

once and for all

if $foo {

to rule them all

alessandrolai,
@alessandrolai@phpc.social avatar

@donatj you're skipping the "right" approach, the one with spaces on both sides, which is the one required by PSRs, and PER-CS lately: https://www.php-fig.org/per/coding-style/#5-control-structures

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

@rob this is the Docker snippet that I was talking you about to avoid needed the wait-for script. You define the healthcheck on the MySQL service in Docker Compose:

mysql:
image: mysql:8
healthcheck:
test: "netstat -tulpn | grep LISTEN | grep -q 3306"
interval: 1s
start_period: 60s

then you can call:

docker compose up --wait mysql

or

docker compose wait mysql

Those commands are recent additions though!

alessandrolai,
@alessandrolai@phpc.social avatar

@willpower232 @rob definitely! But it's just a small improvement over Rob's approach that he had in his slides at , where he was executing a well known "wait-for" script

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

In 5 minutes I'll be on stage with my talk " Messenger: the sharpest tool in your toolbox"

Come to see me, and please give me feedback on Joindin!

https://alessandrolai.dev/talks/2024-phpday-symfony-messenger/

alessandrolai,
@alessandrolai@phpc.social avatar

@rskuipers thank you! Yours was very good too!

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

After lunch, @OndrejMirtes snuck in the #phpday lighting talk session talk to us about @phpstan 1.11 new release, with a couple of interesting new features!

alessandrolai,
@alessandrolai@phpc.social avatar

Error identifiers is a new feature that allows us ignore specific kind of errors instead of using the PHPStan-ignore annotation

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

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