brunner-medien / pimcore-plantuml

PlantUML class diagram generation based on pimcore class definitions
4 stars 2 forks source link

SelectGenerator and MultiSelectGenerator need strings #1

Closed pimcore-galilee closed 1 year ago

pimcore-galilee commented 1 year ago

Hello all. I have tried you extension. It works well but you assume that list values (select and multiselect) are all strings for the values while it can be other type (int for example) when using OptionProvider class or ServiceName.

PlantUmlBundle\Model\FieldModel::addValue(): Argument #2 ($value) must be of type string, int given, called in /var/www/html/vendor/brunner-medien/pimcore-plantuml/src/Generator/ValueList/SelectGenerator.php on line 24

If you change in your 2 files : $field->addValue($option['key'], $option['value']); by $field->addValue($option['key'], (string)$option['value']);

The exceptions disappears.

gadget60 commented 1 year ago

Hi! You're right - thanks! This is fixed with v1.1.1...

gadget60 commented 1 year ago

...actually, with 1.1.4 - messed up with prefixed and non-prefixed version tags :-)