Skip to content

Enable dynamic properties in EntityDynamic class#60

Open
jahidulpabelislam wants to merge 1 commit intoPrintNode:masterfrom
jahidulpabelislam:master
Open

Enable dynamic properties in EntityDynamic class#60
jahidulpabelislam wants to merge 1 commit intoPrintNode:masterfrom
jahidulpabelislam:master

Conversation

@jahidulpabelislam
Copy link

@jahidulpabelislam jahidulpabelislam commented Feb 2, 2026

Error: Creation of dynamic property PrintNode\Entity\PrinterCapabilities\Papers::$A4 is deprecated 
File : vendor/printnode/printnode-php/src/PrintNode/EntityDynamic.php 
Line : 29 

Add AllowDynamicProperties attribute to EntityDynamic class.

Add AllowDynamicProperties attribute to EntityDynamic class.
@jahidulpabelislam
Copy link
Author

@itx-ag
Copy link

itx-ag commented Mar 9, 2026

Hi @jahidulpabelislam ,

I'm having the same issue but you need to make one more change to our PR.

You have to bump the required php version in the composer.json:

"php": ">=8.2",

I think this is necessary for someone that is using php 8.0 or 8.1 or else they would get an error. If someone uses these php versions they would still get the current version of PrintNode (2.1.0) without your code changes.

@PrintNodeLtd and @matthewjwbyrne could you have a look at this? I'm getting a lot of the deprecated warning in php 8.4.

Thank you

More details about this issue here

@jahidulpabelislam
Copy link
Author

jahidulpabelislam commented Mar 9, 2026

@itx-ag I believe using the attribute on a older versions of PHP like this is fine from my testing.

I've not seen it error.

@itx-ag
Copy link

itx-ag commented Mar 10, 2026

Hi @jahidulpabelislam it will not error in php 7 version but double check with version 8.0 and 8.1.
Not 100% sure but I'm guessing it will throw an error on those versions. I've had similar issues with other php notations.

Just a note, like I said I'm not 100% sure this is happening. If you say it works in those php versions I believe you.

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

Successfully merging this pull request may close these issues.

2 participants