Laravel 5.7.12 Released
Published on by Paul Redmond
The latest Laravel 5.7 release, 5.7.12, is here with new additions, changes, and bugfixes:
First, the CacheManager
class has a new forgetDriver()
method that allows you to drop a connection already opened by the cache manager. This feature allows you to force a connection to reconnect or you change config options and want to create the connection again.
You can now get HTTP route middleware groups with a new getMiddlewareGroups()
method.
According to the pull request:
This getter allows to create tests for the route middleware groups, which is currently not possible because the property is protected.
For example, if you want to ensure that the web group is using a middleware to track utm campaigns, with this getter you can write:
/** @test */public function it_registers_the_track_utm_middleware_in_the_web_group(){ $groups = resolve(\App\Http\Kernel::class)->getMiddlewareGroups(); $this->assertContains(\App\Http\Middleware\TrackUTM::class, $groups['web']);}
The last new addition to the framework is a new SQLite configuration option foreign_key_constraints
, which you can use the enable/disable foreign key constraints.
You can see the full diff between 5.7.11 and 5.7.12 on GitHub, and the full release notes below from the 5.7 changelog.
I would also like to point out that Tetiana Blindaruk has been organizing the 5.7 changelog and publishing release announcements on Laravel Announcements.
Thanks for your contributions, Tetiana!
Release Notes for 5.7.x
v5.7.12
Added
- Added
CacheManager::forgetDriver
method (#26264, fd9ef49) - Added
Illuminate\Foundation\Http\Kernel::getMiddlewareGroups
method (#26268) - Added an sqlite config option (
foreign_key_constraints
) to enable / disable foreign key constraints (#26298, 674f8be, #26306)
Fixed
- Checked
$absolute
parameter inUrlGenerator::signedRoute
(#26265) - Fixed error in resource building after running
php artisan preset none
command (41becda, #26244) - Fixed
whereDoesntHave()
anddoesntHave()
with nested relationships (#26228) - Fixed filesystem locking hangs in
PackageManifest::build()
(#26254)
Changed
- Made expectation closure optional for
InteractsWithContainer::mock
andInteractsWithContainer::spy
(#26242) - Allowed multiple
createPayloadCallback
on queues (#26250, 6e3d568) - Changed wording on default 403 view (#26258)
- Bump
vue.js
to^2.5.17
inartisan preset vue
command (89f56bf, #26244) - Allowed adding additional
$manyMethods
when extending the model class (#26307)