Dependency injection for WordPress.
Connect WordPress actions and filters to PHP classes. Declare hooks with attributes and let the container supply the services each handler needs.
Login_Handler.php
#[Filter( tag: 'login_message' )]
public function welcome(
string $message
): string {
$text = $this->copy->welcome();
return $message . '<p>' .
esc_html( $text ) . '</p>';
}