xp-framework / core

The XP Framework is an all-purpose, object oriented PHP framework.
Other
19 stars 6 forks source link

Add support for sealed classes and interfaces #308

Closed thekid closed 2 years ago

thekid commented 2 years ago

Based on https://wiki.php.net/rfc/sealed_classes. For PHP versions < 8.2, the following (also suggested in https://externals.io/message/117350#117356) is supported:

use lang\Sealed;

#[Sealed([Exception::class, Throwable::class])]
abstract class Throwable {
  // ...
}

See also #304

thekid commented 2 years ago

RFC has been declined.