Laravel 10 Released: A Game-Changing Update for Web Developers
Laravel 10 is released on 14 February 2023. It comes with various new features and improvements to existing functionality, which makes building scalable, secure, and high-quality applications easier than ever before. Whether you’re a Laravel developer or just starting, It is worth checking out.
Starting from now, Laravel will have one major release every year, with the following schedule:
- Laravel 9: released on February 8th, 2022.
- Laravel 10: released on February 14th, 2023.
- Laravel 11: to be released in the first quarter of 2024.
Now Laravel 10 doesn’t support PHP 8.0
The framework will no longer provide support for PHP versions less than 8.0. The minimum PHP version required to run Laravel 10 will be PHP 8.1 or higher.
Application skeleton code
The Laravel application skeleton code will include native-type declarations. This means that any user-generated code will have type hints and return types. We believe this change will be beneficial for new projects and make development more efficient.
To ensure backward compatibility at the framework level, it will implement PHP’s latest type-hinting features in a non-disruptive manner. The following changes will be introduced:
- Return types will be supported.
- Method arguments will be type-hinted.
- Redundant annotations will be removed where possible.
- User-defined types will be allowed in closure arguments.
- Typed properties will not be included.
String Password Helper
You can use the
Str::password method in Laravel to create a random, secure password of a specified length. The generated password will contain a mixture of letters, numbers, symbols, and spaces. By default, the length of the password is set to 32 characters.
To use the
Str::password method, you need to include the
Illuminate\Support\Str class in your code. Here are some examples of how to generate a password:
use Illuminate\Support\Str; // Generate a 32-character password $password = Str::password(); // Example output: 'EbJo2vE-AS:U,$%_gkrV4n,q~1xy/-_4' // Generate a 12-character password $password = Str::password(12); // Example output: 'qwuar>#V|i]N'
Deprecations from Laravel 9
Laravel 10 removes some of the methods and functionalities marked as deprecated in Laravel 9. Here are some of the deprecations that have been identified by comparing the Laravel framework’s master branch to the 9. x branch:
- Pull Request #41136: removing various deprecations.
- Pull Request #42587: removing the deprecated
- Pull Request #42590: removing the
- Pull Request #42592: removing the deprecated
- 419471e: removing the deprecated
- Pull Request #42614: removing the deprecated
- Pull Request #42591: removing the deprecated
Invokable Validation rules are the default
If you create a new validation rule via artisan in Laravel 10, you should expect invokable validation rules to be set as the default option.
# Laravel 9 creates a rule class that implements the # Illuminate\Contracts\Validation\Rule interface artisan make:rule Uppercase # Laravel 9 flag to create an invokable and implicit rule artisan make:rule Uppercase --invokable artisan make:rule Uppercase --invokable --implicit # Laravel 10 creates an invokable rule by default artisan make:rule Uppercase # Laravel 10 implicit rule artisan make:rule Uppercase --implicit
How to upgrade from Laravel 9 to Laravel 10
If you’re looking to upgrade your Laravel application from version 9 to version 10, the good news is that it can be done easily with Laravel 10.x Shift. This tool is designed to automate the upgrade process and can save you up to two hours of valuable time. It’s worth noting that both Laravel and Laravel 10.x Shift will receive regular updates, and you can request a rerun if necessary.
Before you upgrade, there are a couple of essential requirements that you should be aware of. Firstly, your current Laravel application must be running on version 9 or a more recent version. Secondly, your server needs to have PHP 8.1 or a higher version installed to support Laravel 10.
In the end
Overall, Laravel 10 is a significant step forward for the popular PHP framework, with several important improvements that make it easier than ever to build high-quality, robust web applications. If you need support or have any questions, please feel free to contact us here
- Digital Marketing (7)
- eCommerce (34)
- Laravel (1)
- Latest News (5)
- Magento 2 Extensions (5)
- Magento2 (38)
- Shopify (5)
- Shopware (7)
- Wordpress (2)
Advanced custom links extension (1) auto cancel order (1) banners (1) cancel order (1) cart attributes (1) Customer (7) Custom order invoice number module (1) custom shipping method (1) E-Commerce (7) eCommerce (41) full page cache magento 2 (1) hcaptcha (1) hcaptcha vs recaptcha (1) How to add customer attribute in Magento 2 (1) Laravel 10 (1) Magento2 (34) magento 2 back in stock notification (1) magento 2 cancel order (1) Magento2 Extension (3) magento 2 extensions (1) magento 2 layered navigation (1) magento 2 recaptcha (2) magento 2 robots.txt (1) magento 2.4.6 (1) magento headless commerce (1) new features (1) online store (13) openmaze (1) order management (1) Product (4) product attributes (1) recaptcha (1) search engine optimization (6) seo (10) shipping rule (1) shopify (3) shopware (6) Shopware-plugin (3) Shopware 6 (5) shopware 6 released (1) store switcher (1) structured data (1) upcoming update (1) wordpress (1) wordpress vs shopify (1)