Bug #78226 [Com]: Unexpected __set behavior with typed properties

From: Date: Wed, 14 Aug 2019 12:47:32 +0000
Subject: Bug #78226 [Com]: Unexpected __set behavior with typed properties
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-222247@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78226&edit=1 ID: 78226 Comment by: tandrewbennett at hotmail dot com Reported by: dirk dot gerigk at tui dot com Summary: Unexpected __set behavior with typed properties Status: Open Type: Bug Package: Class/Object related Operating System: Linux PHP Version: 7.4Git-2019-06-28 (Git) Block user comment: N Private report: N New Comment: For what it's worth, I think that a lot of the use cases for using __set() in userland code are based on devs trying to roll their own property accessor syntax for their entities, value objects, etc. I think this new behavior would be a non issue if we had something like this: https://wiki.php.net/rfc/propertygetsetsyntax-v1.2 I know there are differing opinions regarding the specific syntax (some prefer a C# style syntax while other prefer an ES6 based approach), but I still think it's worth mentioning here, perhaps for future releases. Previous Comments: ------------------------------------------------------------------------ [2019-08-13 20:51:44] nikic@php.net Related To: Bug #78411 ------------------------------------------------------------------------ [2019-08-05 07:55:14] nikic@php.net Related To: Bug #78372 ------------------------------------------------------------------------ [2019-07-23 07:08:58] wanghao at imwh dot net The behavior is quite surprising.It make me upset. ------------------------------------------------------------------------ [2019-06-28 15:23:07] dirk dot gerigk at atraveo dot com Ignore my last question in the last comment. :-) ------------------------------------------------------------------------ [2019-06-28 15:13:11] dirk dot gerigk at atraveo dot com Thanx for the fast answer. I have taken the time to read the https://wiki.php.net/rfc/typed_properties_v2 in detail and was suprised how complex the hole thing will be. I think will dig into it fully (writing code), when it is implement full in the future. But i am still curious how it will work in the future, so is there a link to a final draft of the implementation? ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=78226 -- Edit this bug report at https://bugs.php.net/bug.php?id=78226&edit=1

« previous php.bugs (#222247) next »