dniccum / nova-documentation

A Laravel Nova tool that allows you to add markdown-based documentation to your administrator's dashboard.
MIT License
37 stars 15 forks source link

Allowed Memory Exceeded / Routes Recursion #22

Closed mstaack closed 1 year ago

mstaack commented 1 year ago

hey there, thanks for making a nova 4 version.

unfortunately adding this package create a weird recursion with routing.

running php artisan optimize gives:

  config ........................................................... 22ms DONE
  routes PHP Fatal error:  Allowed memory size of 671088640 bytes exhausted (tried to allocate 20480 bytes) in /home/forge/api.dev-eventportal.app/vendor/laravel/serializable-closure/src/Serializers/Native.php on line 222
PHP Fatal error:  Allowed memory size of 671088640 bytes exhausted (tried to allocate

removing the package instantly solves this.

i would expect some route register issues inside the tool provider.

dniccum commented 1 year ago

Thanks for the heads up. Can you post and or send me an email with the docs that you have in your app so I can debug?

mstaack commented 1 year ago

this happens with the default markdown files:

$ composer require dniccum/nova-documentation
$ php artisan vendor:publish --provider="Dniccum\NovaDocumentation\ToolServiceProvider"
$ php artisan optimize

   INFO  Caching the framework bootstrap files.

  config ................................................................................................................................. 18ms DONE
  routes %#

it just crashes with a memory exhausted error... you should be able to replicate that.

Laravel Version 9.50.1
PHP Version 8.1.14
Composer Version 2.5.1
Nova 4.21.0
dniccum commented 1 year ago

@mstaack This has been resolved. Please ensure your installation uses v3.0.1.