File tree Expand file tree Collapse file tree 4 files changed +7
-4
lines changed
Expand file tree Collapse file tree 4 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 11Pod ::Spec . new do |s |
22 s . name = "Factory"
3- s . version = "2.5.2 "
3+ s . version = "2.5.3 "
44 s . summary = "A Modern Dependency Injection / Service Locator framework for Swift on iOS."
55 s . homepage = "https://github.com/hmlongco/Factory"
66 s . license = "MIT"
Original file line number Diff line number Diff line change @@ -249,7 +249,7 @@ public final class ContainerManager: @unchecked Sendable {
249249 /// Public initializer
250250 public init ( ) { }
251251
252- /// Default scope
252+ /// Default scope. Setting scope to nil returns the default to `unique`.
253253 public var defaultScope : Scope ? {
254254 get { globalVariableLock. withLock { _defaultScope } }
255255 set { globalVariableLock. withLock { _defaultScope = newValue } }
@@ -338,6 +338,9 @@ extension ContainerManager {
338338 self . options. removeAll ( keepingCapacity: true )
339339 self . cache. reset ( )
340340 self . autoRegistrationCheckNeeded = true
341+ self . _defaultScope = nil
342+ self . _dependencyChainTestMax = 8
343+ self . _promiseTriggersError = FactoryContext . current. isDebug && !FactoryContext. current. isPreview
341344 case . context:
342345 for (key, option) in self . options {
343346 var mutable = option
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ extension FactoryModifying {
5757 /// ```
5858 /// Primarily used to assign custom scopes.
5959 @discardableResult
60- public func scope( _ scope: Scope ? ) -> Self {
60+ public func scope( _ scope: Scope ) -> Self {
6161 registration. scope ( scope)
6262 return self
6363 }
Original file line number Diff line number Diff line change @@ -193,7 +193,7 @@ extension Scope {
193193
194194 /// A reference to the default unique scope.
195195 ///
196- /// If no scope cache is specified then Factory is running in unique mode.
196+ /// If no scope cache is specified then Factory is running in unique mode.
197197 public static let unique = Unique ( )
198198
199199 /// Defines the unique scope. A new instance of a given type will be returned on every resolution cycle.
You can’t perform that action at this time.
0 commit comments