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

Add a options to fix ignore "expire within" error #148

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lijialong1313
Copy link

This PR is want to be fix about this:

save

This error is the same as "the password will expire within" but not ignore. So I write this to let different country use different localized oracle databases can ignore as same as the English version.

I am sorry that I do't use this in a long time, so make some error about the old pr.

This error is the same as "the password will expire within" but not ignore. So I write this to let different country use different localized oracle databases can ignore as same as the English version.
fix format
@yajra
Copy link
Owner

yajra commented Nov 18, 2024

Thank you for the PR. Can you please provide some snippets on how to use this feature? I think the ignore error messages will be added in the config?

@lijialong1313
Copy link
Author

Thank you for the PR. Can you please provide some snippets on how to use this feature? I think the ignore error messages will be added in the config?

Yes, It will be added in the options like this.

            'options' => [
                'ignore_error_messages'=>[
                    'the password will expire within',
                    '天之后口令'
                ]
            ],

In some cases that the Oracle Exception may be displayed as more than one language, so I set this config as an array. The full config can be like the image below.

02

if (! str_contains($e['message'], 'the password will expire within')) {
$ignoreMessageList = array_key_exists('ignore_error_messages', $options) ? $options['ignore_error_messages'] : ['the password will expire within'];

$flag = true;
Copy link
Owner

@yajra yajra Nov 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we rename this to $throwError for easier review in the future?

Other than this, the changes look good. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants