Closed circulon closed 2 years ago
Cannot reproduce using the steps you provided. You should not be getting that storage key binding error. that should bind to the container in the StorageProvider. Do you have that provider in your project?
although what does this mean? "Publish the atrifacts for the debug bar into storage - as per the docs here"
Oh i see the issue. The DebugProvider should be the last provider in the PROVIDERS
list. You probably have it above the StorageProvider
@josephmancuso
Oh i see the issue. The DebugProvider should be the last provider in the
PROVIDERS
list. You probably have it above the StorageProvider
Yes the debug bar is the last provider added so thats not the issue. In M4 there is no StorageProvider at all! The Kernel uses the FilesystemProvider to setup storage locations.
def register_storage(self):
storage = StorageCapsule()
storage.add_storage_assets(config("filesystem.staticfiles"))
self.application.bind("storage_capsule", storage)
self.application.set_response_handler(response_handler)
self.application.use_storage_path(base_path("storage"))
As you can see there is no storage
binding, only the newer storage_capsule
Hence the Publish error
although what does this mean? "Publish the atrifacts for the debug bar into storage - as per the docs here"
Apologies I thought the inference was obvious.
The Readme on this repo notes
Lastly, publish the provider:
$ python craft package:publish debugbar
@circulon I think something else is going on here. Are you sure you didn't remove that provider somehow? The provider is registered on new projects in the config/providers.py file: https://github.com/MasoniteFramework/cookie-cutter/blob/4.0/config/providers.py#L42.
Running that command on a new project gives me this:
I think the issue is you're just missing that StorageProvider. You should add it to your project
@josephmancuso
I'm sorry there is a StorageProvider which I completely missed. Apologies.
And yes you were correct in that the debug bar was being loaded prior to the registration of the StorageProvider.
I have a bug in my provider loading which created this Red Herring.
Thanks for the help in getting this working
EDIT: Its working as expected which is very helpful and will make debugging much easier. Cheers for the help.
Whats the issue?: I want to use the debug bar in M4
Steps to replicate this: Install a basic M4 Project Install the debug bar as per the docs - as per the docs here Publish the atrifacts for the debug bar into storage - as per the docs here See the exception during publish due to incorrect application binding.
Notice that
storage
is not actually part of the bindings in the M4 KernelWhat would you expect?: This binding should be part of the setup as per the M4 Kernel as it is supposed to work with M4 but the bindings impy its still part of M3