Skip to content

iterable type for event properties leads to exception in PhpStan #71

Closed

Description

@zeleznypa

Using iterable static type for event properties leads to Cannot access an offset on iterable<callable> exception in PhpStan

see: https://phpstan.org/r/d30bcff2-9ead-47d8-9a90-1e2a5443f39e

Activity

  1. zeleznypa commented on Jan 26, 2023

    @zeleznypa
    Author

    As @ondrejmirtes wrote in Pehapkari Slack:

    Because iterable is an array|Traversable. And o Traversable is not safe to do $foo[] = …

  2. added 2 commits that reference this issue on Jan 26, 2023
    ed25974
    b582051
  3. added a commit that references this issue on Feb 7, 2023
    1879882
  4. added 2 commits that reference this issue on Mar 2, 2023
    1877378
    e798121
  5. added a commit that references this issue on Apr 15, 2023
    18918ac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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