Type of $_hidden iin Entity must be array error while it is

I have just installed CakePHP 5.0.5 and follow the Authentication guideline.
I have my User entity to hide password field with below code.

protected $_hidden = ['password'];

However, when I test the login action, it complain this:

Fatal error: Type of App\Model\Entity\User::$_hidden must be array (as in class Cake\ORM\Entity) in D:\www\cake5\src\Model\Entity\User.php on line 58

The line 58 is constructor for my User entity.

What am i missing?

i think I moved from PHP 7 to PHP 8.1 and did not notice this

The code should be:

protected array $_hidden = ['password'];