Laravel Idea for PhpStorm - Full-featured IDE for productive artisans!

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.

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
Bacancy logo

Bacancy

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

Bacancy
Lucky Media logo

Lucky Media

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

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
LaraJobs logo

LaraJobs

The official Laravel job board

LaraJobs
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
Supercharge Your SaaS Development with FilamentFlow: The Ultimate Laravel Filament Boilerplate logo

Supercharge Your SaaS Development with FilamentFlow: The Ultimate Laravel Filament Boilerplate

Build your SaaS application in hours. Out-of-the-box multi-tenancy and seamless Stripe integration. Supports subscriptions and one-time purchases, allowing you to focus on building and creating without repetitive setup tasks.

Supercharge Your SaaS Development with FilamentFlow: The Ultimate Laravel Filament Boilerplate
Rector logo

Rector

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

Rector
MongoDB logo

MongoDB

Enhance your PHP applications with the powerful integration of MongoDB and Laravel, empowering developers to build applications with ease and efficiency. Support transactional, search, analytics and mobile use cases while using the familiar Eloquent APIs. Discover how MongoDB's flexible, modern database can transform your Laravel applications.

MongoDB

The latest

View all →
Asymmetric Property Visibility in PHP 8.4 image

Asymmetric Property Visibility in PHP 8.4

Read article
Access Laravel Pulse Data as a JSON API image

Access Laravel Pulse Data as a JSON API

Read article
Laravel Forge adds Statamic Integration image

Laravel Forge adds Statamic Integration

Read article
Transform Data into Type-safe DTOs with this PHP Package image

Transform Data into Type-safe DTOs with this PHP Package

Read article
PHPxWorld - The resurgence of PHP meet-ups with Chris Morrell image

PHPxWorld - The resurgence of PHP meet-ups with Chris Morrell

Read article
Herd Executable Support and Pest 3 Mutation Testing in PhpStorm 2024.3 image

Herd Executable Support and Pest 3 Mutation Testing in PhpStorm 2024.3

Read article