-
Improvement
-
Resolution: Done
-
Minor
-
None
-
4.3.1, 4.4
-
MOODLE_403_STABLE, MOODLE_404_STABLE
https://stitcher.io/blog/new-in-php-83#invariant-constant-visibility-breaking
Previously, visibility for constants weren't checked when implementing an interface. PHP 8.3 fixes this bug, but it might lead to code breaking in some places if you weren't aware of this behaviour.
interface I {
|
public const FOO = 'foo';
|
}
|
|
class C implements I {
|
private const FOO = 'foo';
|
}
|
Required
I don't think we can do much to detect this statically. It will show up with unit tests and behat tests under PHP 8.3 pretty quickly.
- Confirm my assessment at the inability to detect this and close
- has a non-specific relationship to
-
MDL-80144 Validation only: Confirm a collection of PHP 8.3 issues are no-op
-
- Closed
-