php-edifact / edifact-generator

Formatter for EDI messages
GNU Lesser General Public License v3.0
33 stars 28 forks source link

Incompatible with PHP 8.3 due to redeclaration of composeKeys #31

Closed raphaelbeckmann closed 3 months ago

raphaelbeckmann commented 4 months ago

The current version is incompatible with PHP 8.3.

When trying to initialize new EDI\Generator\Orders\Item, it crashes with the following error message:

EDI\Generator\Base and EDI\Generator\Traits\Item define the same property ($composeKeys) in the composition of EDI\Generator\Orders\Item. However, the definition differs and is considered incompatible. Class was composed at...

This problem occurs due to the declaration of $composeKeys in the Base model that was added in commit d96ec82.

https://github.com/php-edifact/edifact-generator/commit/d96ec8226ba79d1af56c29844de6e2f087c1c33d#diff-71e03770b3ae304472c9a73545a905c54a97c2555eaedc8a558b8ab328ca5439

sabas commented 4 months ago

@raphaelbeckmann I merged your commit to solve the issue, although I wonder if the classes need to be looked at to pursue some more integration... The classes I made for example don't make use of the Base class and the traits at the moment,probably we should export some more functions to traits? https://php.watch/versions/8.2/constants-in-traits

cv-chameleon commented 3 months ago

Hi @sabas first of all thank you for this great package!

Can you make a new release tag based on the change that is done here by @raphaelbeckmann ?

Thanks in advance 🙏

sabas commented 3 months ago

@cv-chameleon sure, I pushed 1.2.1 :)