Laravel 9, tutorials, What’s New features in Laravel 9

0 157

Laravel 9, What’s New features in Laravel 9

What is Laravel ?

Laravel is a free, open-source PHP web framework, created by Taylor Otwell and intended for the development of web applications following the model–view–controller (MVC) architectural pattern and based on Symfony. Some of the features of Laravel are a modular packaging system with a dedicated dependency manager, different ways for accessing relational databases, utilities that aid in application deployment and maintenance, and its orientation toward syntactic sugar.

Laravel is an open-source PHP web application framework known for its elegant syntax. It’s an MVC framework for building simple to complex web applications using the PHP programming language, and it strictly follows the MVC (model–view–controller) architectural pattern.

The source code of Laravel is hosted on GitHub and licensed under the terms of MIT License.

Laravel Philosophy

Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as authentication, routing, sessions, and caching.

Laravel versions

Version - Release -  Bug Fixes - Until  - Security Fixes  -Until
5.0       February 4th, 2015 August 4th, 2015 February 4th, 2016
5.1       (LTS) June 9th, 2015 June 9th, 2017 June 9th, 2018
5.2       December 21st, 2015 June 21st, 2016 December 21st, 2016
5.3       August 23rd, 2016 February 23rd, 2017 August 23rd, 2017
5.4      January 24th, 2017 July 24th, 2017 January 24th, 2018
5.5     (LTS) August 30th, 2017 August 30th, 2019 August 30th, 2020
5.6      February 7th, 2018 August 7th, 2018 February 7th, 2019
5.7      September 4th, 2018 March 4th, 2019 September 4th, 2019
5.8      February 26th, 2019 August 26th, 2019 February 26th, 2020

 

What To Expect With Laravel 9

Scheduled to be released by September 2021, Laravel 9 has been pushed to January 2022, making it the first long-term support (LTS) release to be introduced following the 12-month release cycle. This delay results from many reasons, which include but are not limited to the following:

Laravel uses varieties of community-driven projects and about nine Symfony libraries. However, Symfony is planning the release of version 6.0 by November 2021. The delay will allow the Laravel team to incorporate this new version of Symfony as part of Laravel 9.
The delay will afford the team time to monitor how Laravel interacts with the new version of Symfony for two months. It also gives them room to correct any breaking changes or bugs.
Lastly, delaying the release of Laravel 9 better positions the Laravel team for yearly future releases. It will give the team two months of additional ramp-up time after Symfony’s releases.

For these reasons, you can see that the delay in its release is worth the wait.

Laravel 9 release date:

Laravel v9 will be another LTS form of Laravel, and it’ll be coming out at some point in early January 25th, 2022. In this post, we wanted to describe all the modern highlights and changes announced so far.

Laravel 9 Release Date Changes

Laravel v9 was planned to be released around September 2021, but the Laravel Crew chose to thrust this release back to January 25th, 2022.

Laravel utilizes an assortment of community-driven packages as well as nine Symfony components for several highlights inside the framework. Symfony 6.0 is due for release in November. For that reason, we are deciding to hold the Laravel 9.0 release until January 2022. By postponing the release, we will update our basic Symfony components to Symfony 6.0 without being constrained to hold up until September 2022 to perform this update.

PHP 8 is the minimum version in Laravel 9

Since Laravel 9 will need Symfony 6.0 and it incorporates a least prerequisite of PHP 8 which means Laravel 9 will carry this same confinement.

New Design for routes:list

The routes:list command has been included in Laravel for a long time now, and one issue that some times arise is if you have a huge and complex routes defined it can get messy trying to view them in the console. Thanks to a pull request from Nuno Maduro this is getting a makeover.

New Test Coverage Option

A new artisan test –coverage option will display the test coverage directly on the terminal. It also includes a –min option that you can use to indicate the minimum threshold enforcement for test coverage.

From SwiftMailer to Symfony Mailer

Symfony deprecated SwiftMailer and Laravel 9 makes the change to use Symfony Mailer for all the mail transports. This does open up a few breaking changes and you can review the PR for all the details. The Laravel 9 upgrade guide will include instructions once it’s officially released.

New Query Builder Interface

Appreciations to Chris Morrell, Laravel 9 will highlight a new Query Builder Interface, and you can view this merged PR for all the details.

For developers who depend on sort insights for static analysis, refactoring, or code completion in their IDE, the need for a shared interface or legacy between Query\Builder, Eloquent\Builder, and Eloquent\Relation can be much complex.

This highlight adds a new Illuminate\Contracts\Database\QueryBuilder interface and an Illuminate\Database\Eloquent\Concerns\DecoratesQueryBuilder trait that implements the interface in point of the existing __call implementation.

 

<?php

return Model::query()
        ->whereNotExists(function($query) {
                // $query is a Query\Builder
        })
        ->whereHas('relation', function($query) {
                // $query is an Eloquent\Builder
        })
        ->with('relation', function($query) {
                // $query is an Eloquent\Relation
        });

 

PHP 8 String Functions

Since PHP 8 will be the least, Tom Schlick acknowledged a PR to move to using str_contains(), str_starts_with() and str_ends_with() functions internally in the \Illuminate\Support\Str class.

The server.php file can be removed

A minor feature but you can now remove the server.php file from your project and it will be included inside the framework. This file is only used for php artisan serve.

Anonymous Stub Migration

Laravel sets to make anonymous stub migration the default behavior when you run the popular migration command:

php artisan make:migration

The anonymous stub migration feature was first released in Laravel 8.37 to solve this Github issue. The issue is that multiple migrations with the same class name can cause problems when trying to recreate the database from scratch. The new stub migration feature eliminates migration class name collisions.

From Laravel 8.37, the framework now supports anonymous class migration files, and in Laravel 9, it will be the default behavior.

 

<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration {
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('users', function (Blueprint $table)
        {
            $table->string('first_name')->nullable();
        });
    }
};

And More

Laravel v9 is still in active development and will introduce more future improvements and features that we have not listed yet in this article. Laravel v9 will most definitely come with lots of significant changes, bug fixes, features, and of course, many breaking changes.

Do well to subscribe to our newsletter to stay ahead.

 

What To Expect With Laravel 9

Scheduled to be released by September 2021, Laravel 9 has been pushed to January 2022, making it the first long-term support (LTS) release to be introduced following the 12-month release cycle. This delay results from many reasons, which include but are not limited to the following:

Laravel uses varieties of community-driven projects and about nine Symfony libraries. However, Symfony is planning the release of version 6.0 by November 2021. The delay will allow the Laravel team to incorporate this new version of Symfony as part of Laravel 9.
The delay will afford the team time to monitor how Laravel interacts with the new version of Symfony for two months. It also gives them room to correct any breaking changes or bugs.
Lastly, delaying the release of Laravel 9 better positions the Laravel team for yearly future releases. It will give the team two months of additional ramp-up time after Symfony’s releases.

For these reasons, you can see that the delay in its release is worth the wait.

Conclusion

This article detailed the features of Laravel 9 and what to expect in future releases. It also explored how to update or upgrade to Laravel 9 and install and start building an app with the new Laravel 9.

 

To see likes post click here.

 

Get real time updates directly on you device, subscribe now.

Comments
Loading...