Comments (7)
Thanks, @madapaja
from ray.di.
Hi,
this bug isn't fixed. If I get the instances over the Injector::getInstance()
method, then the method returns the same instances. But the automatically injected instances, with the help of the @Inject annotation, are not the same instances.
Cheers,
Christian
from ray.di.
I sent the pull request for this issue.
In Injector::bindOneParameter()
, I found a bug that it can't read annotation information by Config::fetch()
.
I guess this is because it call target class's config which is not enable to read Scope information. - typehint(interface) has binding(scope) information.
I've changed form Config::fetch($typehint)
to Config::fetch($target)
in Injector::bindOneParameter()
to fix this issue.
All tests passed, although I'm not sure yet. So would you please confirm ?
Cheers.
自信が無いので日本語でも。。。
Injector::bindOneParameter()
内でアノテーションによるScope指定が読み取れない問題を見つけました。
これは、ターゲット(バインド先)クラスのconfigを呼んでいるため、Scope指定が読み取れないためだと思います。
(Scope指定は、Interface(タイプヒントされた)クラス内で行われているためです)
これを解決するために、Config::fetch($target)
を Config::fetch($typehint)
に変更しました。
テストは通りますが、これでいいのかどうか自信がないので、ご確認ください。
from ray.di.
Thanks @madapaja as always. The code seems OK. I will try with BEAR.Sunday app as well.
from ray.di.
@akkie would you confirm it ?
from ray.di.
Yes, it works. I think the issue can be closed.
from ray.di.
Thank you all folks.
from ray.di.
Related Issues (20)
- XSS vulnerability may exist in Exception page HOT 1
- CLI実行時、リソースがコンパイル済みの場合に AssistedInjection が有効にならない HOT 3
- Error in toConstructor Injection HOT 4
- Problem in dynamic binding of class HOT 5
- The setter method can not be intercepted.
- Data files to PHP files
- Change data file text file to PHP file HOT 1
- Faster annotation reader HOT 1
- Refactor documentation HOT 1
- Injector receives an array of modules
- Multibindings
- Lazy instance injection
- Multiple interface bindings not possible in multibindings
- Support for multiple bindings for the same interface in different modules
- Support annotation in Multi bindings and Provider injection
- Codecov gets stuck HOT 1
- Failed to compile MediaQuery property
- Fresh containers reuse
- Implicit target binding issues
- Why do you use assert in production code? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ray.di.