Skip to content

Add missing ArrayAccess Stubs for Ds extension Class#11651

Open
josephLaurent wants to merge 1 commit intovimeo:6.xfrom
josephLaurent:array_access_ds_extension
Open

Add missing ArrayAccess Stubs for Ds extension Class#11651
josephLaurent wants to merge 1 commit intovimeo:6.xfrom
josephLaurent:array_access_ds_extension

Conversation

@josephLaurent
Copy link

The issue is describe here : #11512

https://psalm.dev/r/ae327d30c9

@psalm-github-bot
Copy link

I found these snippets:

https://psalm.dev/r/ae327d30c9
<?php
use Ds\Map;

/** @var Map<string, int> */
$mapObj = new Map(['a' => 17]);

$integer = $mapObj['a']; // ERROR

$otherInteger = $mapObj->get('a'); // WORK FINE

$mapObj['b'] ??= 35; // ERROR
Psalm output (using commit cdceda0):

INFO: MixedAssignment - 7:1 - Unable to determine the type that $integer is being assigned to

INFO: MixedAssignment - 11:1 - Unable to determine the type of this assignment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants