@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

Here's a quick write-up of why I avoid logic inside my tests 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. 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. 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. 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. 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. 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. 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. 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. 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! 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. https://masteringlaravel.io/daily/2024-01-01-using-factories-with-more-than-one-relationship

jclermont, to php
@jclermont@phpc.social avatar

Here's a fun gotcha I discovered the hard way: Routes can resolve differently depending on whether you've cached them or not. https://masteringlaravel.io/daily/2023-12-28-routes-resolve-differently-when-cached

jclermont,
@jclermont@phpc.social avatar

@sarah Every programming decision has trade-offs. I find Laravel to be overwhelmingly positive, despite not being perfect. And in this case, I was doing something dumb, so I'll cut the framework some slack.

jclermont, to php
@jclermont@phpc.social avatar

Here's why we like to cache routes and views in CI, just like we do in production. It brings benefits other than performance. https://masteringlaravel.io/daily/2023-12-27-the-benefits-of-caching-in-ci

jclermont,
@jclermont@phpc.social avatar

@tvbeek do you run your tests in CI after caching config? I’m still digging into the particulars, but our tests fail with a cached config.

jclermont,
@jclermont@phpc.social avatar

@tvbeek got it, that makes sense. So it’s a smoke test that the command runs, you’re not trying to run your tests with the cached environment (though I do recommend running tests with routes cached, I’ll share a bug story tomorrow as to why)

jclermont,
@jclermont@phpc.social avatar
ian, to random
@ian@phpc.social avatar

Conference ticket and hotel for @phptek 2024 have been booked. Just attending this time rather than speaking like I did in 2023...and 2016, my first time speaking at a PHP conference.

Thinking back, this will be the first PHP conf for which I have nothing special on my badge (speaker or organizer) since SunshinePHP 2020 (and before that php[world] and JestPHP in 2019). I've attended other confs recently (five this year, in fact), just not PHP ones.

Nature is healing???

jclermont,
@jclermont@phpc.social avatar

@ian @phptek See you there!

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