Repository navigation
Fix template for Vapor 5 Beta 4 - #181
Merged
Merged
Conversation
fpseverino
marked this pull request as ready for review
October 14, 2026 17:07
fpseverino
commented
Oct 15, 2026
Comment on lines
+65
to
+76
| /// If the `withApp` test trait is enabled, you can get here | ||
| /// a fresh instance of your Vapor application for each test. | ||
| private var app: Application { | ||
| get throws { try #require(_application) } | ||
| } | ||
| {{#fluent}} | ||
|
|
||
| /// If the `withApp` test trait is enabled, you can access your database here. | ||
| /// Migrations are run before and reverted after each test. | ||
| private var database: any Database { | ||
| get throws { try #require(_database) } | ||
| } |
Member
Author
There was a problem hiding this comment.
I moved them here and made them private because while updating the code I constantly used them inadvertently inside the AppTrait, and that should never happen, so I figured that this way if users need to update the trait they don't risk making the same error
Open
0xTim
requested changes
Oct 16, 2026
0xTim
left a comment
Member
There was a problem hiding this comment.
Looks good, we just need to fix the CI for the bare template option
| ${{ matrix.fluentflags }} ${{ matrix.leafflags }} | ||
| ${{ matrix.fluentflags }} | ||
| - name: Read swift-format config file | ||
| # The template currently does not provide a `.swift-format` file, so we use the one from `vapor/contributing`. |
Member
There was a problem hiding this comment.
We actually should probably provide this, but we can do it in a different PR
0xTim
approved these changes
Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Environment.getto Swift Configuration