Best practices for declaring class constants with PHP?

When I design classes in PHP and I need (or want) a constant I usually declare it as a class constant like this:

class MyClass {
    const FOO = 1;
}

Then I can use it like MyClass::FOO or self::FOO if using it inside a class method. Let’s add a class method so I can illustrate my question:

class MyClass {
    const FOO = 1;

    public static function add(int $a, int $b = self::FOO): int {
        return $a + $b;
    }
}

So far, so good. I can use my newly created method like $result = MyClass::add(5); or $result = MyClass::add(5, 7); and that’s about it. I always create interfaces for all my classes and that’s where my question falls into.

If my constants are declared within the class definition my IDE (PhpStorm in this case) complains about not having FOO declared although it is declared (but in the class and not in its interface). I can move the constant declaration to the class interface and everything is ok.

However, in other languages (like Java), declaring constants in interfaces (called the constant interface pattern) is considered bad practice. Being honest I have to say I’m ok with having my constants within their intended classes (it doesn’t really break the code, PhpStorm just complains about it but it’s not a real stopper…) but I would like to know what is the best approach to declare class constants.