Skip to content

fix: align token morphs and tests with UUID keys and integer proficiency - #32

Merged
berna39 merged 9 commits into
devfrom
14-créer-un-environnement-de-développement-local-docker-pour-le-projet
Oct 30, 2026

Hidden character warning

The head ref may contain hidden characters: "14-cr\u00e9er-un-environnement-de-d\u00e9veloppement-local-docker-pour-le-projet"
Merged

berna39 merged 9 commits into
devfrom
14-créer-un-environnement-de-développement-local-docker-pour-le-projet

Conversation

@gracieuxsikuly

Copy link
Copy Markdown
Contributor
  • use uuidMorphs for personal_access_tokens.tokenable (users have UUID PKs)
  • use integer proficiency levels (1-5) in ProfileServiceTest
  • use a UUID for the missing-user case in AuthServiceTest
  • add libsqlite3-dev to the Dockerfile so pdo_sqlite builds

github-actions[bot] and others added 6 commits August 1, 2026 11:25
- use uuidMorphs for personal_access_tokens.tokenable (users have UUID PKs)
- use integer proficiency levels (1-5) in ProfileServiceTest
- use a UUID for the missing-user case in AuthServiceTest
- add libsqlite3-dev to the Dockerfile so pdo_sqlite builds
@gracieuxsikuly
gracieuxsikuly requested a review from berna39 October 6, 2026 08:35
@gracieuxsikuly

Copy link
Copy Markdown
Contributor Author

@berna39

{
Schema::create('personal_access_tokens', function (Blueprint $table) {
$table->id();
$table->morphs('tokenable');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For this we might need a new migration file that updates the column type. And we need to manage the transaction between all ongoing sessions that already have a "tokenable" in type "morphs"

… migration

Keep morphs() on the existing personal_access_tokens table and add a follow-up migration that revokes integer-backed sessions before switching tokenable to uuidMorphs.
@github-actions

Copy link
Copy Markdown

Code Coverage

Package Line Rate Complexity Health
Enums/LinkType.php 50% 10 ❌
Enums/ProfileAccountStatus.php 0% 0 ❌
Enums/UserRole.php 0% 0 ❌
Exceptions/InvalidOAuthCodeException.php 100% 1 ✔
Http/Controllers/Api/V1/AuthController.php 90% 10 ✔
Http/Controllers/Api/V1/CategoryController.php 100% 5 ✔
Http/Controllers/Api/V1/ProfileController.php 95% 8 ✔
Http/Controllers/Api/V1/SkillController.php 100% 5 ✔
Http/Controllers/Api/V1/UserController.php 100% 1 ✔
Http/Controllers/Controller.php 0% 0 ❌
Http/Controllers/Web/WebAuthController.php 100% 4 ✔
Http/Middleware/EnsureUserIsAdmin.php 0% 3 ❌
Http/Middleware/ForceJsonResponse.php 100% 1 ✔
Http/Requests/SearchProfilesRequest.php 0% 4 ❌
Http/Requests/UpdateProfileRequest.php 72% 12 ❌
Http/Requests/ValidateProfileRequest.php 100% 2 ✔
Http/Resources/SkillListResource.php 100% 1 ✔
Mail/WelcomeUserMail.php 100% 4 ✔
Models/BaseModel.php 100% 1 ✔
Models/Category.php 100% 4 ✔
Models/Profile.php 75% 5 ❌
Models/Project.php 100% 1 ✔
Models/Skill.php 57% 4 ❌
Models/SkillProfile.php 0% 0 ❌
Models/User.php 88% 4 ➖
Providers/AppServiceProvider.php 100% 2 ✔
Providers/TelescopeServiceProvider.php 80% 4 ➖
Services/AuthService.php 98% 13 ✔
Services/MailService.php 100% 1 ✔
Services/ProfileService.php 86% 14 ➖
Summary 85% (312 / 369) 124 ➖

Minimum allowed line rate is 80%

@gracieuxsikuly

Copy link
Copy Markdown
Contributor Author

@berna39

@berna39
berna39 merged commit 072d1f4 into dev Oct 30, 2026
3 checks passed
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