Laravel 8.68 Released

Published on by

Laravel 8.68 Released image

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
Tinkerwell

Version 4 of Tinkerwell is available now. Get the most popular PHP scratchpad with all its new features and simplify your development workflow today.

Visit Tinkerwell
Laravel Forge logo

Laravel Forge

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

Laravel Forge
Tinkerwell logo

Tinkerwell

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

Tinkerwell
No Compromises logo

No Compromises

Joel and Aaron, the two seasoned devs from the No Compromises podcast, are now available to hire for your Laravel project. ⬧ Flat rate of $7500/mo. ⬧ No lengthy sales process. ⬧ No contracts. ⬧ 100% money back guarantee.

No Compromises
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
LoadForge logo

LoadForge

Easy, affordable load testing and stress tests for websites, APIs and databases.

LoadForge
Paragraph logo

Paragraph

Manage your Laravel app as if it was a CMS – edit any text on any page or in any email without touching Blade or language files.

Paragraph
Lucky Media logo

Lucky Media

Bespoke software solutions built for your business. We ♥ Laravel

Lucky Media
Lunar: Laravel E-Commerce logo

Lunar: Laravel E-Commerce

E-Commerce for Laravel. An open-source package that brings the power of modern headless e-commerce functionality to Laravel.

Lunar: Laravel E-Commerce
Bacancy - Staff Augmentation logo

Bacancy - Staff Augmentation

Leave your web app development hustles to the leading IT Staff Augmentation Service Providers. Choose from an extensive pool of 1050+ developers and give yourself the sigh of success you deserve with Bacancy. Get In Touch Today!

Bacancy - Staff Augmentation
DocuWriter.ai logo

DocuWriter.ai

Save hours of manually writing Code Documentation, Comments & DocBlocks, Test suites and Refactoring.

DocuWriter.ai
Rector logo

Rector

Your partner for seamless Laravel upgrades, cutting costs, and accelerating innovation for successful companies

Rector

The latest

View all →
October CMS v3.6 Ships Today, Full of New Features image

October CMS v3.6 Ships Today, Full of New Features

Read article
Laracon EU Videos are now out image

Laracon EU Videos are now out

Read article
Use Google's Gemini AI in Laravel image

Use Google's Gemini AI in Laravel

Read article
PhpStorm is getting a brand new terminal image

PhpStorm is getting a brand new terminal

Read article
Six Essential Plugins for Visual Studio Code image

Six Essential Plugins for Visual Studio Code

Read article
Modularize Your Laravel Application With the Modular Package image

Modularize Your Laravel Application With the Modular Package

Read article