From 24405697fa1bf5685bf5e0cb950e72120de5e450 Mon Sep 17 00:00:00 2001 From: wsergent Date: Sat, 19 Apr 2025 07:46:16 +1000 Subject: [PATCH] Update entities.rst `protected $_virtual` updated to `protected array $_virtual` as CakePHP 5 throws a fatal error: `Fatal error: Type of App\Model\Entity\EntityName::$_virtual must be array (as in class Cake\ORM\Entity)` without this specification. --- en/orm/entities.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/orm/entities.rst b/en/orm/entities.rst index f2a257b987..88bbadc38d 100644 --- a/en/orm/entities.rst +++ b/en/orm/entities.rst @@ -571,7 +571,7 @@ field that should be exposed:: class User extends Entity { - protected $_virtual = ['full_name']; + protected array $_virtual = ['full_name']; } This list can be modified at runtime using the ``setVirtual()`` method::