Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unresolvable dependency resolving #130

Open
ackerchez opened this issue Mar 22, 2022 · 9 comments
Open

Unresolvable dependency resolving #130

ackerchez opened this issue Mar 22, 2022 · 9 comments
Labels

Comments

@ackerchez
Copy link

Hello.

I tried to use the controllers here to create a chucked upload. I am getting the following error

"Unresolvable dependency resolving [Parameter #0 [ $disk ]] in class Pion\Laravel\ChunkUpload\Storage\ChunkStorage"

It seems that when the FileReceiver is trying to initialize it calls the following method in ChunkStorage.php

public static function storage() { return app(self::class); }

That method is returning an instance of self but the constructor for that class requires two params:

public function __construct($disk, $config) { .... }

As a result, it seems there is an instance loading problem.

Q A
This Package Version 1.5
Laravel Framework Version 8.27
PHP version 8
@pionl
Copy link
Owner

pionl commented Mar 22, 2022

Hi,

could you please check if the provider is auto-discovered? This seems like the service provider was not loaded.

I've tried Laravel 8 + PHP 8.0 (real upload) in example repo an it works :(

@ackerchez
Copy link
Author

ackerchez commented Mar 22, 2022 via email

@pionl
Copy link
Owner

pionl commented Mar 24, 2022

It should not copy anything, It seems that the Laravel has not auto-discovered the package for some reason - maybe you have disabled this functionality?

@pionl
Copy link
Owner

pionl commented Apr 27, 2022

Have you found out the problem? Otherwise im gona close the issue

@pionl pionl added the waiting label Apr 27, 2022
@harrisonbudiman
Copy link

Hi I have same issue? any idea how to solved it?
image

@harrisonbudiman
Copy link

ok on my case you need to put the services provider on config/app then run php artisan cache:clear it solved it...
image

@pionl
Copy link
Owner

pionl commented Jun 30, 2022

Did do you disable auto discover feature in Laravel?

@harrisonbudiman
Copy link

hmm no...i am on laravel 8 and just using composer to install your script, anyway thank you so much

@ytsirc0326
Copy link

ok on my case you need to put the services provider on config/app then run php artisan cache:clear it solved it... image

It works. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants