Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade guide from Nova v4 to v5 does not mention fortify() method in NovaServiceProvider #6787

Closed
MattLoyeD opened this issue Mar 19, 2025 · 5 comments
Labels
bug Verified bug by the Nova team fix incoming A fix is in review
Milestone

Comments

@MattLoyeD
Copy link

  • Laravel Version: 11.44.2
  • Nova Version: 5.2.0
  • PHP Version: 8.3.1
  • Database Driver & Version: Mysql 8.0
  • Operating System and Version: Ubuntu 24.04 / WSL2

Description:

Hi guys,

We struggled to find that a method named "fortify" was added by default to NovaServiceProvider, which is overriding config('fortify') causing it to be null in HandleInertiaRequests.php.

This shall be indicated in documentation, as it's not an indented behaviour from natural upgrade.

Detailed steps to reproduce the issue on a fresh Nova installation:

Remove fortify() method from NovaServiceProvider.php

@crynobone
Copy link
Member

Unable to reproduce the issue, please provide full reproducing repository based on fresh installation as suggested in the bug report template (or you can refer to https://github.com/nova-issues for example)

@crynobone crynobone added the needs more info More information is required label Mar 19, 2025
@MattLoyeD
Copy link
Author

Sorry I forgot the main part : It's only a problem with Laravel Octane. Tested it with serve/phpfpm and it was fine.

@crynobone
Copy link
Member

Still need the reproduction repository

@MattLoyeD
Copy link
Author

Here you go : https://github.com/MattLoyeD/laravel-octane-fortify-nova-bug

How to reproduce :

  • Launch without octane via "composer dev" and uncomment line 41 of app/Http/Middleware/HandleInertiaRequests.php. It works.
  • Launch with octane via "composer octane:dev", it will display null.
  • If you add fortify() method in app/Providers/NovaServiceProvider.php with subsequent configurations (inherited from config('fortify') for example) it works again.

@crynobone crynobone added bug Verified bug by the Nova team fix incoming A fix is in review and removed needs more info More information is required labels Mar 20, 2025
@crynobone crynobone added this to the 5.4.x milestone Mar 20, 2025
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 26, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Verified bug by the Nova team fix incoming A fix is in review
Projects
None yet
Development

No branches or pull requests

2 participants