8000 Method capitalization incorrect between code, readme and stubs · Issue #2660 · phpredis/phpredis · GitHub
[go: up one dir, main page]

Skip to content

Method capitalization incorrect between code, readme and stubs #2660

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

Open
kkmuffme opened this issue May 19, 2025 · 2 comments
Open

Method capitalization incorrect between code, readme and stubs #2660

kkmuffme opened this issue May 19, 2025 · 2 comments

Comments

@kkmuffme
Copy link

https://github.com/phpredis/phpredis#hmset

https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1827C17-L1827C31
$redis->hmset(

https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1829
hMset

https://github.com/phpredis/phpredis?tab=readme-ov-file#hmset
hMSet

There are 3 differently capitalized versions of this command (and various others). While this isn't an issue with PHP, it results in various code style tools and IDEs to report errors for capitalization.

@michael-grunder
Copy link
Member

While this isn't an issue with PHP, it results in various code style tools and IDEs to report errors for capitalization.

I've run into this too e.g. with intelephense/phpstan in vim complaining that hmset isn't a method but hMSet is. Honestly I kind of feel like that's a bug in the linter since PHP method names are not case sensitive.

I'm fine with moving toward normalization but the problem is how should they be normalized. All lowercase is harder to read but there are so many server commands with various naming strategies that we probably can't get to completely consistent camel casing for every one of them.

I guess the upside if we change them is that it could be done with a program.

@kkmuffme
Copy link
Author

like that's a bug in the linter since PHP method names are not case sensitive.

It definitely is, however it's unfortunately something that was/is present in some circumstances in psalm, phpstan and phpstorm in static analysis, but as well as for purely code style reporting

can't get to completely consistent camel casing for every one of them.

Which ones specifically?

I think how it's done in the headlines of readme makes most sense, since that is what people generally check first and also seems to be consistent/make sense

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

2 participants
0