Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(deps): update dependency vapor/vapor to v4.108.0 (#1404)
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [vapor/vapor](https://redirect.github.com/vapor/vapor) | minor | `4.107.0` -> `4.108.0` | --- ### Release Notes <details> <summary>vapor/vapor (vapor/vapor)</summary> ### [`v4.108.0`](https://redirect.github.com/vapor/vapor/releases/tag/4.108.0): - Make Services in Vapor Usable [Compare Source](https://redirect.github.com/vapor/vapor/compare/4.107.0...4.108.0) #### What's Changed Make Services in Vapor Usable by [@​0xTim](https://redirect.github.com/0xTim) in [#​2901](https://redirect.github.com/vapor/vapor/issues/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: > > ```swift > protocol MyService { > func `for`(_ request: Request) -> MyService > func doSomething() -> String > } > ``` > > You may then have a real implementation: > > ```swift > 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. > > ```swift > extension Application.Services { > var myService: Application.Service<MyService> { > .init(app… > ``` > > … #### Reviewers Thanks to the reviewers for their help: - [@​Joannis](https://redirect.github.com/Joannis) - [@​dimitribouniol](https://redirect.github.com/dimitribouniol) - [@​Andrewangeta](https://redirect.github.com/Andrewangeta) ###### *This patch was released by [@​0xTim](https://redirect.github.com/0xTim)* **Full Changelog**: vapor/vapor@4.107.0...4.108.0 </details> --- ### 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. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC45NC4xIiwidXBkYXRlZEluVmVyIjoiMzguOTQuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==--> Co-authored-by: cgrindel-self-hosted-renovate[bot] <139595543+cgrindel-self-hosted-renovate[bot]@users.noreply.github.com> Co-authored-by: Chuck Grindel <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information