If we do check any plugin via code checker and have file like this
https://moodledev.io/docs/4.4/apis/commonfiles#libphp
even
file like - https://moodledev.io/docs/4.4/apis/commonfiles#locallibphp
It does not showing any warning / error. There should be some checking about the legacy thing.
Kindly let me know if this feature is already there via some config etc.