PHP DevelopmentLaravel 6.15.1 NEW Release by Laravel team Feb 2020 | Arkss Tech

The Laravel team released v6.15.1 this week to patch an issue with appending rows to artisan tables. In addition to the patch, new whereNull() and whereNotNull() methods were added to the collection class and a new MockStream class was added to the testing foundation:

Laravel developer

New Collection Methods

WANT TO BUILD YOUR BUSINESS APP IN LARAVEL FRAMEWORKARKSSTECH, AGILE SOFTWARE DEVELOPMENT COMPANY OFFERS EXPERIENCED LARAVEL APP DEVELOPERS & TO HIRE LARAVEL DEVELOPERS FOR STARTUPS AND SMES. RENT A CODER TODAY!!

Sjors Ottjes contributed a whereNull() and whereNotNull()method to the collections class. He outlined some examples in the pull request:

// Already available when building a query 
$users = User::whereNotNull('email_verified_at')->get(); 

// But when you have a collection you have to do the this instead: $users = User::all(); $unverifiedUsers = $users->whereStrict('is_verified_at', null); $verifiedUsers = $users->where('is_verified_at', '!==', null);


With this PR you can now do the following:
$users = User::all();


$unverifiedUsers = $users->whereNull('is_verified_at');


$verifiedUsers = $users->whereNotNull('is_verified_at');

Adam Prickett contributed a new MockStream class to the testing foundation that you can see used in the follow test example:

 

MockStream::register($mock); 

$stream = fopen('mock://stream', 'r+'); 

$consoleOutputSections = []; 

$mock->shouldReceive('section') ->andReturn(new ConsoleSectionOutput( $stream, $consoleOutputSections, Output::VERBOSITY_NORMAL, false, new OutputFormatter) ); 

// ... MockStream::restore();

Check out PR #31447 for further details.You can see the full list of new features and updates below and the whole diff between 6.15.0 and 6.15.1 on GitHub. The full release notes for Laravel 6.0 are available in the latest v6 changelog:

Laravel developer

WANT TO BUILD YOUR BUSINESS APP IN LARAVEL FRAMEWORKARKSSTECH, AGILE SOFTWARE DEVELOPMENT COMPANY OFFERS EXPERIENCED LARAVEL APP DEVELOPERS & TO HIRE LARAVEL DEVELOPERS FOR STARTUPS AND SMES. RENT A CODER TODAY!!

LARAVEL FRAMEWORK v6.15.1

Added

  • Added whereNull and whereNotNull to Collection(#31425)
  • Added Illuminate\Foundation\Testing\MockStreamclass (#31447)

Fixed

  • Fixed event:list command for shows non-registered events (#31444)
  • Fixed postgres grammar for nested json arrays with (#31448, b3d0da1)
WANT TO BUILD YOUR BUSINESS APP IN LARAVEL FRAMEWORKARKSSTECH, AGILE SOFTWARE DEVELOPMENT COMPANY OFFERS EXPERIENCED LARAVEL APP DEVELOPERS & TO HIRE LARAVEL DEVELOPERS FOR STARTUPS AND SMES. RENT A CODER TODAY!!

Leave a Reply

Your email address will not be published.

×

Hello!

Chat on WhatsApp or send us an email to team@arksstech.com

× How can I help you?