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

[SUGGESTION] please set config:timeout default to false #255

Open
SegFaulty opened this issue May 1, 2023 · 2 comments
Open

[SUGGESTION] please set config:timeout default to false #255

SegFaulty opened this issue May 1, 2023 · 2 comments

Comments

@SegFaulty
Copy link

in a fresh installation, with default setting we get:

Deprecated: The "timeout" configuration is deprecated and will be removed with the next major update. Set the "timeout" configuration to false and if needed use the set_timeout_limit() function in your own code. in ..vendor/rakibtg/sleekdb/src/Store.php on line 748

but if one use the default settings, there should no deprecation message.

now we have to supply:

$configuration = [
				'timeout' => false, // suppres deprecation message
			];

suggested fix:

class Store
{
...
  protected $timeout = 120;```
To
`protected $timeout = false;`
@Timu57
Copy link
Member

Timu57 commented May 15, 2023

Hi @SegFaulty
Thank you for your suggestion. We intentionally didn't change the old default setting, because that would be a breaking change. The timeout configuration will be removed with the next major update. Until then we need to ensure backwards compatibility.

@designermonkey
Copy link

The problem here is that you are testing for timeout = false in the configuration, which is triggering a deprecation error even if we don't set a timeout value.

IMO, this isn't backwards compatible at all, as a deprecation error is not the previous behaviour.

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

No branches or pull requests

3 participants