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

Chain Converter not working #26

Open
pdobrigkeit opened this issue Mar 23, 2020 · 2 comments
Open

Chain Converter not working #26

pdobrigkeit opened this issue Mar 23, 2020 · 2 comments

Comments

@pdobrigkeit
Copy link
Contributor

The Chain converter is not working for me. It just gets an array of strings, but those are never instantiated as converters.

Config:

    converters:
      name:
        - Chain:
          - Company
          - Faker:
              formatter: "companySuffix"

Output:

PHP Fatal error:  Uncaught Error: Call to a member function convert() on string in /application/vendor/digilist/snakedumper/src/Converter/ChainConverter.php:43
Stack trace:
#0 /application/vendor/digilist/snakedumper/src/Converter/Service/DataConverter.php(34): Digilist\SnakeDumper\Converter\ChainConverter->convert()
#1 /application/vendor/digilist/snakedumper/src/Dumper/Sql/Dumper/TableContentsDumper.php(142): Digilist\SnakeDumper\Converter\Service\DataConverter->convert()
#2 /application/vendor/digilist/snakedumper/src/Dumper/Sql/Dumper/TableContentsDumper.php(84): Digilist\SnakeDumper\Dumper\Sql\Dumper\TableContentsDumper->dumpTableContent()
#3 /application/vendor/digilist/snakedumper/src/Dumper/SqlDumper.php(82): Digilist\SnakeDumper\Dumper\Sql\Dumper\TableContentsDumper->dumpTable()
#4 /application/vendor/digilist/snakedumper/src/Dumper/SqlDumper.php(46): Digilist\SnakeDumper\Dumper\SqlDumper->dumpTables()
#5 /application/vendor/digilist/snakedumper/src/Command/DumpCommand.php(56): Digilist\SnakeDumper\Dumper\SqlDumper->d in /application/vendor/digilist/snakedumper/src/Converter/ChainConverter.php on line 43
@pdobrigkeit
Copy link
Contributor Author

I figured it out as it seems from the source code...

    converters:
      name:
        - Company
        - Faker:
          formatter: "companySuffix"

to automatically create a chain, but this is not what i want... I would wand to combine the output of the two...

@orditeck
Copy link

Hi @pdobrigkeit , have you found any solution for this? I'd also like to combine the outputs

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