Open thekid opened 4 months ago
This will supersede providers.
$provider= $injector->get('inject.Provider<com.example.writers.ReportWriter>');
// ...later on
$instance= $provider->get();
$implementations= $injector->implementations(ReportWriter::class);
// ...later on
$instance= $implementations->default();
Alternative idea: Create inject.Injection
superseding inject.Injector
; only implementing new features there but already removing other APIs such as add()
, args()
and newInstance()
. This would open a much faster path towards a new, leaner API.
Previously:
New alternative: