Page MenuHomeDevCentral

ProjectsMap offset methods signatures are incorrect
Closed, ResolvedPublic

Description

Return type of Nasqueron\Notifications\Phabricator\ProjectsMap::offsetUnset(mixed $offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/wwwroot/default/app/Phabricator/ProjectsMap.php on line 113

Return type of Nasqueron\Notifications\Phabricator\ProjectsMap::offsetSet(mixed $offset, mixed $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/wwwroot/default/app/Phabricator/ProjectsMap.php on line 104

Return type of Nasqueron\Notifications\Phabricator\ProjectsMap::offsetGet(mixed $offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/wwwroot/default/app/Phabricator/ProjectsMap.php on line 94

Return type of Nasqueron\Notifications\Phabricator\ProjectsMap::offsetExists(mixed $offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/wwwroot/default/app/Phabricator/ProjectsMap.php on line 84

Return type of Nasqueron\Notifications\Phabricator\ProjectsMap::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/wwwroot/default/app/Phabricator/ProjectsMap.php on line 70

Revisions and Commits

Event Timeline

dereckson triaged this task as Normal priority.Mar 15 2023, 21:28
dereckson created this task.

Assigned to @DorianWinty as D2706 touches this class, so probably best to first merge it to see if it fixes this.

We've merged D2706 at noon. It's not yet deployed, as we've some CI issues (D2916 and T1807).

Two warnings still exist:

Return type of Nasqueron\Notifications\Phabricator\ProjectsMap::offsetUnset(mixed $offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/wwwroot/default/app/Phabricator/ProjectsMap.php on line 111

Return type of Nasqueron\Notifications\Phabricator\ProjectsMap::offsetSet(mixed $offset, mixed $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/wwwroot/default/app/Phabricator/ProjectsMap.php on line 102

Apparently, we missed a void return type in ProjectsMap class.

No more warning ๐ŸŽ‰ ๐ŸŽŠ

For reference, here how the information was presented in Sentry:

image.png (2ร—1 px, 485 KB)