diff --git a/Package.swift b/Package.swift index d481859c..352ee2a3 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.8 +// swift-tools-version:5.9 import PackageDescription let package = Package( @@ -13,7 +13,7 @@ let package = Package( .library(name: "Fluent", targets: ["Fluent"]), ], dependencies: [ - .package(url: "https://github.com/vapor/fluent-kit.git", from: "1.48.4"), + .package(url: "https://github.com/vapor/fluent-kit.git", from: "1.49.0"), .package(url: "https://github.com/vapor/vapor.git", from: "4.101.0"), ], targets: [ @@ -38,6 +38,10 @@ let package = Package( ) var swiftSettings: [SwiftSetting] { [ + .enableUpcomingFeature("ExistentialAny"), .enableUpcomingFeature("ConciseMagicFile"), .enableUpcomingFeature("ForwardTrailingClosures"), + .enableUpcomingFeature("ImportObjcForwardDeclarations"), + .enableUpcomingFeature("DisableOutwardActorInference"), + .enableExperimentalFeature("StrictConcurrency=complete"), ] } diff --git a/Package@swift-5.9.swift b/Package@swift-5.9.swift deleted file mode 100644 index 3b4afba6..00000000 --- a/Package@swift-5.9.swift +++ /dev/null @@ -1,47 +0,0 @@ -// swift-tools-version:5.9 -import PackageDescription - -let package = Package( - name: "fluent", - platforms: [ - .macOS(.v10_15), - .iOS(.v13), - .watchOS(.v6), - .tvOS(.v13), - ], - products: [ - .library(name: "Fluent", targets: ["Fluent"]), - ], - dependencies: [ - .package(url: "https://github.com/vapor/fluent-kit.git", from: "1.48.4"), - .package(url: "https://github.com/vapor/vapor.git", from: "4.101.0"), - ], - targets: [ - .target( - name: "Fluent", - dependencies: [ - .product(name: "FluentKit", package: "fluent-kit"), - .product(name: "Vapor", package: "vapor"), - ], - swiftSettings: swiftSettings - ), - .testTarget( - name: "FluentTests", - dependencies: [ - .target(name: "Fluent"), - .product(name: "XCTFluent", package: "fluent-kit"), - .product(name: "XCTVapor", package: "vapor"), - ], - swiftSettings: swiftSettings - ), - ] -) - -var swiftSettings: [SwiftSetting] { [ - .enableUpcomingFeature("ExistentialAny"), - .enableUpcomingFeature("ConciseMagicFile"), - .enableUpcomingFeature("ForwardTrailingClosures"), - .enableUpcomingFeature("ImportObjcForwardDeclarations"), - .enableUpcomingFeature("DisableOutwardActorInference"), - .enableExperimentalFeature("StrictConcurrency=complete"), -] } diff --git a/Sources/Fluent/FluentProvider.swift b/Sources/Fluent/FluentProvider.swift index 6a02d882..3e3e7d9e 100644 --- a/Sources/Fluent/FluentProvider.swift +++ b/Sources/Fluent/FluentProvider.swift @@ -137,6 +137,10 @@ extension Application { func shutdown(_ application: Application) { application.databases.shutdown() } + + func shutdownAsync(_ application: Application) async { + await application.databases.shutdownAsync() + } } let application: Application diff --git a/Tests/FluentTests/SessionTests.swift b/Tests/FluentTests/SessionTests.swift index efe4fd2c..8a611bb2 100644 --- a/Tests/FluentTests/SessionTests.swift +++ b/Tests/FluentTests/SessionTests.swift @@ -113,4 +113,8 @@ struct StaticDatabase: DatabaseConfiguration, DatabaseDriver { func shutdown() { // Do nothing. } + + func shutdownAsync() async { + // Do nothing + } }