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
@chris that would be so 🔥
@kaiserkiwi Chris is a smart person! I think it's kinda a killer feature - as far as documentation related "killer features" go haha
@chris I think I love it.

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

@ramsey this is where it all started: https://phpc.social/@timacdonald/109962180420910763

Although the design has changed substantially since then. All still very much a spike so but hacky in parts - but coming together slowly.

Tim MacDonald (@[email protected])

Attached: 2 images 🔨 Hacking on a side project...

PHP Community on Mastodon