vimeo/psalm

Is it possible to disable automatic detection of simple pure methods?

开放

#9,665 创建于 2023年4月17日

 (4 条评论) (0 个反应) (0 位负责人)PHP (668 个派生)batch import
Help wantedenhancementpure/immutable

仓库指标

星标
 (5,369 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

This is possible currently: https://psalm.dev/r/b2a9011f65

However, the library might change the following way, making it break: https://psalm.dev/r/7e645e6b69

This could be solved by making Psalm require to always explicitly define pureness as part of the method signature. At least, it would be sane to have a warning on missing pure annotations.

贡献者指南