新版本的变更 / PHP 8.3

// *** before: ***
class Repository {
    public function findAll(): array { /* ... */ }
}

class CachedRepository extends Repository {
    // a typo here silently creates a new method instead of overriding one
    public function findAl(): array { /* ... */ }
}

// *** in version 8.3: ***
class CachedRepository extends Repository {
    #[\Override]
    public function findAll(): array { /* ... */ }
    // #[\Override] on a method that overrides nothing is a compile error
}