InsertKoinIO / koin

Koin - a pragmatic lightweight dependency injection framework for Kotlin & Kotlin Multiplatform
https://insert-koin.io
Apache License 2.0
8.98k stars 710 forks source link

Write Normal Deprecation Messages With Replacement #1743

Closed Nek-12 closed 8 months ago

Nek-12 commented 9 months ago

Does it take a lot of your time to write a normal deprecation message?


/**
 * alias of koinInject()
 *
 * @see koinInject
 *
 * @author Arnaud Giuliani
 */
@Composable
@Deprecated("") // ???
inline fun <reified T> rememberKoinInject(
    qualifier: Qualifier? = null,
    scope: Scope = rememberCurrentKoinScope(),
    noinline parameters: ParametersDefinition? = null,
): T {
    val st = parameters?.let { rememberStableParametersDefinition(parameters) }
    return remember(qualifier, scope) {
        scope.get(qualifier, st?.parametersDefinition)
    }
}
pedrofsn commented 8 months ago

Do you have a message suggestion @Nek-12? I can quick fix it.

arnaudgiuliani commented 8 months ago

It's something to improve, but I would expect another way to request it.

arnaudgiuliani commented 8 months ago

will be followed in PR