Skip to content

Make key names case-insensitive in PHP #71

@prateek-kumar-improving

Description

@prateek-kumar-improving

Make sure the keys like refresh_topology_from_initial_nodes are case insensitive when passed by the user.

Currently, these keys are case sensitive. It won't get picked up if the casing doesn't match. For now, the constant makes it easier to do this safely but doesn't guarantee it.

For now these keys are required to be passed as lower case for the code to work:
• refresh_topology_from_initial_nodes
• connection_timeout
• use_insecure_tls
• host, port
• username, password
• type, key
Note: There might be more keys that are case sensitive. Search the code again.

Possible solution:

  1. iterate over the keys in the hash and compare them case-insensitively against known keys.
  2. Check if possible to make this work using some built-in Zend way.

Evaluate other solutions as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions