Skip to content
This repository has been archived by the owner on Apr 15, 2020. It is now read-only.

Reproduction of doctrine/collection ArrayCollection#map() psalm annotation bug.

Notifications You must be signed in to change notification settings

someniatko/doctrine-collections-map-psalm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reproduction of doctrine/collection ArrayCollection#map() psalm annotation bug: doctrine/collections#210

How to use

  1. execute composer install
  2. execute vendor/bin/psalm

Expected: Psalm reports no errors

Actual:

ERROR: InvalidScalarArgument - bug.php:23:10 - Argument 1 of Bug\showInts expects array<array-key, int>, array<array-key, string(aa)|string(bbbb)> provided
showInts($lengths);

Notice, how /** @var Collection $collection */ annotation in the no-bug.php fixes the psalm error.

About

Reproduction of doctrine/collection ArrayCollection#map() psalm annotation bug.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages