Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Falha na exportação para CSV #50

Open
vitormattos opened this issue Aug 3, 2023 · 2 comments
Open

Falha na exportação para CSV #50

vitormattos opened this issue Aug 3, 2023 · 2 comments

Comments

@vitormattos
Copy link
Member

Após converter as entidades de array para objeto, a exportação destes dados para CSV parou de funcionar.

Qualquer comando get com a opção --csv dá o erro que segue:

Necessário implementar conversão de objeto para array.

Fatal error: Uncaught TypeError: array_keys(): Argument #1 ($array) must be of type array, ProducaoCooperativista\DB\Entity\Invoices given in /app/src/Command/BaseCommand.php:57
Stack trace:
#0 /app/src/Command/BaseCommand.php(57): array_keys(Object(ProducaoCooperativista\DB\Entity\Invoices))
#1 /app/src/Command/GetInvoicesCommand.php(87): ProducaoCooperativista\Command\BaseCommand->toCsv(Array)
#2 /app/vendor/symfony/console/Command/Command.php(326): ProducaoCooperativista\Command\GetInvoicesCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /app/vendor/symfony/console/Application.php(1063): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /app/vendor/symfony/console/Application.php(320): Symfony\Component\Console\Application->doRunCommand(Object(ProducaoCooperativista\Command\GetInvoicesCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /app/vendor/symfony/console/Application.php(174): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /app/bin/import.php(102): Symfony\Component\Console\Application->run()
#7 /app/bin/import(25): require('/app/bin/import...')
#8 {main}
  thrown in /app/src/Command/BaseCommand.php on line 57

Para identificar os comandos get's execute: ./bin/import get

@DaianeAlvesRJ
Copy link
Member

@vitormattos isso é referente a quê?

@vitormattos
Copy link
Member Author

Existe a exportação para CSV mas não está sendo utilizada no momento. Não é algo que nos impacta.

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

No branches or pull requests

2 participants