@jclermont@phpc.social
@jclermont@phpc.social avatar

jclermont

@jclermont@phpc.social

Organizer of Milwaukee PHP. Co-host of No Compromises #podcast. Helping #PHP and #Laravel developers level up their skills.

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

jclermont, to php
@jclermont@phpc.social avatar

How do you test code you don't understand? We deal with this when joining legacy projects, but I recently found a novel solution involving fuzz testing. Super useful! https://masteringlaravel.io/daily/2024-05-31-how-do-you-test-code-you-dont-understand

jclermont, to php
@jclermont@phpc.social avatar
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. #php #laravel https://masteringlaravel.io/daily/2024-05-27-dont-use-the-config-helper-in-a-config-file

jclermont,
@jclermont@phpc.social avatar

@sarah Perhaps, but in practice the global function calling the app container has never caused any problems for me. And you definitely could inject the config repository where needed, it's just not conventional Laravel. I prefer sticking with conventions.

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. #php #laravel 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? #php #laravel https://masteringlaravel.io/daily/2024-05-20-how-do-you-discover-interesting-new-packages

jclermont,
@jclermont@phpc.social avatar

@grmpyprogrammer this is some 4-d chess right here 😂

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

jclermont, to php
@jclermont@phpc.social avatar
jclermont, to php
@jclermont@phpc.social avatar

Yes, I'm a bit of a PHPStorm fan boy. Here's another handy use for the Local History feature. #php #laravel https://masteringlaravel.io/daily/2024-05-02-another-helpful-use-for-local-history

jclermont, to php
@jclermont@phpc.social avatar

Fresh off php tek last week, I'm reminded that conferences are so much more than just the talks. #php #laravel https://masteringlaravel.io/daily/2024-05-01-conferences-are-more-than-just-talks

sarah, to random
@sarah@phpc.social avatar

How do people locate and remove dead code from their projects in PHP these days?

jclermont,
@jclermont@phpc.social avatar

@sarah Rector with the dead code set is a great first pass.

jclermont, to php
@jclermont@phpc.social avatar

You might need to do this a lot, but here is an explanation how to step debug a queued job. #php #laravel https://masteringlaravel.io/daily/2024-03-20-how-to-step-debug-a-queued-job

jclermont, to php
@jclermont@phpc.social avatar

Ever import a big sql dump and feel impatient wondering how much time was left? Here's an easy way to monitor progress. #php #laravel https://masteringlaravel.io/daily/2024-03-18-monitoring-progress-of-a-big-database-import

jclermont,
@jclermont@phpc.social avatar

@ramsey Oh man, now I'm ruined too. Thanks!

jclermont, to php
@jclermont@phpc.social avatar

Why I always add a primary key to many-to-many tables, even when Laravel doesn't require it. #php #laravel https://masteringlaravel.io/daily/2024-03-12-why-i-always-add-a-primary-key-to-many-to-many-tables

jclermont, to php
@jclermont@phpc.social avatar

What is the point of design patterns? And can we discuss this without putting you to sleep? Check out the latest episode of the No Compromises podcast. https://masteringlaravel.io/daily/2024-02-29-laravel-podcast-what-is-the-point-of-design-patterns

jclermont, to php
@jclermont@phpc.social avatar

I really enjoy consistency and patterns in my code. Here is my approach to organizing test methods within a Laravel feature test. #php #laravel https://masteringlaravel.io/daily/2024-02-21-consistent-test-organization

grmpyprogrammer, to Laravel
@grmpyprogrammer@phpc.social avatar

For folks who are using Pest for tests — what is the equivalent of using the RefreshDatabase and TestDatabase traits?

jclermont,
@jclermont@phpc.social avatar

@grmpyprogrammer I still use PHPUnit, but in Pest there's a uses global function for configuring the base test class and traits

Something like: uses(TestCase::class, RefreshDatabase::class)->in('Feature');

jclermont, to php
@jclermont@phpc.social avatar

Laravel recently added a password validation rule to more easily enforce a maximum length. Why would you ever want to limit the length of a password? Here's an explanation how it actually improves security. https://masteringlaravel.io/daily/2024-02-05-why-does-laravel-offer-a-max-password-length-validation-rule

jclermont,
@jclermont@phpc.social avatar

@heiglandreas That's a fair point, and the default max being discussed is 72 (due to bcrypt internals), so it would not violate the NIST recommendation.

jclermont, to php
@jclermont@phpc.social avatar

If you're using Valet's cool "isolate" feature along with Composer scripts, here's something to be aware of to make sure the right version of PHP is getting used. #php #laravel https://masteringlaravel.io/daily/2024-02-02-composer-scripts-and-valet-isolate

jclermont, to php
@jclermont@phpc.social avatar

Here are some considerations if you need to clean up a big table, without taking production down or even making it slow. #php #laravel https://masteringlaravel.io/daily/2024-01-24-considerations-when-cleaning-up-a-big-table

jclermont, to php
@jclermont@phpc.social avatar

Stop using $request->get(), there is a better way! #php #laravel https://masteringlaravel.io/daily/2024-01-12-stop-using-request-get

jclermont, to php
@jclermont@phpc.social avatar

I love how Laravel always has your back. Here's a super simple way to use factories with more than one relationship. #php #laravel https://masteringlaravel.io/daily/2024-01-01-using-factories-with-more-than-one-relationship

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