Skip to content

Make Translation::offsetExists reflect real translation keys #15

Description

@javihgil

Problem

Translation::offsetExists() currently always returns true.

Current behavior

Consumers using isset($translation['locale']) cannot tell whether a translation exists for that locale.

Expected behavior

offsetExists() should return true only when the requested key is actually present in the translation payload.

Notes

This breaks the usual ArrayAccess contract and can lead to incorrect fallback logic in consumers that rely on isset().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions