Skip to content

Comments

[1.x] Implement DIP for phone/landline validators.#124

Closed
mra9994 wants to merge 1 commit intomilwad-dev:1.xfrom
mra9994:refactor/utils
Closed

[1.x] Implement DIP for phone/landline validators.#124
mra9994 wants to merge 1 commit intomilwad-dev:1.xfrom
mra9994:refactor/utils

Conversation

@mra9994
Copy link
Contributor

@mra9994 mra9994 commented Feb 11, 2026

Summary

This PR restructures the phone/landline validator to comply with the Dependency Inversion and Clean Architecture by separating abstraction from low-level implementation.

Changes

  • Moved:
    • CountryLandlineValidator
    • CountryPhoneValidator
  • Placed interfaces at a higher level

Reference

A similar approach is used by Mr Iman Ghafoori in package laravel-widgetize

NormalizerContract.php is located at a higher level and separated from the Normalizers directory.

@milwad-dev
Copy link
Owner

I can't see the benefits of these changes!

@milwad-dev
Copy link
Owner

I think it’s fine as it is.

@milwad-dev milwad-dev closed this Feb 14, 2026
@milwad-dev milwad-dev changed the title refactor: implement DIP for phone/landline validators. [1.x] Implement DIP for phone/landline validators. Feb 14, 2026
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