Skip to content

Progress Bar demo : array case require the symfony/var-dumper dependency(missing) #35

Description

@llaville

Current version (7.2.5, commit c4d0dfd) have a demo folder that requires a symfony/var-dumper dependency (missing).

Suggested patch

diff --git a/demo/composer.json b/demo/composer.json
index 187aa29..50d550a 100644
--- a/demo/composer.json
+++ b/demo/composer.json
@@ -7,7 +7,9 @@

     "require"     : {
         "php"       : "^8.1",
-        "jbzoo/cli" : "^7.1.0"
+        "jbzoo/cli" : "^7.1.0",
+        "fakerphp/faker": "^1.24",
+        "symfony/var-dumper": "^7.4 || ^8.0"
     },

     "autoload"    : {

Warning

This patch includes also a fix for issue #34

Current behavior

Cli-JBZoo/demo on git branch master [!] via php v8.2.31 took 4s
container  [Docker] > ./my-app progress-bar -c array

Fatal error: Uncaught Error: Call to undefined function DemoApp\Commands\dump() in /shared/backups/github/Cli-JBZoo/demo/Commands/DemoProgressBar.php on line 80

Error: Call to undefined function DemoApp\Commands\dump() in /shared/backups/github/Cli-JBZoo/demo/Commands/DemoProgressBar.php on line 80

Call Stack:
    0.0002     986376   1. {main}() /shared/backups/github/Cli-JBZoo/demo/my-app:0
    0.0128    2947032   2. JBZoo\Cli\CliApplication->run() /shared/backups/github/Cli-JBZoo/demo/my-app:56
    0.0193    3228736   3. JBZoo\Cli\CliApplication->doRun() /shared/backups/github/Cli-JBZoo/demo/vendor/symfony/console/Application.php:195
    0.0198    3255896   4. JBZoo\Cli\CliApplication->doRunCommand() /shared/backups/github/Cli-JBZoo/demo/vendor/symfony/console/Application.php:356
    0.0198    3255896   5. DemoApp\Commands\DemoProgressBar->run() /shared/backups/github/Cli-JBZoo/demo/vendor/symfony/console/Application.php:1094
    0.0199    3259312   6. DemoApp\Commands\DemoProgressBar->execute() /shared/backups/github/Cli-JBZoo/demo/vendor/symfony/console/Command/Command.php:341
    0.0219    3463920   7. DemoApp\Commands\DemoProgressBar->executeAction() /shared/backups/github/Cli-JBZoo/demo/vendor/jbzoo/cli/src/CliCommand.php:162

Expected behavior

container  [Docker] > ./my-app progress-bar -c array
array:5 [
  "jude@site.com" => "Jude Strosin"
  "tracy@site.com" => "Tracy Mitchell"
  "lillie@site.com" => "Lillie Kertzmann"
  "olin@site.com" => "Olin King"
  "kennith@site.com" => "Kennith Mayert"
]
Progress of Handling associated array as a data source
100% (5 / 5) [••••••••••••••••••••••••••••••••••••••••] 🙈 00:00:05/00:00:05 | 6.3 MiB
Last Step Message: Callback Args $value=Kennith Mayert, $key=kennith@site.com, $step=4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions