Home > Article > PHP Framework > Does laravel support php8?
laravel supports php8. Higher versions of Laravel6, Laravel7 or Laravel8 support php8. You just need to ensure that any first-party software packages (Dusk, etc.) provided by Laravel are the latest version and update the relevant dependencies in the "composer.json" file.
The operating environment of this tutorial: Windows 7 system, Laravel 7 version, Dell G3 computer.
HP 8.0 major version update is officially available for download on November 26, 2020. The new version introduces an optional JIT compiler and integrates existing JSON support into the core (no longer optional). It has also added support for properties, union types, static return types and other additional languages, moving more and more towards strongly typed languages. In order to adapt to the new environment, Laravel and ThinkPHP have also updated their versions in time to support PHP8.
So how to enable Laravel’s support for PHP8?
First, make sure you are using the latest version of Laravel 6, 7, or 8 for PHP 8 support. Then make sure you are using the latest version of any first-party packages provided by Laravel, such as Passport, Cashier, Dusk, etc.
You also need to update several common dependencies in the composer.json file:
PHP updated to php:^8.0
Faker updated to fakerphp/faker:^1.9.1
PHPUnit updated to phpunit/phpunit:^ 9.3
Finally, run composer update
to update other software packages. Make sure to test your application before updating it for production.
[Related recommendations: laravel video tutorial]
The above is the detailed content of Does laravel support php8?. For more information, please follow other related articles on the PHP Chinese website!