We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP version 8.1.5
following code
class A { public function __construct( public readonly string $prop, ) { } } $a = new A('some value'); $b = \DeepCopy\deep_copy($a);
throws following:
PHP Fatal error: Uncaught Error: Cannot modify readonly property A::$prop in .../vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php:257 Stack trace: #0 .../vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php(257): ReflectionProperty->setValue() #1 .../vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php(213): DeepCopy\DeepCopy->copyObjectProperty() #2 .../vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php(149): DeepCopy\DeepCopy->copyObject() #3 .../vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php(94): DeepCopy\DeepCopy->recursiveCopy() #4 .../vendor/myclabs/deep-copy/src/DeepCopy/deep_copy.php(18): DeepCopy\DeepCopy->copy() #5 .../test.php(57): DeepCopy\deep_copy() #6 {main} thrown in .../vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php on line 257
The text was updated successfully, but these errors were encountered:
are there any updates?
Sorry, something went wrong.
@roxblnfk feel free to send a PR, I don't think anyone else has contributed a fix yet.
Any news on the matter?
readonly
No branches or pull requests
PHP version 8.1.5
following code
throws following:
The text was updated successfully, but these errors were encountered: