Skip to content

feat: implement deleteUser in Infra layer / Infra層のdeleteUser実装#521

Merged
zigzagdev merged 3 commits into
feat/user-deletefrom
feat/user-delete_infra-layer
Jul 3, 2026
Merged

feat: implement deleteUser in Infra layer / Infra層のdeleteUser実装#521
zigzagdev merged 3 commits into
feat/user-deletefrom
feat/user-delete_infra-layer

Conversation

@zigzagdev

Copy link
Copy Markdown
Owner

Motivation / 目的

Implement the repository layer for deleting user data as part of the User Delete API (#514).

ユーザー削除APIのInfra層(#515)として、ユーザーデータを削除するリポジトリ層を実装しました。

What I have done / 実施内容

  • UserRepositroyInterface: deleteUser(int $id): void を追加
  • UserRepository: deleteUser を実装
    • IDでユーザーを検索し、存在しない場合は Exception('User not found.') をスロー
    • delete() でレコードを削除
  • UserRepositoryTest: DBインテグレーションテストを2件追加

Test Results / テスト結果

  • test_deleteUser_removes_user_when_exists
  • test_deleteUser_throws_exception_when_user_not_found

Closes #515

@zigzagdev zigzagdev left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Ok

@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.01%. Comparing base (07483b1) to head (dd244d5).
⚠️ Report is 4 commits behind head on feat/user-delete.

Additional details and impacted files

Impacted file tree graph

@@                  Coverage Diff                   @@
##             feat/user-delete     #521      +/-   ##
======================================================
+ Coverage               59.94%   60.01%   +0.06%     
- Complexity               1515     1519       +4     
======================================================
  Files                     120      120              
  Lines                    7765     7778      +13     
======================================================
+ Hits                     4655     4668      +13     
  Misses                   3110     3110              
Files with missing lines Coverage Δ
.../app/Packages/Domains/Tests/UserRepositoryTest.php 100.00% <100.00%> (ø)
src/app/Packages/Domains/UserRepository.php 97.43% <100.00%> (+0.37%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@zigzagdev zigzagdev merged commit 97ca0bf into feat/user-delete Jul 3, 2026
27 checks passed
@zigzagdev zigzagdev deleted the feat/user-delete_infra-layer branch July 3, 2026 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: implement deleteUser in Infra layer / Infra層のdeleteUser実装

1 participant