Vapor v4.36.0 Release Notes

Release Date: 2020-11-27 // 11 months ago
  • 🚀 ###### This patch was authored and released by @Mordil.

    As reported by #2480, right now SessionData is a public type without much use to developers to write middleware, algorithms, etc. on top of due to how strongly the storage is encapsulated.

    SessionData has been changed as follows:

    • Now conforms to Equatable and ExpressibleByDictionaryLiteral
    • A new snapshot computed property is available to get a copy of its storage
    • 🗄 init(_:) is now deprecated in favor of init(initialData:)

      let data: SessionData = ["name": "Vapor"]// creates a copy of the data as of this pointlet snapshot = data.snapshotclient.storeUsingDictionary(snapshot)

Previous changes from v4.35.0

  • 🚀 ###### This patch was authored and released by @gwynne.

    🌲 Previously, all requests received by Vapor would always be logged unconditionally at the .info log level, with no means available to control or disable it.

    🚚 This logging has been moved to an enabled-by-default middleware. Users can remove the RouteLoggingMiddleware from Application.middleware to prevent any route logging from taking place.