brefphp / laravel-bridge

Package to use Laravel on AWS Lambda with Bref
https://bref.sh/docs/frameworks/laravel.html
MIT License
314 stars 63 forks source link

Fix service provider running order #102

Closed georgeboot closed 1 year ago

georgeboot commented 1 year ago

This pull request introduces two changes in the timing of calls made in the service provider of the package.

1. Change storage path

Currently, the storage path is always changed. This means that it also happens in CI, and not only when deployed on bref. Furthermore, the change of the path can be moved to the register method, because it does not depend on any external services being registered.

2. Pushing ServeStaticAssets to the middleware stack

We can only be sure that the Kernel is registered in the service provider, in the boot method of our service provider. At the register stage, it could theoretically not been registered yet.


Tested and deployed to a test bref v2 app.

Fixes #101

aran112000 commented 1 year ago

Yup, this appears to be the same issue we've been having under #101