Repository: InsertKoinIO/koin
File: projects/compose/koin-compose/src/commonMain/kotlin/org/koin/compose/KoinApplication.kt (Kotlin)

Code before:
import androidx.compose.runtime.compositionLocalOf
import androidx.compose.runtime.currentComposer
import org.koin.compose.application.rememberKoinApplication
import org.koin.compose.application.rememberKoinMPApplication
import org.koin.core.Koin
import org.koin.core.KoinApplication
import org.koin.core.annotation.KoinExperimentalAPI
import org.koin.core.annotation.KoinInternalApi
import org.koin.core.logger.Level
import org.koin.core.scope.Scope
import org.koin.dsl.KoinAppDeclaration
import org.koin.dsl.KoinConfiguration
import org.koin.dsl.koinApplication
import org.koin.mp.KoinPlatform
import org.koin.mp.KoinPlatformTools


/**
 * Internal API - Deprecated
 * Current Koin Scope, as default with Default Koin context root scope
 *
 * @see LocalKoinScopeContext
 */
//For Compat with 4.1.0
@Deprecated("LocalKoinScope has been replaced with LocalKoinScopeContext, using ComposeContextWrapper.getValue() to retrieve the value" , level = DeprecationLevel.ERROR ,replaceWith = ReplaceWith("LocalKoinScopeContext"))
val LocalKoinScope: ProvidableCompositionLocal<Scope> = error(" should not be used in favor LocalKoinScope")

/**
 * Deprecated - Internal API
 * Current Koin Application context, as default with Default Koin context
 */
//For Compat with 4.1.0
@Deprecated("LocalKoinApplication is deprecated and" , level = DeprecationLevel.ERROR ,replaceWith = ReplaceWith("getKoin()"))
val LocalKoinApplication :  ProvidableCompositionLocal<Koin> = error(" should not be used in favor getKoin()")

/**
 * Internal API
 * Current Koin Scope, as default with Default Koin context root scope
 *
 * @see ComposeContextWrapper
 */
//TODO later make it internal
@KoinInternalApi
val LocalKoinScopeContext: ProvidableCompositionLocal<ComposeContextWrapper<Scope>> = compositionLocalOf { ComposeContextWrapper(getDefaultRootScope()) { getDefaultRootScope() } }

/**
 * Internal API
 * Current Koin Application context, as default with Default Koin context
 *
 * @see ComposeContextWrapper
 */

Review comment (bug):
The deprecation message and error message both incorrectly reference 'LocalKoinScope'. The error message should say 'should not be used in favor of LocalKoinScopeContext' to match the replacement.
```suggestion
val LocalKoinScope: ProvidableCompositionLocal<Scope> = error(" should not be used in favor of LocalKoinScopeContext")
```

Code after:
import androidx.compose.runtime.compositionLocalOf
import androidx.compose.runtime.currentComposer
import org.koin.compose.application.rememberKoinApplication
import org.koin.compose.application.rememberKoinMPApplication
import org.koin.core.Koin
import org.koin.core.KoinApplication
import org.koin.core.annotation.KoinExperimentalAPI
import org.koin.core.annotation.KoinInternalApi
import org.koin.core.logger.Level
import org.koin.core.scope.Scope
import org.koin.dsl.KoinAppDeclaration
import org.koin.dsl.KoinConfiguration
import org.koin.dsl.koinApplication
import org.koin.mp.KoinPlatform
import org.koin.mp.KoinPlatformTools


/**
 * Internal API - Deprecated
 * Current Koin Scope, as default with Default Koin context root scope
 *
 * @see LocalKoinScopeContext
 */
//For Compat with 4.1.0
@Deprecated("LocalKoinScope has been replaced with LocalKoinScopeContext, using ComposeContextWrapper.getValue() to retrieve the value" , level = DeprecationLevel.ERROR ,replaceWith = ReplaceWith("LocalKoinScopeContext"))
val LocalKoinScope: ProvidableCompositionLocal<Scope> = error(" should not be used in favor of LocalKoinScopeContext")

/**
 * Deprecated - Internal API
 * Current Koin Application context, as default with Default Koin context
 */
//For Compat with 4.1.0
@Deprecated("LocalKoinApplication is deprecated. Use getKoin() to access the Koin instance directly.", level = DeprecationLevel.ERROR, replaceWith = ReplaceWith("getKoin()"))
val LocalKoinApplication :  ProvidableCompositionLocal<Koin> = error(" should not be used in favor of getKoin()")

/**
 * Internal API
 * Current Koin Scope, as default with Default Koin context root scope
 *
 * @see ComposeContextWrapper
 */
//TODO later make it internal
@KoinInternalApi
val LocalKoinScopeContext: ProvidableCompositionLocal<ComposeContextWrapper<Scope>> = compositionLocalOf { ComposeContextWrapper(getDefaultRootScope()) { getDefaultRootScope() } }

/**
 * Internal API
 * Current Koin Application context, as default with Default Koin context
 *
 * @see ComposeContextWrapper
 */