Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int

$formValue = $content->getFieldValue('form', 'eng-GB')->getFormValue();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

foreach ($formValue->getFields() as $field) {dump($field->getId(), $field->getIdentifier(), $field->getName());} showed me what to use while testing this command for real.

$data = [
['identifier' => 'single_line', 'name' => 'Line', 'value' => 'The name'],
['identifier' => 'number', 'name' => 'Number', 'value' => 123],
['identifier' => 'checkbox', 'name' => 'Checkbox', 'value' => 0],
['id' => 7, 'identifier' => 'single_line', 'name' => 'Line', 'value' => 'The name'],
['id' => 8, 'identifier' => 'number', 'name' => 'Number', 'value' => 123],
['id' => 9, 'identifier' => 'checkbox', 'name' => 'Checkbox', 'value' => 0],
];

$this->formSubmissionService->create(
Expand Down
5 changes: 0 additions & 5 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,6 @@ parameters:
count: 1
path: code_samples/api/public_php_api/src/Command/FormSubmissionCommand.php

-
message: "#^Parameter \\#4 \\$data of method Ibexa\\\\Contracts\\\\FormBuilder\\\\FormSubmission\\\\FormSubmissionServiceInterface\\:\\:create\\(\\) expects array\\<array\\{id\\: int, identifier\\: string, name\\: string, value\\: mixed\\}\\>, array\\{array\\{identifier\\: 'single_line', name\\: 'Line', value\\: 'The name'\\}, array\\{identifier\\: 'number', name\\: 'Number', value\\: 123\\}, array\\{identifier\\: 'checkbox', name\\: 'Checkbox', value\\: 0\\}\\} given\\.$#"
count: 1
path: code_samples/api/public_php_api/src/Command/FormSubmissionCommand.php

-
message: "#^Parameter \\#1 \\$messages of method Symfony\\\\Component\\\\Console\\\\Output\\\\OutputInterface\\:\\:writeln\\(\\) expects iterable\\<string\\>\\|string, string\\|null given\\.$#"
count: 2
Expand Down
Loading