Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated things #1525

Merged
merged 1 commit into from
Oct 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions Kingfisher.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@
D1A37BDE215D34E8009B39B7 /* ImageDrawing.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1A37BDD215D34E8009B39B7 /* ImageDrawing.swift */; };
D1A37BE3215D359F009B39B7 /* ImageFormat.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1A37BE2215D359F009B39B7 /* ImageFormat.swift */; };
D1A37BE8215D365A009B39B7 /* ExtensionHelpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1A37BE7215D365A009B39B7 /* ExtensionHelpers.swift */; };
D1A37BED215D375F009B39B7 /* Deprecated.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1A37BEC215D375F009B39B7 /* Deprecated.swift */; };
D1A37BF2215D3850009B39B7 /* SizeExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1A37BF1215D3850009B39B7 /* SizeExtensions.swift */; };
D1BA781D2174D07800C69D7B /* CallbackQueue.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1BA781C2174D07800C69D7B /* CallbackQueue.swift */; };
D1BFED95222ACC6B009330C8 /* ImageProcessorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1BFED94222ACC6B009330C8 /* ImageProcessorTests.swift */; };
Expand Down Expand Up @@ -253,7 +252,6 @@
D1A37BDD215D34E8009B39B7 /* ImageDrawing.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageDrawing.swift; sourceTree = "<group>"; };
D1A37BE2215D359F009B39B7 /* ImageFormat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageFormat.swift; sourceTree = "<group>"; };
D1A37BE7215D365A009B39B7 /* ExtensionHelpers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExtensionHelpers.swift; sourceTree = "<group>"; };
D1A37BEC215D375F009B39B7 /* Deprecated.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Deprecated.swift; sourceTree = "<group>"; };
D1A37BF1215D3850009B39B7 /* SizeExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SizeExtensions.swift; sourceTree = "<group>"; };
D1BA781C2174D07800C69D7B /* CallbackQueue.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CallbackQueue.swift; sourceTree = "<group>"; };
D1BFED94222ACC6B009330C8 /* ImageProcessorTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageProcessorTests.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -387,7 +385,6 @@
D12AB6B2215D2BB50013BA68 /* KingfisherError.swift */,
D12AB6B3215D2BB50013BA68 /* KingfisherManager.swift */,
D12AB6B4215D2BB50013BA68 /* KingfisherOptionsInfo.swift */,
D1A37BEC215D375F009B39B7 /* Deprecated.swift */,
);
path = General;
sourceTree = "<group>";
Expand Down Expand Up @@ -853,7 +850,6 @@
D1A37BDE215D34E8009B39B7 /* ImageDrawing.swift in Sources */,
4BD821672189FD330084CC21 /* SessionDataTask.swift in Sources */,
D12AB708215D2BB50013BA68 /* KingfisherError.swift in Sources */,
D1A37BED215D375F009B39B7 /* Deprecated.swift in Sources */,
4BE688F822FD513700B11168 /* WKInterfaceImage+Kingfisher.swift in Sources */,
D12AB724215D2BB50013BA68 /* Box.swift in Sources */,
4B8E291C216F40AA0095FAD1 /* AuthenticationChallengeResponsable.swift in Sources */,
Expand Down
20 changes: 0 additions & 20 deletions Sources/Cache/CacheSerializer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,26 +52,6 @@ public protocol CacheSerializer {
/// - Returns: An image deserialized or `nil` when no valid image
/// could be deserialized.
func image(with data: Data, options: KingfisherParsedOptionsInfo) -> KFCrossPlatformImage?

/// Gets an image deserialized from provided data.
///
/// - Parameters:
/// - data: The data from which an image should be deserialized.
/// - options: Options for deserialization.
/// - Returns: An image deserialized or `nil` when no valid image
/// could be deserialized.
/// - Note:
/// This method is deprecated. Please implement the version with
/// `KingfisherParsedOptionsInfo` as parameter instead.
@available(*, deprecated,
message: "Deprecated. Implement the method with same name but with `KingfisherParsedOptionsInfo` instead.")
func image(with data: Data, options: KingfisherOptionsInfo?) -> KFCrossPlatformImage?
}

extension CacheSerializer {
public func image(with data: Data, options: KingfisherOptionsInfo?) -> KFCrossPlatformImage? {
return image(with: data, options: KingfisherParsedOptionsInfo(options))
}
}

/// Represents a basic and default `CacheSerializer` used in Kingfisher disk cache system.
Expand Down
27 changes: 0 additions & 27 deletions Sources/Cache/ImageCache.swift
Original file line number Diff line number Diff line change
Expand Up @@ -825,30 +825,3 @@ extension String {
}
}
}

extension ImageCache {

/// Creates an `ImageCache` with a given `name`, cache directory `path`
/// and a closure to modify the cache directory.
///
/// - Parameters:
/// - name: The name of cache object. It is used to setup disk cache directories and IO queue.
/// You should not use the same `name` for different caches, otherwise, the disk storage would
/// be conflicting to each other.
/// - path: Location of cache URL on disk. It will be internally pass to the initializer of `DiskStorage` as the
/// disk cache directory.
/// - diskCachePathClosure: Closure that takes in an optional initial path string and generates
/// the final disk cache path. You could use it to fully customize your cache path.
/// - Throws: An error that happens during image cache creating, such as unable to create a directory at the given
/// path.
@available(*, deprecated, message: "Use `init(name:cacheDirectoryURL:diskCachePathClosure:)` instead",
renamed: "init(name:cacheDirectoryURL:diskCachePathClosure:)")
public convenience init(
name: String,
path: String?,
diskCachePathClosure: DiskCachePathClosure? = nil) throws
{
let directoryURL = path.flatMap { URL(string: $0) }
try self.init(name: name, cacheDirectoryURL: directoryURL, diskCachePathClosure: diskCachePathClosure)
}
}
9 changes: 0 additions & 9 deletions Sources/Extensions/ImageView+Kingfisher.swift
Original file line number Diff line number Diff line change
Expand Up @@ -408,13 +408,4 @@ extension KFCrossPlatformImageView {
@objc func shouldPreloadAllAnimation() -> Bool { return true }
}

extension KingfisherWrapper where Base: KFCrossPlatformImageView {
/// Gets the image URL bound to this image view.
@available(*, deprecated, message: "Use `taskIdentifier` instead to identify a setting task.")
public private(set) var webURL: URL? {
get { return nil }
set { }
}
}

#endif
19 changes: 0 additions & 19 deletions Sources/Extensions/NSButton+Kingfisher.swift
Original file line number Diff line number Diff line change
Expand Up @@ -333,23 +333,4 @@ extension KingfisherWrapper where Base: NSButton {
set { setRetainedAssociatedObject(base, &alternateImageTaskKey, newValue)}
}
}

extension KingfisherWrapper where Base: NSButton {

/// Gets the image URL bound to this button.
@available(*, deprecated, message: "Use `taskIdentifier` instead to identify a setting task.")
public private(set) var webURL: URL? {
get { return nil }
set { }
}


/// Gets the image URL bound to this button.
@available(*, deprecated, message: "Use `alternateTaskIdentifier` instead to identify a setting task.")
public private(set) var alternateWebURL: URL? {
get { return nil }
set { }
}
}

#endif
21 changes: 0 additions & 21 deletions Sources/Extensions/UIButton+Kingfisher.swift
Original file line number Diff line number Diff line change
Expand Up @@ -372,27 +372,6 @@ extension KingfisherWrapper where Base: UIButton {
mutating set { setRetainedAssociatedObject(base, &backgroundImageTaskKey, newValue) }
}
}

extension KingfisherWrapper where Base: UIButton {

/// Gets the image URL of this button for a specified state.
///
/// - Parameter state: The state that uses the specified image.
/// - Returns: Current URL for image.
@available(*, deprecated, message: "Use `taskIdentifier` instead to identify a setting task.")
public func webURL(for state: UIControl.State) -> URL? {
return nil
}

/// Gets the background image URL of this button for a specified state.
///
/// - Parameter state: The state that uses the specified background image.
/// - Returns: Current URL for image.
@available(*, deprecated, message: "Use `backgroundTaskIdentifier` instead to identify a setting task.")
public func backgroundWebURL(for state: UIControl.State) -> URL? {
return nil
}
}
#endif

#endif
10 changes: 0 additions & 10 deletions Sources/Extensions/WKInterfaceImage+Kingfisher.swift
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,4 @@ extension KingfisherWrapper where Base: WKInterfaceImage {
set { setRetainedAssociatedObject(base, &imageTaskKey, newValue)}
}
}

extension KingfisherWrapper where Base: WKInterfaceImage {
/// Gets the image URL bound to this image view.
@available(*, deprecated, message: "Use `taskIdentifier` instead to identify a setting task.")
public private(set) var webURL: URL? {
get { return nil }
set { }
}
}

#endif
Loading