@rolfdenhartog@phpc.social avatar

rolfdenhartog

@rolfdenhartog@phpc.social

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

michael, to Laravel
@michael@thms.uk avatar

So, it really annoyed me that in Laravel 11 you cannot have multiple listeners for the same event in an array like you could in Laravel 10.

It's not like it's a big deal, as it's simple enough to implement, but just seems like a step backwards.

What do you think?

https://blog.thms.uk/2024/05/event-listeners-laravel-11?utm_source=mastodon

rolfdenhartog,
@rolfdenhartog@phpc.social avatar

@michael Hm. That feels like a step backwards indeed. I don’t like the auto discovery (aka magic) too. A simple config file (config/events.php) would have been nice as a replacement.

doefom, to Laravel
@doefom@mastodon.social avatar

When developing applications I'm always a little afraid of sending emails to actual customers or placing real orders by accident. So I came up with a habit that works super well for me and maybe this will suit you as well.

In my /config/mail.php I add a 'developer' email address and ensure in my AppServiceProvider all emails are sent to this address when in non-production environments no matter what. Makes me build and test stuff way more confidently 😁

Is there a better approach?

rolfdenhartog,
@rolfdenhartog@phpc.social avatar

@doefom Use a mail catcher like https://mailcatcher.me/ ? That saves you writing the code in your example. And all mail will be caught no matter which mail address is used in your mailables.

pierstoval, to random French
@pierstoval@mastodon.social avatar

Laravel folks will literally keep reinventing the wheel and adding glitter on it instead of going to therapy

rolfdenhartog,
@rolfdenhartog@phpc.social avatar

@pierstoval @ocramius As a (mainly Laravel) developer I completely agree with you! This is just some simple DX, which doesn’t add much value. I’ll stick with composer create-project 😄 It’s also the reason why I’m sticking with PHP CS Fixer instead of Pint.

rolfdenhartog,
@rolfdenhartog@phpc.social avatar
rolfdenhartog, to Laravel Dutch
@rolfdenhartog@phpc.social avatar

I was asked to upgrade/update an old (5.3) project to the latest version of laravel and . I’ve already seen the code and let’s say it’s going to be interesting. A lot of customizations 😱 Not calling parent constructors which contain dependencies for example (probably not necessary). And also not even following certain Laravel standards. What did they use of the Laravel framework? Facades and helper functions 😑 (I really don’t like them, just use constructor DI 😉)

rolfdenhartog,
@rolfdenhartog@phpc.social avatar

@Crell Thanks! I’m aware of Laravel Shift 😊 I need permission first obviously. I’ve done several upgrades before on other projects. Shouldn’t be a big challenge/problem 😄

rolfdenhartog, to php Dutch
@rolfdenhartog@phpc.social avatar

Is this a bug in ? When I use 2024-04-01 as date it gives the same result...

rolfdenhartog,
@rolfdenhartog@phpc.social avatar

@heiglandreas That’s unexpected 😅 Will need to do refactor some code then. Thanks!

Ryan Reynolds Reaction GIF

rolfdenhartog,
@rolfdenhartog@phpc.social avatar

@heiglandreas That makes sense. Great explanation! I’ll never forget about this 😂 I’m now using t (the number of days in the current) which is fine.

Thanks a lot! Really appreciated 😊

rolfdenhartog,
@rolfdenhartog@phpc.social avatar

@dusoft @heiglandreas Thanks, but way too heavy for a simple date 'calculation'. Carbon is a complete library with lots of useful functions, but also slows down. And I'm not doing that much with date calculation.

dgoosens, to random
@dgoosens@phpc.social avatar

just discovered an excellent website about

https://ifuckinghatejira.com

rolfdenhartog,
@rolfdenhartog@phpc.social avatar

@dgoosens It can be worse: Azure Boards 😑

We’ve moved to Jira recently and I ‘enjoyed’ it for the first time.

nev, to php
@nev@bananachips.club avatar

opinion: they should change the question marks in the tags to interrobangs

<‽php

‽>

rolfdenhartog,
@rolfdenhartog@phpc.social avatar

@nev Why not an elephant? 😄

<🐘

🐘>

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

Hey devs. I'm curious. When using a global class like SplFileInfo, Exception, Attribute, etc, do you say \Exception inline in the code, or do you use it at the top of the file and then use it as Exception inline?

rolfdenhartog, (edited )
@rolfdenhartog@phpc.social avatar

@Crell @phpfig It depends. I’m not in the use group ;) I’m in the \Exception group. But with such a difference it wouldn’t make sense to standardize it for now.

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