1

I have a cache factory that will use one of many cache drivers: File, Redis, Memcache, etc.
Because it's either-or, my code can be used both with and without certain PHP extensions.
eg. If you use Redis, you don't need ext-memcached installed.
But If I run psalm I get error saying: UndefinedClass - foo/bar/CacheFactory.php:99:25 - Class, interface or enum named Memcached does not exist

Is there a way to tell psalm to ignore classes from not installed extensions?

HubertNNN
  • 1,727
  • 1
  • 14
  • 29
  • 1
    But you probably need all of them in dev/CI environments, and it's where Psalm is usually run. – weirdan Sep 13 '22 at 15:09

0 Answers0