Skip to content

Fix template for Vapor 5 Beta 4 - #181

Merged
0xTim merged 25 commits into
vapor:vapor5from
fpseverino:argument-parser
Oct 16, 2026
Merged

0xTim merged 25 commits into
vapor:vapor5from
fpseverino:argument-parser

Conversation

@fpseverino

@fpseverino fpseverino commented Sep 28, 2026 •

Copy link
Copy Markdown
Member
  • Switch from Environment.get to Swift Configuration
  • Update VaporTesting code
  • Adds the devcontainer folder to the template manifest so that the Toolbox adds it to the project
  • Fix CI and add a linting check

@fpseverino
fpseverino marked this pull request as ready for review October 14, 2026 17:07
@fpseverino fpseverino changed the title Add subcommands Fix template for Vapor 5 Beta 4 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) }
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@fpseverino fpseverino mentioned this pull request Oct 15, 2026

@0xTim 0xTim left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We actually should probably provide this, but we can do it in a different PR

@fpseverino
fpseverino requested a review from 0xTim October 16, 2026 13:37
@0xTim
0xTim merged commit 113856d into vapor:vapor5 Oct 16, 2026
7 of 9 checks passed
@fpseverino
fpseverino deleted the argument-parser branch October 16, 2026 15:57
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.

2 participants