Tim MacDonald

192 Followers
37 Following
26 Posts
Core developer at Laravel. Learning, crafting, and sharing.
Bloghttps://timacdonald.me
Twitterhttps://twitter.com/timacdonald87
Single-use Tests by Tim MacDonald

Tests I write are usually written in Pest or Jest. I also usually commit them to a code repository - but not all automated tests should be committed. I wrote, what I consider to be an automated test, that was a single-use test. It served it's purpose and it'll forever be in my heart, but not in my repository.

Tim MacDonald

✍️ New blog post: Single-use Tests

Not all automated tests should be committed. My test served its purpose and will forever be in my heart, but not in my repository.

tl;dr; How I used `php artisan route:list` to write a single-use test for a refactor.

https://timacdonald.me/single-use-tests/

Single-use Tests by Tim MacDonald

Tests I write are usually written in Pest or Jest. I also usually commit them to a code repository - but not all automated tests should be committed. I wrote, what I consider to be an automated test, that was a single-use test. It served it's purpose and it'll forever be in my heart, but not in my repository.

Tim MacDonald

How do we feel about pulling the "See Also" section into the top right of the page? It's precious real estate, but I'm often looking for something related to the current page.

Shout out to @chris for the idea…

✍️ Fast database queries are not always better

You probably think fast database queries are good.

You also probably think slow database queries are bad.

But are they? I promise answers, Laravel tips, and typos.

https://timacdonald.me/fast-database-queries-are-not-always-better/

Fast database queries are not always better by Tim MacDonald

You probably think fast database queries are good. You also probably think slow database queries are bad. On top of all of these "thinks" you have about database queries - there is a certain Laravel method that, if you’ve seen it, you probably think you understand…but there is a chance you don’t.

Tim MacDonald

🐘 + ☕️ = The next PHP Melbourne meetup has been scheduled.

Come and hangout with the Melbourne PHP community, enjoy some talks, and hopefully learn a few things about full-stack development from the PHP perspective.

I’ll be there, for sure!

https://www.meetup.com/melbourne-php-users-group/events/293165301

PHP Melbourne May 2023, Thu, May 25, 2023, 6:30 PM | Meetup

**Announcing PHP Melbourne's May 2023 meetup.** Come and hangout with the Melbourne PHP community, enjoy some talks, and hopefully learn a few things about full-stack deve

Meetup
[10.x] Siesta by timacdonald · Pull Request #46904 · laravel/framework

This PR proposes a new utility class that wraps up the native sleep and usleep PHP functions into a "fakeable" and testable class. The motivation behind this PR is to improve testing of sleeping an...

GitHub
Next meaningful milestone I’m working on for my PHP docs revamp: a fresh search experience, likely powered by Meilisearch.

My docs generator now consolidates all the PHP documentation menus into one single sidebar menu system.

Not seen in the video: it also filters out empty pages, such as “Introduction”, to make sure you only ever land on pages with content.

🔨 Hacking on a side project...