Are there any specific best practices recommended for PHP OOP development?

When developing PHP applications using Object-Oriented Programming (OOP), it is recommended to follow best practices to ensure code readability, maintainability, and scalability. Some recommended best practices include using proper naming conventions for classes, methods, and properties, adhering to the Single Responsibility Principle (SRP), favoring composition over inheritance, and using type hinting and return type declarations.

class User {
    private $id;
    private $username;

    public function __construct($id, $username) {
        $this->id = $id;
        $this->username = $username;
    }

    public function getId(): int {
        return $this->id;
    }

    public function getUsername(): string {
        return $this->username;
    }
}