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

⏪️ Restore factory functions of Zero and EmailAddress to v4.5.1 #681

Closed
9 tasks done
Tracked by #682 ...
LVMVRQUXL opened this issue Jul 15, 2024 · 0 comments
Closed
9 tasks done
Tracked by #682 ...
Assignees
Labels
common Item related to all platforms. feature New feature or request.
Milestone

Comments

@LVMVRQUXL
Copy link
Contributor

LVMVRQUXL commented Jul 15, 2024

📝 Description

We want to restore factory functions introduced for the Zero and the EmailAddress types in the version 4.5.1, instead of those introduced for the version 4.5.2, for taking more time to think about the right way for creating instances of a type.

class Zero constructor() {
    companion object {
        fun fromByte(number: Byte): Zero = TODO()
        fun fromByteOrNull(number: Byte): Zero? = TODO()
    }
}

class EmailAddress {
    companion object {
        fun fromString(value: Any): EmailAddress = TODO()
        fun fromString(value: Any, pattern: Any): EmailAddress = TODO()
        fun fromStringOrNull(value: Any): EmailAddress? = TODO()
        fun fromStringOrNull(value: Any, pattern: Any): EmailAddress? = TODO()
    }
}

✅ Checklist

  • ⏪ Restore the Zero.Companion.fromByte(Byte) function with tests, documentation and samples.
  • ⏪ Restore the Zero.Companion.fromByteOrNull(Byte) function with tests, documentation and samples.
  • 🔥 Remove all other factory functions added for the Zero type.
  • ⏪ Restore the EmailAddress.Companion.fromString(Any) function with tests, documentation and samples.
  • ⏪ Restore the EmailAddress.Companion.fromStringOrNull(Any) function with tests, documentation and samples.
  • ⏪ Restore the EmailAddress.Companion.fromString(Any, Any) function with tests, documentation and samples.
  • ⏪ Restore the EmailAddress.Companion.fromStringOrNull(Any, Any) function with tests, documentation and samples.
  • 🔥 Remove all other factory functions added for the EmailAddress type.
  • 📝 Update the unreleased changelog for this issue.
@LVMVRQUXL LVMVRQUXL added feature New feature or request. common Item related to all platforms. labels Jul 15, 2024
@LVMVRQUXL LVMVRQUXL added this to the 4.5.2 milestone Jul 15, 2024
@LVMVRQUXL LVMVRQUXL self-assigned this Jul 16, 2024
LVMVRQUXL added a commit that referenced this issue Jul 16, 2024
Restores this function with improved documentation and samples.
LVMVRQUXL added a commit that referenced this issue Jul 16, 2024
Also converts the `Zero()` constructor as a primary one and removes the unused `InvalidZeroRepresentation` internal type.
@LVMVRQUXL LVMVRQUXL changed the title ⏪️ Revert factory functions of Zero and EmailAddress to v4.5.1 ⏪️ Restore factory functions of Zero and EmailAddress to v4.5.1 Jul 17, 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