Skip to content

\array is not array #343

Closed
Closed

Description

@snapshotpl

#333 introduces change where return type with array is defined as:

@return \array Returns an array.

phpstan doesn't recognize now it as array, so it's break things

Activity

  1. Kharhamel commented on Apr 19, 2022

    @Kharhamel
    Collaborator

    oh no :(

  2. Kharhamel commented on Apr 19, 2022

    @Kharhamel
    Collaborator

    I switched the tag 2.2 to pre-release, hopefully that will give us some time. But i am not really sure how to fix this. @j3j5 do you have an idea?

  3. Kharhamel commented on Apr 19, 2022

    @Kharhamel
    Collaborator

    I think I am going to revert the j3j5 array rename PR and then i will create a beta to try his other strategy.

  4. j3j5 commented on Apr 19, 2022

    @j3j5
    Contributor

    Ok, I think it may be time to report this on the phpdocparser repo, let me put together an issue as soon as I have time.

    For some reason I don't get any error when testing on the testing repo that was around, but I see now that phpstan doesn't support this form of return type (I should have checked earlier). Sorry about that :(

  5. j3j5 commented on Apr 19, 2022

    @j3j5
    Contributor

    I opened the issue on phpdoc-parser and although it was the wrong place to open it, it got some interesting insights on the replies, it may be that the issue was on larastan after all 🙈 Let's see what Ondrej thinks about the proposed solution, also, need to find the time to test bleeding edge with his version, it may be fixed there already (although from the comments, I think the issue is on larastan).

    Anyway, I'd hold on on merging this until we get a bit further on the discussion.

  6. j3j5 commented on Apr 20, 2022

    @j3j5
    Contributor

    The comment above was meant for #338, anyway, looking at the responses by Jan on the other issue and after doing some more reading, I think he's right and the directory structure is wrong, so I believe #338 isn't the right answer either.

  7. Kharhamel commented on May 2, 2022

    @Kharhamel
    Collaborator

    I am closing this thread since the original issue was solved

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