Tinkerwell - The PHP Scratchpad

Laravel 8.68 Released

Published on by

Laravel 8.68 Released image

Never Miss a Laravel Release 🚀

Sign up and get an email with each new Laravel release

The Laravel team released 8.68 with new TestResponse dd() methods, more PHP 8.1 fixes, a "has any" JSON assertion and the latest changes in the v8.x branch.

This post covers three minor Laravel releases: v8.68, v8.67, and v8.66. Usually Laravel has a minor release each week, but this week we have three minor releases. Check the changelog for a complete list of changes.

PHP 8.1 Support (v8.67)

Dries Vints contributed more PHP 8.1 fixes in preparation for next month's GA release:

  • Remove mimicking PHP 8.0 now that we're nearing the PHP 8.1 release date
  • Add prefer-lowest builds
  • Add a separate build step for minimum versions for Symfony, PHPUnit & CommonMark we cannot bump these through Composer
  • Bumps some libraries for PHP 8.1 compatibility
  • Added more clearer message for skipped mail tests on PHP 8.1 since SwiftMailer won't be patched for it
  • Unskipped PHP 8.1 tests

Add Dump Methods to TestResponse (v8.68)

Nuno Maduro contributed three new methods to the TestResponse class, including dd(), ddHeaders(), and ddSession():

$response = $this->get('/example');
 
// Dump response
$response->dd();
 
// Or Headers
$response->ddHeaders();
 
// Or Session
$response->ddSession(keys: $keys);

Database Schema Restrict on Update (v8.68)

Melek REBAI contributed a restrictOnUpdate() migration method, which is syntactic sugar for:

// Using `onUpdate` directly
$table->onUpdate('restrict');
 
// New convenience method
$table->restrictOnUpdate();

JSON Assertion for "has any" (v8.66)

@Džuris contributed a hasAny method to assertable JSON, which asserts that at least one of the given properties exists:

$json->hasAny('data', 'errors', 'meta');

Array isList() Method (v8.66)

Chris Kankiewicz contributed an Arr::isList() method for determining if an array is a list. An array is considered a "list" if all keys are sequential integers starting with zero without gaps in between. Check out Pull Request #39277 for discussion on this method and upcoming PHP support starting in v8.1 with PHP's array_is_list function.

Release Notes

You can see the complete list of new features and updates below and the diff between 8.64.0 and 8.65.0 on GitHub. The following release notes are directly from the changelog:

v8.68.0

Added

  • Added ThrottleRequestsWithRedis to $middlewarePriority (#39316)
  • Added Illuminate/Database/Schema/ForeignKeyDefinition::restrictOnUpdate() (#39350)
  • Added ext-bcmath as an extension suggestion to the composer.json (#39360)
  • Added TestResponse::dd (#39359)

Fixed

  • TaggedCache flush should also remove tags from cache (#39299)
  • Fixed model serialization on anonymous components (#39319)

Changed

  • Changed to Guess database factory model by default (#39310)

v8.67.0

Added

  • Added support for MariaDB to skip locked rows with the database queue driver (#39311)
  • Added PHP 8.1 Support (#39034)

Fixed

  • Fixed translation bug (#39298)
  • Fixed Illuminate/Database/DetectsConcurrencyErrors::causedByConcurrencyError() when code is intager (#39280)
  • Fixed unique bug in Bus (#39302)

Changed

  • Only select related columns by default in CanBeOneOfMany::ofMany (#39307)

v8.66.0

Added

  • Added withoutDeprecationHandling to testing (#39261)
  • Added method for on-demand log creation (#39273)
  • Added dateTime to columns that don't need character options (#39269)
  • Added AssertableJson::hasAny (#39265)
  • Added Arr::isList() method (#39277)
  • Apply withoutGlobalScope in CanBeOneOfMany subqueries (#39295)
  • Added Illuminate/Support/Testing/Fakes/BusFake::assertNothingDispatched() (#39286)

Reverted

Paul Redmond photo

Staff writer at Laravel News. Full stack web developer and author.

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.

image
Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Visit Laravel Cloud
Curotec logo

Curotec

World class Laravel experts with GenAI dev skills. LATAM-based, embedded engineers that ship fast, communicate clearly, and elevate your product. No bloat, no BS.

Curotec
Bacancy logo

Bacancy

Supercharge your project with a seasoned Laravel developer with 4-6 years of experience for just $3200/month. Get 160 hours of dedicated expertise & a risk-free 15-day trial. Schedule a call now!

Bacancy
Tinkerwell logo

Tinkerwell

The must-have code runner for Laravel developers. Tinker with AI, autocompletion and instant feedback on local and production environments.

Tinkerwell
Get expert guidance in a few days with a Laravel code review logo

Get expert guidance in a few days with a Laravel code review

Expert code review! Get clear, practical feedback from two Laravel devs with 10+ years of experience helping teams build better apps.

Get expert guidance in a few days with a Laravel code review
PhpStorm logo

PhpStorm

The go-to PHP IDE with extensive out-of-the-box support for Laravel and its ecosystem.

PhpStorm
Laravel Cloud logo

Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Laravel Cloud
Kirschbaum logo

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum
Shift logo

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift
Harpoon: Next generation time tracking and invoicing logo

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing
Lucky Media logo

Lucky Media

Get Lucky Now - the ideal choice for Laravel Development, with over a decade of experience!

Lucky Media
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a Multi-tenant Laravel SaaS Starter Kit that comes with all features required to run a modern SaaS. Payments, Beautiful Checkout, Admin Panel, User dashboard, Auth, Ready Components, Stats, Blog, Docs and more.

SaaSykit: Laravel SaaS Starter Kit

The latest

View all →
Clawdbot Rebrands to Moltbot After Trademark Request From Anthropic image

Clawdbot Rebrands to Moltbot After Trademark Request From Anthropic

Read article
Automate Laravel Herd Worktrees with This Claude Code Skill image

Automate Laravel Herd Worktrees with This Claude Code Skill

Read article
Laravel Boost v2.0 Released with Skills Support image

Laravel Boost v2.0 Released with Skills Support

Read article
Laravel Debugbar v4.0.0 is released image

Laravel Debugbar v4.0.0 is released

Read article
Radiance: Generate Deterministic Mesh Gradient Avatars in PHP image

Radiance: Generate Deterministic Mesh Gradient Avatars in PHP

Read article
Speeding Up Laravel News With Cloudflare image

Speeding Up Laravel News With Cloudflare

Read article