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

Add Vapor 3 API shims #2373

Merged
merged 5 commits into from Jun 26, 2020
Merged

Add Vapor 3 API shims #2373

merged 5 commits into from Jun 26, 2020

Conversation

tanner0101
Copy link
Member

@tanner0101 tanner0101 commented May 28, 2020

Adds _Vapor3 module that contains deprecations for Vapor 3 APIs (#2373).

To use this module, add the product as a dependency to your App target in Package.swift. For example:

.target(name: "App", dependencies: [
    .product(name: "Vapor", package: "vapor"),
    .product(name: "_Vapor3", package: "vapor"),
]),

Then import the _Vapor3 module to enable deprecations.

import Vapor
import _Vapor3

...

app.get("test") { req -> Future<String> in
//                       ^~~~~~
// 'Future' is deprecated: renamed to 'EventLoopFuture'
    ...
}

Note: This module only deprecates part of the Vapor 3 API. Some things are missing and not everything can be deprecated. If you'd like to add something, please open up a PR!

@tanner0101 tanner0101 added enhancement New feature or request semver-minor Contains new API labels May 28, 2020
@MrLotU
Copy link
Sponsor Member

MrLotU commented May 29, 2020

Should we follow the NIO naming scheme here and name it _Vapor3APIShims?

@tanner0101 tanner0101 merged commit dc2aa1e into master Jun 26, 2020
@tanner0101 tanner0101 added this to Done in Vapor 4 via automation Jun 26, 2020
@tanner0101 tanner0101 deleted the tn-vapor3-shims branch June 26, 2020 18:34
@tanner0101
Copy link
Member Author

These changes are now available in 4.14.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request semver-minor Contains new API
Projects
Vapor 4
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants