Skip to content

fix: make serialization of workload work again - #21

Open
ger4003 wants to merge 3 commits into
Flowpack:mainfrom
ger4003:fix-workload-instanciation
Open

fix: make serialization of workload work again#21
ger4003 wants to merge 3 commits into
Flowpack:mainfrom
ger4003:fix-workload-instanciation

Conversation

@ger4003

@ger4003 ger4003 commented Feb 2, 2026

Copy link
Copy Markdown
  • Fix overwriting WorkloadInterface via object configuration by using objectManger for creating Workload object in TaskCollectionFactory
  • fix serialization of workload by adding __seralize() and __unserialize() methods

#20

@dlubitz dlubitz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thank you @ger4003

Comment on lines +23 to +26
public function __serialize(): array
{
return ['data' => $this->data];
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change doesnt work for me with existing data. The already serialized data can't get loaded.

@dlubitz dlubitz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested the change and the deserialization doesn't work for existing entries. Moreover, I can't reproduce the issue with serialization.

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