Interfaces Constants Conflicts

no-email (Damien Seguy), Damien Seguy
Mon, 03 Jun 2024 00:00:00 +0000

PHP reports duplicate constant definitions in different interfaces.
This is very unusual occurrence, reported at linting time. It may also lead to quite a set back when one has to untangle these definitions.
So, shall we always give unique names across interfaces? Or just avoid multiple interfaces with constants on the same class?
There is no 'use' expression to solve the conflict.
Also, multiple same methods in different interface are OK.