Closed mcaskill closed 1 year ago
Thank you! What does PHPStan tell you when installing v2?
No difference in errors found by PHPStan between Installers v1 and v2:
------ -------------------------------------------------------------------------------------------------------------------------------------------------------------------
Line EnvatoConfig.php
------ -------------------------------------------------------------------------------------------------------------------------------------------------------------------
44 Method SzepeViktor\Composer\Envato\EnvatoConfig::getToken() should return string but returns mixed.
54 Method SzepeViktor\Composer\Envato\EnvatoConfig::getPackageList() should return array<int, array{name: string, itemId: int, type: string}> but returns array<int,
array{name: string, itemId: mixed, type: mixed}>.
💡 Offset 'itemId' (int) does not accept type mixed.
💡 Offset 'type' (string) does not accept type mixed.
58 Cannot access offset 'item-id' on mixed.
59 Cannot access offset 'type' on mixed.
62 Parameter #1 $array of function array_keys expects array, mixed given.
63 Parameter #3 ...$arrays of function array_map expects array, mixed given.
------ -------------------------------------------------------------------------------------------------------------------------------------------------------------------
All right. If it blows up we call 🚒 🧯
This preserves support for v1 while adding support for v2.