feat: implement Presentation layer for User Login and introduce mago lint / ユーザーログインのPresentation層実装とmago lint導入#534
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feat/user-login #534 +/- ##
=====================================================
+ Coverage 61.22% 61.64% +0.42%
- Complexity 1569 1581 +12
=====================================================
Files 129 131 +2
Lines 8048 8138 +90
=====================================================
+ Hits 4927 5017 +90
Misses 3121 3121
🚀 New features to boost your workflow:
|
- Narrow source path to app/Packages only - Disable false-positive rules: no-literal-password, no-empty, no-nested-ternary, prefer-first-class-callable, block-statement, class-name - Raise cyclomatic-complexity threshold to 60, excessive-parameter-list to 25, too-many-methods to 30
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.
Motivation / 目的
Implement the Presentation layer for the User Login API (#405) and introduce mago as a static analysis tool for CI.
ユーザーログインAPI(#405)のPresentation層を実装し、静的解析ツールとしてmago lintをCIに導入しました。
What I have done / 実施内容
Presentation layer
AuthController:POST /api/v1/user/loginのアクションを実装200+{ token, token_type: "Bearer" }401500routes/api.php:/v1/user/loginルートを登録、Route::controller()でルートをグループ化Static Analysis
mago.toml: lintベースの静的解析設定を追加app,config,database,routes.github/workflows/static_analysis.yml: PR時にmago lintを実行するCIワークフローを追加Other
.gitignore:.composerを追加(Dockerコンテナが生成するキャッシュを除外)Test Results / テスト結果
Integration tests hitting the real DB:
test_login_returns_200_with_token_on_valid_credentialstest_login_returns_401_when_user_not_foundtest_login_returns_401_on_wrong_passwordCloses #528