You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then I run robo my:command --field=id and I expect that I get exact id as string.
Expected behavior
I expect output 123.
Actual behavior
I see the error
[error] The format string cannot be used with the data produced by this command, which was an instance of Consolidation\OutputFormatters\StructuredData\UnstructuredData. Valid formats are: csv,json,list,null,php,print-r,tsv,var_export,xml,yaml
If I comment out these lines in FormatterManager.php
if (!is_string($structuredOutput) && !$this->isValidFormat($formatter, $structuredOutput)) {
$validFormats = $this->validFormats($structuredOutput);
throw new InvalidFormatException((string)$format, $structuredOutput, $validFormats);
}
Steps to reproduce
I have a command which returns
UnstucturedData
, something likeThen I run
robo my:command --field=id
and I expect that I get exact id as string.Expected behavior
I expect output
123
.Actual behavior
I see the error
If I comment out these lines in
FormatterManager.php
I see the correct result...
System Configuration
OS: Debian GNU/Linux 12 (bookworm)
PHP 8.3.10
Robo 4.0.6
The text was updated successfully, but these errors were encountered: