Skip to content

Phoenix.Presence.get_by_key/2 typespec, return values, and documentation are inconsistent #5759

@jaminthorns

Description

@jaminthorns

Environment

  • Elixir version (elixir -v): 1.16.1
  • Phoenix version (mix deps): 1.7.11
  • Operating system: macOS 14.4 (23E214)

Actual behavior

Issue #4514 was never properly addressed. The commit 3c7f494 says that it addressed the issue, but it only updated the typespec of get_by_key/2 to something that is still inconsistent with the implementation and the example.

Expected behavior

I'll defer to the referenced issue for full explanation and possible solutions, since the author did a great job of breaking down the issue, and I agree with their proposed solutions.

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