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

[3.0] Target [Anomaly\UsersModule\User\Contract\UserRepositoryInterface] is not instantiable. #3461

Closed
remyma opened this issue Mar 18, 2015 · 22 comments

Comments

@remyma
Copy link

remyma commented Mar 18, 2015

I have this error with a fresh install :

Target [Anomaly\UsersModule\User\Contract\UserRepositoryInterface] is not instantiable.

Steps to reproduce :

git clone https://github.com/pyrocms/pyrocms.git
cd pyrocms
composer install

Then run the installer. Installer ends with error : 
BindingResolutionException in Container.php line 785:
Target [Anomaly\UsersModule\User\Contract\UserRepositoryInterface] is not instantiable.
@RyanThompson
Copy link
Member

Revamping the installer literally right now. No worries ^_^

On Mar 18, 2015, at 6:34 AM, REMY Matthieu <notifications@github.commailto:notifications@github.com> wrote:

I have this error with a fresh install :

Target [Anomaly\UsersModule\User\Contract\UserRepositoryInterface] is not instantiable.

Steps to reproduce :

git clone https://github.com/pyrocms/pyrocms.git
cd pyrocms
composer install

Then run the installer. Installer ends with error :
BindingResolutionException in Container.php line 785:
Target [Anomaly\UsersModule\User\Contract\UserRepositoryInterface] is not instantiable.


Reply to this email directly or view it on GitHubhttps://github.com//issues/3461.

@RyanThompson
Copy link
Member

This should be long fixed by now ^_^

@ghost
Copy link

ghost commented Mar 4, 2016

I use phpStorm to install pyrocms 3 and still meet this issue. How to fix it?

@RyanThompson
Copy link
Member

What's your environment look like?

@aidanwatt
Copy link
Collaborator

I've got the same error using mamp pro with php 5.6.10, has all the extensions mentioned in the requirements. If you need any more details let me know. Beta 2 is working okay on that setup.

@RyanThompson
Copy link
Member

Can you guys try deleting any compiled.php file in bootstrap/cache/

Also try composer dump-autoload

@RyanThompson
Copy link
Member

Since using MAMP - does changing to PHP 7 work?

Also disable opcache if you have it enabled.

@haeflimi
Copy link

haeflimi commented Mar 4, 2016

I am having the same problem. Just tried to set up a sandbox using Laravel Homestead (PHP7) with the current 3.0 master branch.
Tried composer dump-autoload -> no change
compiled.php dosn't even exist

@RyanThompson
Copy link
Member

@haeflimi can you paste the entire stack trace?

@haeflimi
Copy link

haeflimi commented Mar 5, 2016

I just realised it's not the exact same Error, but Google brought me streight here and it is similar :

BindingResolutionException in Container.php line 749: Target [Anomaly\UsersModule\Role\Contract\RoleRepositoryInterface] is not instantiable.

in Container.php line 749
at Container->build('Anomaly\UsersModule\Role\Contract\RoleRepositoryInterface', array()) in Container.php line 631
at Container->make('Anomaly\UsersModule\Role\Contract\RoleRepositoryInterface', array()) in Application.php line 674
at Application->make('Anomaly\UsersModule\Role\Contract\RoleRepositoryInterface') in Container.php line 842
at Container->resolveClass(object(ReflectionParameter)) in Container.php line 805
at Container->getDependencies(array(object(ReflectionParameter), object(ReflectionParameter), object(ReflectionParameter)), array()) in Container.php line 774
at Container->build('Anomaly\Streams\Platform\Support\Authorizer', array()) in Container.php line 220
at Container->Illuminate\Container\{closure}(object(Application), array()) in Container.php line 738
at Container->build(object(Closure), array()) in Container.php line 631
at Container->make('Anomaly\Streams\Platform\Support\Authorizer', array()) in Application.php line 674
at Application->make('Anomaly\Streams\Platform\Support\Authorizer') in Container.php line 842
at Container->resolveClass(object(ReflectionParameter)) in Container.php line 805
at Container->getDependencies(array(object(ReflectionParameter), object(ReflectionParameter), object(ReflectionParameter), object(ReflectionParameter)), array()) in Container.php line 774
at Container->build('Anomaly\Streams\Platform\Http\Middleware\CheckForMaintenanceMode', array()) in Container.php line 631
at Container->make('Anomaly\Streams\Platform\Http\Middleware\CheckForMaintenanceMode', array()) in Application.php line 674
at Application->make('Anomaly\Streams\Platform\Http\Middleware\CheckForMaintenanceMode') in Pipeline.php line 123
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in ClosureHttpKernel.php line 30
at ClosureHttpKernel->handle(object(Request), '1', true) in HttpCache.php line 487
at HttpCache->forward(object(Request), true) in HttpCache.php line 444
at HttpCache->fetch(object(Request), true) in HttpCache.php line 344
at HttpCache->lookup(object(Request), true) in HttpCache.php line 210
at HttpCache->handle(object(Request)) in ClosureMiddleware.php line 36
at ClosureMiddleware->handle(object(Request), object(Closure))
at call_user_func_array(array(object(TerminableClosureMiddleware), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in PoweredBy.php line 46
at PoweredBy->handle(object(Request), object(Closure))
at call_user_func_array(array(object(PoweredBy), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in SetLocale.php line 92
at SetLocale->handle(object(Request), object(Closure))
at call_user_func_array(array(object(SetLocale), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in ForceHttps.php line 61
at ForceHttps->handle(object(Request), object(Closure))
at call_user_func_array(array(object(ForceHttps), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in ApplicationReady.php line 55
at ApplicationReady->handle(object(Request), object(Closure))
at call_user_func_array(array(object(ApplicationReady), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in VerifyCsrfToken.php line 69
at VerifyCsrfToken->handle(object(Request), object(Closure))
at call_user_func_array(array(object(VerifyCsrfToken), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 102
at Pipeline->then(object(Closure)) in ControllerDispatcher.php line 114
at ControllerDispatcher->callWithinStack(object(InstallerController), object(Route), object(Request), 'index') in ControllerDispatcher.php line 67
at ControllerDispatcher->dispatch(object(Route), object(Request), 'Anomaly\InstallerModule\Http\Controller\InstallerController', 'index') in Route.php line 203
at Route->runWithCustomDispatcher(object(Request)) in Route.php line 134
at Route->run(object(Request)) in Router.php line 708
at Router->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 139
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 102
at Pipeline->then(object(Closure)) in Router.php line 710
at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 673
at Router->dispatchToRoute(object(Request)) in Router.php line 635
at Router->dispatch(object(Request)) in Kernel.php line 236
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 139
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in ShareErrorsFromSession.php line 49
at ShareErrorsFromSession->handle(object(Request), object(Closure))
at call_user_func_array(array(object(ShareErrorsFromSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in StartSession.php line 62
at StartSession->handle(object(Request), object(Closure))
at call_user_func_array(array(object(StartSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 37
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure))
at call_user_func_array(array(object(AddQueuedCookiesToResponse), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in EncryptCookies.php line 59
at EncryptCookies->handle(object(Request), object(Closure))
at call_user_func_array(array(object(EncryptCookies), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 102
at Pipeline->then(object(Closure)) in Kernel.php line 122
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 87
at Kernel->handle(object(Request)) in index.php line 52

@aidanwatt
Copy link
Collaborator

Same as haeflimi
Tried composer dump-autoload -> no change
compiled.php doesn't exist

Have made sure opcache is disabled, on an older version of MAMP without PHP 7, will upgrade and see if it makes a difference :-)

@aidanwatt
Copy link
Collaborator

Just tried with PHP7 on mamp, returns the same error.

@RyanThompson
Copy link
Member

I think this is good now - can you check?

@aidanwatt
Copy link
Collaborator

Tried with a fresh install, sorry same error.

@RyanThompson
Copy link
Member

I don't think so if it's new @j-hubb - pull users / core with git and yours should clear up
Or installed=false - > composer update and mark installed again

@jhubb-io
Copy link
Contributor

jhubb-io commented Mar 7, 2016

Ignore me. This is related to another issue (I've posted there)

@aidanwatt
Copy link
Collaborator

Good for me now, cheers!

@RyanThompson
Copy link
Member

@aidanwatt woot!

@haeflimi
Copy link

haeflimi commented Mar 7, 2016

@aidanwatt What did you do to get it working?
@j-hubb What other issue are you refering to? I couldn't find a similar one in the open issues.
I am still having the same problem. Now the error also shows up when i do a composer update.:

php artisan clear-compiled

[Illuminate\Contracts\Container\BindingResolutionException]
Target [Anomaly\UsersModule\Role\Contract\RoleRepositoryInterface] is not instantiable.

Script php artisan clear-compiled handling the pre-update-cmd event returned with an error

I thought i might do something wrong and started over agin. Also tried the develop branch. Same result.

@haeflimi
Copy link

haeflimi commented Mar 7, 2016

alright, just managed to resolve it. All looks good right now.
What i ended up doing was runing composer update width "--no-scripts" to get the recent files. Then run again without the --no-scripts.

@aidanwatt
Copy link
Collaborator

Sorry yeah should have posted.. @RyanThompson had pushed some fixes and there was a discussion on the slack channel, I just ran an update with --no-scripts same as you.

@RyanThompson
Copy link
Member

@haeflimi glad you got it working man - another good tip to know if you ever corrupt your file base or something (deleting / whatever) and need to re-composer install / update. You can mark INSTALLED=false in the .env file too and that will prevent Streams from looking for add ons.

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

No branches or pull requests

5 participants