herd-community icon indicating copy to clipboard operation
herd-community copied to clipboard

[Bug]: dump.phar injection breaks Laravel Lumen: Call to undefined method Laravel\Lumen\Application::afterBootstrapping()

Open alancwoo opened this issue 1 year ago • 1 comments

Platform

macOS

Operating system version

macOS Sonoma 14.5

System architecture

Intel (x86)

Herd Version

1.11.1 (Build: 34)

PHP Version

PHP 8.2.23

Bug description

If dump is enabled, my lumen application crashes with:

Error:
Call to undefined method Laravel\Lumen\Application::afterBootstrapping()

  at phar:///Applications/Herd.app/Contents/Resources/valet/dump.phar/src/HerdInjector.php:36
  at Herd\HerdDumper\HerdInjector->Herd\HerdDumper\{closure}(object(Application))
  at require('/REDACTED/bootstrap/app.php')
  at require('/REDACTED/public/index.php')

Unfortunately, I have to maintain an older lumen application, which is at its latest 11.x release

Steps to reproduce

Create a lumen application hosted in Herd with dump enabled

Relevant log output

No response

alancwoo avatar Oct 07 '24 11:10 alancwoo

Note: I am aware that disabling dump allows the application to run again, but am unsure if such bug reports are helpful or if such things cannot be fixed as the docs describe:

Technically, Herd uses this extension to inject code into your codebase in very early stages of the bootstrapping process. So if you're facing issues within your application, you might want to disable some or all of the features in the settings.

It would definitely be helpful to have the dump capture functionality here if possible!

alancwoo avatar Oct 07 '24 11:10 alancwoo

They are helpful! This hint allows you to keep working until we're able to fix it :)

sschlein avatar Oct 14 '24 08:10 sschlein

This will be fixed in tomorrow's update.

mpociot avatar Oct 28 '24 09:10 mpociot

This is now fixed with Herd 1.11.2

mpociot avatar Oct 29 '24 15:10 mpociot