Skip to content
New issue

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 8.2: Dynamic Properties are deprecated #7

Closed
elrido opened this issue Oct 29, 2022 · 1 comment
Closed

PHP 8.2: Dynamic Properties are deprecated #7

elrido opened this issue Oct 29, 2022 · 1 comment

Comments

@elrido
Copy link

elrido commented Oct 29, 2022

Hello and thank you for maintaining this project. When running this library under PHP 8.2 in my projects unit tests, deprecation warnings get emitted:

Deprecated: Creation of dynamic property Jdenticon\Canvas\Rasterization\SuperSampleBuffer::$samples is deprecated in /home/runner/work/PrivateBin/PrivateBin/vendor/jdenticon/jdenticon/src/Canvas/Rasterization/SuperSampleBuffer.php on line 33
Deprecated: Creation of dynamic property Jdenticon\Canvas\Rasterization\SuperSampleBuffer::$samplesPerPixel is deprecated in /home/runner/work/PrivateBin/PrivateBin/vendor/jdenticon/jdenticon/src/Canvas/Rasterization/SuperSampleBuffer.php on line 34
Deprecated: Creation of dynamic property Jdenticon\Canvas\Rasterization\SuperSampleBuffer::$pixelOffset is deprecated in /home/runner/work/PrivateBin/PrivateBin/vendor/jdenticon/jdenticon/src/Canvas/Rasterization/SuperSampleBuffer.php on line 36
Deprecated: Creation of dynamic property Jdenticon\Canvas\Rasterization\SuperSampleBuffer::$subPixelOffset is deprecated in /home/runner/work/PrivateBin/PrivateBin/vendor/jdenticon/jdenticon/src/Canvas/Rasterization/SuperSampleBuffer.php on line 37
Deprecated: Creation of dynamic property Jdenticon\Canvas\Rasterization\SuperSampleBuffer::$width is deprecated in /home/runner/work/PrivateBin/PrivateBin/vendor/jdenticon/jdenticon/src/Canvas/Rasterization/SuperSampleBuffer.php on line 39
Deprecated: Creation of dynamic property Jdenticon\Canvas\Rasterization\SuperSampleBuffer::$used is deprecated in /home/runner/work/PrivateBin/PrivateBin/vendor/jdenticon/jdenticon/src/Canvas/Rasterization/SuperSampleBuffer.php on line 40

The test case that triggers this can be found here:
https://github.com/PrivateBin/PrivateBin/blob/master/tst/ModelTest.php#L317-L325

And here is some background on this deprecation and various ways to address this:
https://php.watch/versions/8.2/dynamic-properties-deprecated

I'm happy to provide you a pull request, if you could review the solutions and pick an appropriate one for this project.

@dmester
Copy link
Owner

dmester commented Oct 30, 2022

Hello! Thank you for reporting this issue. It is now fixed in version 1.0.2 available from Composer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants