Psalm v4.0.0-beta1 Release Notes

Release Date: 2020-10-19 // over 3 years ago
  • ๐Ÿš€ This release supports PHP 8 and its new features.

    It bumps the minimum requirement to PHP 7.3.

    ๐Ÿ‘ It includes better unused variable detection.

    It includes these breaking changes for v4:

    ๐Ÿ‘‰ User-facing

    • โœ‚ remove issues MisplacedRequiredParam, TypeCoercion, MixedTypeCoercion
    • โœ‚ remove support for @template-typeof
    • 0๏ธโƒฃ default to not disabling checks with UnresolvableInclude (#2818)
    • โœ‚ Remove requireVoidReturnType, useAssertForType config flags, both now permanently true
    • ๐Ÿ”„ Change default on resolveFromConfigFile to "true". This means if your Psalm config is not in the same directory that you run Psalm from, and you want to keep all the paths correct, you'll need to add resolveFromConfigFile="false" to maintain existing path resolution

    ๐Ÿ”Œ Internals (for plugin developers)

    • class constants should live in their own storage object
    • ๐Ÿ“‡ rename TFn to TClosure, ObjectLike to TKeyedArray, GetClassT to TDependentGetClass, GetTypeT to TDependentGetType
    • โœ‚ Remove return type manipulation from AfterFunctionCallAnalysisInterface โ€“ use the MethodReturnTypeProviderInterface and FunctionReturnTypeProviderInterface hooks instead
    • โž• Added return and param types to plugin hooks