Skip to content
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

✨ New constructors for EmailAddress #671

Closed
12 tasks
LVMVRQUXL opened this issue Jun 20, 2024 · 1 comment
Closed
12 tasks

✨ New constructors for EmailAddress #671

LVMVRQUXL opened this issue Jun 20, 2024 · 1 comment
Labels
common Item related to all platforms. feature New feature or request.

Comments

@LVMVRQUXL
Copy link
Contributor

LVMVRQUXL commented Jun 20, 2024

πŸ“ Description

Similarly to #670, we want to replace existing factory functions by constructors and orNull functions. New constructors should be accessible easily from Kotlin and Java code, but orNull functions should be only accessible from Kotlin code.

Here's the Application Programming Interface (API) goal:

class EmailAddress {
    constructor(text: String)
    constructor(text: String, pattern: String)
    companion object {
        @JvmSynthetic fun orNull(text: String): EmailAddress?
        @JvmSynthetic fun orNull(text: String, pattern: String): EmailAddress?
    }
}

βœ… Checklist

  • ✨ Add the constructor accepting a single String argument with tests, documentation and samples.
  • ✨ Add the orNull(String) function only for Kotlin with tests, documentation and samples.
  • πŸ“ Refer to the constructor accepting a single String argument and the orNull(String) function in their respective documentation.
  • ✨ Add the constructor accepting two String arguments with tests, documentation and samples.
  • ✨ Add the orNull(String, String) function only for Kotlin with tests, documentation and samples.
  • πŸ“ Refer to the constructor accepting two String arguments and the orNull(String, String) function in their respective documentation.
  • πŸ”₯ Remove the orNull(Any) function introduced by ✨ New orNull and orThrow functions for EmailAddressΒ #669.
  • πŸ”₯ Remove the fromString(Any) function.
  • πŸ”₯ Remove the fromString(Any, Any) function.
  • πŸ”₯ Remove the fromStringOrNull(Any) function.
  • πŸ”₯ Remove the fromStringOrNull(Any, Any) function.
  • πŸ“ Update the unreleased changelog for this issue.
@LVMVRQUXL LVMVRQUXL added feature New feature or request. common Item related to all platforms. labels Jun 20, 2024
@LVMVRQUXL LVMVRQUXL added this to the 4.6.0 milestone Jun 20, 2024
@LVMVRQUXL
Copy link
Contributor Author

Superseded by #675.

@LVMVRQUXL LVMVRQUXL closed this as not planned Won't fix, can't repro, duplicate, stale Jul 8, 2024
@LVMVRQUXL LVMVRQUXL removed this from the 4.5.2 milestone Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
common Item related to all platforms. feature New feature or request.
Projects
None yet
Development

No branches or pull requests

1 participant