Skip to content

Support abstract consts, ban redefining consts in all circumstances #3005

Open
@fredemmott

Description

@fredemmott

This is currently fine:

class A {
  const FOO = 'bar';
}

class B extends A {
  const FOO = 'baz';
}

Ideally, this would just be forbidden - however, static::BAR is used in some patterns. One way to ban this in the general case would be to support abstract constants.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions