@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.
When developing #Laravel 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 😁
@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@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.
I was asked to upgrade/update an old #laravel (5.3) project to the latest version of laravel and #php. 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 😉)
@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 😄
@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.
Hey #PHP 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?
@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.