Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return static for ArrayCollection::createFrom() and ArrayCollection#filter() #201

Merged
merged 1 commit into from
Jun 9, 2019

Conversation

muglug
Copy link
Contributor

@muglug muglug commented Jun 8, 2019

Fixes #200

@greg0ire
Copy link
Member

greg0ire commented Jun 8, 2019

I think you should target 1.6

@muglug
Copy link
Contributor Author

muglug commented Jun 8, 2019

Yeah, this has no breaking changes - it just improves type information

@greg0ire greg0ire changed the base branch from master to 1.6 June 9, 2019 10:38
@greg0ire
Copy link
Member

greg0ire commented Jun 9, 2019

Please rebase then.

@greg0ire
Copy link
Member

greg0ire commented Jun 9, 2019

Ah I can do it for you :)

@Ocramius Ocramius self-assigned this Jun 9, 2019
@Ocramius Ocramius added this to the 1.6.2 milestone Jun 9, 2019
@Ocramius Ocramius added the Bug label Jun 9, 2019
@Ocramius Ocramius merged commit c5e0bc1 into doctrine:1.6 Jun 9, 2019
@Ocramius Ocramius changed the title Return static for createFrom and filter Return static for ArrayCollection::createFrom() and ArrayCollection#filter() Jun 9, 2019
@bramcordie
Copy link

I already had a discussion over at the PHPStan project: phpstan/phpstan#4825 (comment).

What it seems to boil down to is that @psalm-return static<TKey,T> does not make sense and @return static is sufficient? Was the <TKey,T> left over from changing ArrayCollection to static or is this intentional?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants