andyz's avatar

andyz started a new conversation+100 XP

3w ago

In a new Laravel 13 project, when I install both opgginc/codezero-laravel-localized-routes and nwidart/laravel-modules, when composer dump-autoload runs I get the following error:

Maximum call stack size of 67043328 bytes (zend.max_allowed_stack_size - zend.reserved_stack_size) reached. Infinite recursion?

  at vendor\laravel\framework\src\Illuminate\Container\Container.php:1810
    1806▕      * @param  string  $offset
    1807▕      */
    1808▕     public function offsetGet($offset): mixed
    1809▕     {
  ➜ 1810▕         return $this->make($offset);
    1811▕     }
    1812▕
    1813▕     /**
    1814▕      * Set the value at a given offset.

  1   vendor\laravel\framework\src\Illuminate\Container\Container.php:1810
      Illuminate\Foundation\Application::make("translator")

  2   vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php:240
      Illuminate\Container\Container::offsetGet("translator")

Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1 

Note that when only one of the two packages exist, there is no problem.

Any ideas about what to do?

andyz's avatar

andyz liked a comment+100 XP

1mo ago

@imakeinternet YES. That's a very good point. AI will think, "Well...this is how it's done."

andyz's avatar

andyz liked a comment+100 XP

1mo ago

I think another important reason to actually care about quality and standards in code generated by AI is that over time, if not addressed early, future AI sessions will pick this up as a pattern and will dramatically magnify the effect of deteriorating code, leading to highly overcomplicated code for every request.