Crell, to Java
@Crell@phpc.social avatar

Oh. My. Fucking. God.

I have just learned that " Bean" has two completely different and incompatible definitions.

One is a dumb, badly designed data object with getters and setters.

The other is... a service object managed by the Spring framework IoC container.

Holy hell. This is 10x worse than "facades."

Am I wrong here? This is what I'm finding from online tutorials. Is there more nuance that is not coming through, because for now I just hate even more.

jclermont, to php
@jclermont@phpc.social avatar

It's best practice to always use the config helper in our application code, except for one place: Don't use the config helper in config files.

Here's an explanation as to why. https://masteringlaravel.io/daily/2024-05-27-dont-use-the-config-helper-in-a-config-file

tjventurini, to Laravel
@tjventurini@mastodon.social avatar

Hi 👋 I'm looking to with people who are interest in

🌐 Web Development
🎨 Web Design
🧑‍💻
🧰
👀
💼

doefom, to Laravel
@doefom@mastodon.social avatar

Macros are one thing I enjoy using the most in #Laravel. It's a way to extend the functionality of many built-in #Facades by providing custom callbacks for a specific key.

One production example I use macros for fairly often is what I call the "admin alert". Especially in smaller applications I want to get notified whenever an error or an event occurs the admin (mostly that's me) should know about.

Here's what this might look like.

#webdev #webdevelopment

emd, to Laravel
@emd@cosocial.ca avatar

What am I missing folks, you can't have multiple listeners (in an array) in v11?

https://laracasts.com/discuss/channels/laravel/laravel-11-register-event-with-multiple-listeners

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

doefom, to Software German
@doefom@mastodon.social avatar

What’s the best piece of you use in your daily work as a developer?

doefom, to Laravel
@doefom@mastodon.social avatar

Using global query scopes for simple one-to-many tenancy.

Code example of a cat pension app I've started and never finished. It's structured like this:

  • A user belongs to a pension
  • A pension has many clients
  • A client has many animals

Users (cat pension owners and their employees) can only view clients and animals from the same pension. Global query scopes ensure this rule is consistently applied throughout the app without accidentally forgetting it somewhere in your code.

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?

tvbeek,
@tvbeek@phpc.social avatar

@doefom that is why I wrote mail catchall.

It will replace the receiver and will optional add all the original receivers (to, cc, bcc) to the content of the email. That makes it useful for an acceptance environment to verify who would normally receive the email.

https://packagist.org/packages/tjvb/laravel-mail-catchall

marmelab, to php
@marmelab@mastodon.social avatar

🎉 Exciting news! Marmelab is sponsoring the API Platform Conference 2024, the flagship event dedicated to the API Platform framework!

Join us for 2 days of talks by leading experts in #PHP, #JavaScript & #API.

📅 19 & 20 September
📍 Lille, France

Learn more: https://api-platform.com/fr/con/2024/

@cooptilleuls

#APIPlatformCon2024 #TechConference #React #Laravel #Caddy #Xdebug #Symfony #APIPlatform

jclermont, to php
@jclermont@phpc.social avatar

Ever run into a timeout from a Composer script in CI? Test coverage reports are a super common example for me.

Here's how to prevent that, along with a gotcha if you're calling scripts within scripts. https://masteringlaravel.io/daily/2024-05-21-disabling-composer-timeout-with-nested-scripts

jclermont, to php
@jclermont@phpc.social avatar

How do you discover interesting new packages for your Laravel apps? https://masteringlaravel.io/daily/2024-05-20-how-do-you-discover-interesting-new-packages

doefom, to php
@doefom@mastodon.social avatar

8.4 is introducing newing up a class and accessing methods, properties, etc. on it without wrapping it in parentheses first. Another useful feature I will probably use on a daily basis. In my daily work with I often need to crawl some content from a website or an API. This feature will make my code a little less cluttered.

Here is the RFC if you want to learn more about it: https://wiki.php.net/rfc/new_without_parentheses

Crell, to php
@Crell@phpc.social avatar

Please, web app developers, consider how your users will upgrade. If your upgrade process is "remove the old one, unzip the new one", then it's not an upgrade process. It's an encouragement to never upgrade.

symfonystation, to php
@symfonystation@newsletter.mobileatom.net avatar
j3j5, to php
@j3j5@hachyderm.io avatar

Does anybody on the fedi Laravel community knows Aaron Francis? It's really sad that his (awesome) fast-paginate package seems abandoned like this, maybe just a statement acknowledging he can't/doesn't want to maintain it anymore can make the community fork it to keep it maintained. This L11 support PR has been opened and unanswered for 2 months already.

https://github.com/hammerstonedev/fast-paginate/pull/58

edorian, to php
@edorian@phpc.social avatar

Back from vacation and excited to announce that we, over at , now fully support

https://www.linkedin.com/posts/tideways-gmbh_frankenphp-activity-7191031503009587202-qUFj

It's great to see the ecosystem grow and prosper and I believe proper tool support and performance insights will only help when it comes to choosing the right tool for your job.

It's been a bit of a struggle getting everything to work for me, but thanks to our C specialists all the test scenarios I wrote along the way are now passing, including

jclermont, to php
@jclermont@phpc.social avatar

Here's a quick write-up of why I avoid logic inside my tests #php #laravel https://masteringlaravel.io/daily/2024-05-14-avoid-logic-inside-your-test

valorin, to Laravel
@valorin@phpc.social avatar

It's incredibly common to find hardcoded domains used for identifying admins, however this also makes it trivial to escalate privileges to admin! 😈

https://securinglaravel.com/security-tip-privilege-escalation-through-domain-wildcards/

peach, to Laravel
@peach@phpc.social avatar

Having a lot of fun with orchestra/testbench for . Took a little bit to get my head around it but getting there.

markusstaab, (edited ) to Laravel German
@markusstaab@phpc.social avatar

Today I collaborated with ondrey on a fix for which improves a previous performance fix, which caused perf regressions in a edge-case.

The new fix allows a 2-3 seconds instead of 2-3 minutes analysis in all mentioned cases.

Reported issue was https://github.com/phpstan/phpstan/issues/10979

simonhamp, to Laravel
@simonhamp@phpc.social avatar

If anyone out there is looking to hire developers, I would love to help you find the perfect match

Send me a private message

kaiserkiwi, to Laravel
@kaiserkiwi@corteximplant.com avatar

That made me chuckle :D

denniskoch, to Laravel
@denniskoch@phpc.social avatar

If you are using #Laravel #Herd and experiencing issues with Xdebug not recognizing the correct domain: Go to herd.conf and swap fastcgi_param SERVER_NAME $server_name; with fastcgi_param SERVER_NAME $host;

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