-
Notifications
You must be signed in to change notification settings - Fork 1
3 86c34dha8 clerk step #46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Pull Request Test Coverage Report for Build 17382198860Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces Clerk authentication integration with application type awareness. The changes add support for configuring Clerk credentials based on whether the application serves mobile, web, or multiplatform clients, and reorganizes the initialization flow to determine application type before authentication configuration.
- Adds AppTypeEnum to categorize application types (Mobile, Web, Multiplatform)
- Updates Clerk authentication setup to conditionally include CLERK_ALLOWED_ORIGINS based on app type
- Reorders the initialization flow to ask for application type before authentication type
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
src/Enums/AppTypeEnum.php | Defines new enum for application types with Mobile, Web, and Multiplatform values |
src/Commands/InitCommand.php | Updates initialization flow and adds conditional Clerk configuration logic |
tests/InitCommandTest.php | Updates test expectations to match new question order and adds new test for Clerk mobile app scenario |
tests/fixtures/InitCommandTest/*.yml | Updates fixture files to include new Clerk credential environment variables |
tests/fixtures/InitCommandTest/*.md | Updates README fixture files with Clerk authentication documentation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
src/Commands/InitCommand.php
Outdated
$lines[] = "\n{$key}{$separator}{$value}"; | ||
$item = "{$key}{$separator}{$value}"; | ||
|
||
if (Str::before($key, '_') === Str::before($previousKey, '_')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comparison will fail on the first iteration when $previousKey
is null. The Str::before()
method will return the entire string when the delimiter is not found, but comparing with null will cause unexpected behavior.
if (Str::before($key, '_') === Str::before($previousKey, '_')) { | |
if ($previousKey !== null && Str::before($key, '_') === Str::before($previousKey, '_')) { |
Copilot uses AI. Check for mistakes.
No description provided.