Laravel 8.21, weekly updates, and 🔥 tip

Laravel 8.21

Mostly fixes this week with a new artisan command. So we get a minor version bump to 8.21.0.

  • Add artisan command to clean batches table in #35694
  • Ensure DBAL custom type doesn't exists in #35704
  • Fix artisan db command for the Postgres CLI in #35725
  • Update test stubs to use snake_case naming convention in #35735
  • Fix OPTIONS method when using same path with different domain in #35714
  • Set chain queue when inside a batch in #35746
  • Give a more meaningful message when route parameters are missing in #35706

You may review the full branch diff on GitHub for a complete list of changes.

This minor version bump and update is automated for subscribers to a Shifty Plan. If you don't have one of those, be sure to bump your constraint and run composer update to get the latest features.

Weekly Journal

Last week I continued adding Dusk tests, as well as switching CI to use MySQL instead of SQLite (more on that below). I also tackled a few user reported bugs.

Jess crushed the rest of the "facelift". We're going to revisit the UX of the Shift order flow to give it another pass. As the Shift catalog continues to grow, sometimes it can be confusing which Shift to run. Especially for older projects and new users.

I also took some time to write my annual year in review post. To the goals for Shift, I'm spending the later half of this week using GitHub to organize outstanding issues, as well as create some milestones for the first half of 2021.

This week I hope to finalize the "facelift" and Dusk tests, so I may return to focusing on new features.

🔥 Tip

In the process of switching CI to use MySQL, I ran into a few gotchas.

First, a few tests made assertions based on primary keys. These were predictable when using an in-memory database since it's completely rebuilt (fresh) after each test case. When using an on-disk database, Laravel uses transactions to refresh the database. As such, the auto-increment counter is not rolled back, so the primary keys are no longer predictable.

Second, MySQL auto-formats JSON columns which may produces some false failures in tests. Particularly tests which rely upon direct database comparisons, like assertDatabaseHas.