datamweb / shield-oauth

OAuth for CodeIgniter Shield
https://www.shield-oauth.codeigniter4.ir/
MIT License
61 stars 16 forks source link

feat: add 'allow_register' to $oauthConfigs for drivers #112

Closed warcooft closed 6 months ago

warcooft commented 6 months ago

See #103 I made a small addition to this PR to provide option 'allow_register' on configuration file so that developers can freely choose whether to allow users to auto-register or not. The default value for 'allow_register' is set to true.

warcooft commented 6 months ago

Hi @datamweb Idk why PHPStan still notice Error: Ignored error pattern #^Method Datamweb\\ShieldOAuth\\Controllers\\OAuthController\:\:syncingUserInfo\(\) has parameter \$updateFildes with no value type specified in iterable type array\.$# in path /home/runner/work/shield-oauth/shield-oauth/src/Controllers/OAuthController.php was not matched in reported errors.

I tried to fix the problem by referring to this link https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type but it didn't work.

datamweb commented 6 months ago

Hi @warcooft, Try to fix it with delete the following lines. https://github.com/datamweb/shield-oauth/blob/1f17cadf9146972517cef8b724bd43bdedb338f7/phpstan-baseline.php#L35-L44

datamweb commented 6 months ago

@warcooft Thank you very much for your help in improving the package.