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.

貢獻者指南