Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[13.x] battle harden when scheme is present in the config#60237

Open
DGarbs51 wants to merge 3 commits into
13.xfrom
phpredis-scheme-protection
Open

[13.x] battle harden when scheme is present in the config#60237
DGarbs51 wants to merge 3 commits into
13.xfrom
phpredis-scheme-protection

Conversation

@DGarbs51
Copy link
Copy Markdown
Contributor

Currently if the scheme key is set in the redis config it will be appended on to the host, regardless of whether the host includes a scheme or not.

This will ensure schemes match if they are present in both, instead of simply appending and breaking.

@DGarbs51 DGarbs51 changed the title battle harden when scheme is present in the config [13.x] battle harden when scheme is present in the config May 22, 2026
Comment on lines 265 to 266
* @param array $options
* @return string
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
* @param array{host?: mixed, scheme?: mixed} $options
* @return string
*
* @phpstan-return ($options is array{host: string} ? ($options is array{host: non-empty-string} ? string: never) : never)

or

Suggested change
* @param array{host?: non-empty-string, scheme?: string} $options
* @return string

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