-
Notifications
You must be signed in to change notification settings - Fork 30
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
Framework agnostic approach #38
base: master
Are you sure you want to change the base?
Framework agnostic approach #38
Conversation
…amework library, small docblock updates, removed unused imports
…amework library, small docblock updates, removed unused imports
@@ -45,13 +41,4 @@ private function getDriverOptions(bool $isMainNet): array | |||
?: $this->mainnet | |||
?: []; | |||
} | |||
|
|||
public static function __set_state(array $state): DriverConfig |
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.
seems like there is not usage for this magic method in a code anymore. feel free to correct me if I missed something
} | ||
|
||
public static function make(CurrencyEnum $currency): Validator | ||
public static function make(CurrencyEnum $currency, bool $isMainnet = true, ?array $config = null): self |
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.
since this factory method copies current construct method I was thinking if it would make sense to remove it. But I left it here for backwards compatibility reasons. Maybe we can docblock it with @deprecated to encourage developers to use constructor instead?
Hi,
we are using your package in our project to validate crypto addresses on our infrastructure layer for our request DTOs. Thank you for maintaining this project, so far we were really happy to work with it.
We decided to upgrade our dependencies but this one kept throwing composer error messages from version 2.0.X. So I checked it and it seems that the package is tightly coupled with laravel/framework package. Which is quite unfortunate if you want to use it as a standalone package in your non-framework project or project where you use Symfony, Nette, Yii, CakePHP etc. I must say that it's not desirable to fetch whole laravel/framework lib because of few lines of code.
So I made some changes to make things more flexible and make it possible for other people to use the package however they want.
So it can be used right now like this:
Validator::make('BTC', app()->isProduction())
or
Validator::make('BTC', $this->featureFlag->isTestnet())
etc, etc.
If you have any questions feel free to hit me up.