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

Update dependency vapor/vapor to from: "4.108.0" #975

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Dec 16, 2024

This PR contains the following updates:

Package Update Change
vapor/vapor minor from: "4.107.0" -> from: "4.108.0"

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

vapor/vapor (vapor/vapor)

v4.108.0: - Make Services in Vapor Usable

Compare Source

What's Changed

Make Services in Vapor Usable by @​0xTim in #​2901

This adds real support to Vapor to make it easy to integrate different services that can be tested.

For example, if you have a service defined as:

protocol MyService {
    func `for`(_ request: Request) -> MyService
    func doSomething() -> String
}

You may then have a real implementation:

import Vapor

struct MyRealService: MyService {
    let logger: Logger
    let eventLoop: EventLoop
    
    func `for`(_ request: Vapor.Request) -> MyService {
        return MyRealService(logger: request.logger, eventLoop: request.eventLoop)
    }
    
    func doSomething() -> String {
        return "Tada"
    }
    
}

This is a very contrived example, but shows a service that needs a Logger and EventLoop - things that are normally tied to specific requests. Doing this in a safe and testable way involves a lot of boilerplate. This moves the boilerplate into Vapor to make it easier to do.

extension Application.Services {
    var myService: Application.Service<MyService> {
        .init(app

Reviewers

Thanks to the reviewers for their help:

This patch was released by @​0xTim

Full Changelog: vapor/vapor@4.107.0...4.108.0


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot enabled auto-merge (squash) December 16, 2024 18:26
@renovate renovate bot merged commit b666e6d into master Dec 16, 2024
1 check passed
@renovate renovate bot deleted the renovate/vapor-vapor-4.x branch December 16, 2024 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants