Dependency Upgrades
Nova’s upstream dependencies have been upgraded. You will find a complete list of our dependency upgrades below:Server
- PHP 8.1+
- Laravel Framework 10.34+ and 11.0+
- Inertia Laravel 1.3+ and 2.0+
- Replaced
laravel/uiwithlaravel/fortifyv1.21+ - Removed
doctrine/dbal
Client
- Update to
@inertiajs/vue3v2 - Update to Heroicons v2
- Update to
trixv2 - Remove deprecated
form-backend-validation - Remove deprecated
places.js
Updating Composer Dependencies
You should update yourlaravel/nova dependency to ^5.0 in your application’s composer.json file:
composer.json
Updating Assets and Translations
Next, you should update your application’s Nova assets and translation files. To get started, you may run the following commands to update your assets and translations. You may wish to store a copy of your current translation file before running this command so you can easily port any custom translations back into the new file after running these commands.:Updating Third-Party Nova Packages
If your application relies on Nova tools or packages developed by third-parties, it is possible that these packages are not yet compatible with Nova 5.0 and will require an update from their maintainers.Upgrading Authentication Features
Next, you will need to update your Nova configuration file. Ensure that theapi_middleware configuration option within your application’s nova configuration file appears as follows:
config/nova.php
register method in your application’s App\Providers\NovaServiceProvider class to call the parent’s register method. The parent::register() method should be invoked before any other code in the method:
app/Nova/NovaServiceProvider.php
Updating Nova Components (Custom Tool, Cards, Fields, Filters)
Inertia 2 Compatibility
In Nova 5, Nova’s frontend JavaScript now utilizes Inertia.js 2.x, which will affect any projects that directly import from@inertiajs/inertia or @inertiajs/inertia-vue3. You should inspect your custom components and packages to ensure all references have been updated as suggested in Inertia’s upgrade guide.
Replacing form-backend-validation
The form-backend-validation repository has been archived and should no longer be used by third-party packages or components. Instead, you may simply import Errors from laravel-nova:
form-backend-validation from your component’s package.json:
Medium Impact Changes
Form Abandonment (Using Browser Navigation)
With the introduction of Inertia.js 2.x, we are no longer able to provide form abandonment warnings when using the browser’s back button.Algolia Place Field Removed
Algolia retired their “Places” API on May 31, 2022; therefore, thePlace field was deprecated on Nova 4 and is now removed in Nova 5.
Low Impact Changes
Update Published Stubs
Due to various changes in Nova 5.x, you should re-publish the Nova “stubs” if you have previously published them. You can accomplish this by executing thenova:stubs Artisan command with the --force option: