JSONRpc2
JSONRpc2 copied to clipboard
PHP 8.2 - Server - fix (AllowDynamicProperties)
PHP 8.2 introduces a new attribute in the global namespace named #[AllowDynamicProperties]. Classes declared with this attribute signals PHP to not emit any deprecation notices when setting dynamic properties on objects of that class.
Is this the best way to solve this problem? Would it be better to modify the library to not use dynamic properties?
Are you sure that it is possible without changing usage?
- $server->inst = new MyHandler;
- $server->method1 = function(param1, param2,