Skip to content
Discussion options

You must be logged in to vote

Yup, you are spot on with this. The fake method is not really that helpful with v4 (we have fixed it in v5 though). Once has module has been imported (ie the use method has been used), the fake cannot undo its imported value.

With v5 we are using proxies to fix this behaviour and works like a charm, but back porting it lead to breaking changes.

Regarding, where to use ioc.bind? The answer is "It depends"

  • If you are creating a package, then write it inside the provider file
  • If you are in your application codebase, again you can create a provider in the same codebase and write it inside the provider file. However, you should avoid binding stuff to the container, when you can actually impor…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by otang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants