code-lts / doctum

A php API documentation generator, fork of Sami
https://doctum.long-term.support/
MIT License
300 stars 32 forks source link

Error: The ProgressBar is not started #19

Closed williamdes closed 3 years ago

williamdes commented 3 years ago

On an already rendered project

$ $(composer global config bin-dir --absolute --quiet)/doctum.php --no-interaction -vvv update ./test/doctum-config.php
 Updating project 

Version master
---------------

In SymfonyStyle.php line 417:

  [Symfony\Component\Console\Exception\RuntimeException]  
  The ProgressBar is not started.                         

Exception trace:
  at /home/williamdes/.config/composer/vendor/symfony/console/Style/SymfonyStyle.php:417
 Symfony\Component\Console\Style\SymfonyStyle->getProgressBar() at /home/williamdes/.config/composer/vendor/symfony/console/Style/SymfonyStyle.php:321
 Symfony\Component\Console\Style\SymfonyStyle->progressFinish() at /home/williamdes/.config/composer/vendor/code-lts/cli-tools/src/ErrorsConsoleStyle.php:152
 CodeLts\CliTools\ErrorsConsoleStyle->progressFinish() at /home/williamdes/.config/composer/vendor/code-lts/cli-tools/src/Symfony/SymfonyStyle.php:116
 CodeLts\CliTools\Symfony\SymfonyStyle->progressFinish() at /home/williamdes/.config/composer/vendor/code-lts/doctum/src/Console/Command/Command.php:310
 Doctum\Console\Command\Command->endProgress() at /home/williamdes/.config/composer/vendor/code-lts/doctum/src/Console/Command/Command.php:281
 Doctum\Console\Command\Command->messageCallback() at n/a:n/a
 call_user_func() at /home/williamdes/.config/composer/vendor/code-lts/doctum/src/Project.php:474
 Doctum\Project->parseVersion() at /home/williamdes/.config/composer/vendor/code-lts/doctum/src/Project.php:125
 Doctum\Project->update() at /home/williamdes/.config/composer/vendor/code-lts/doctum/src/Console/Command/Command.php:183
 Doctum\Console\Command\Command->update() at /home/williamdes/.config/composer/vendor/code-lts/doctum/src/Console/Command/UpdateCommand.php:54
 Doctum\Console\Command\UpdateCommand->execute() at /home/williamdes/.config/composer/vendor/symfony/console/Command/Command.php:258
 Symfony\Component\Console\Command\Command->run() at /home/williamdes/.config/composer/vendor/symfony/console/Application.php:911
 Symfony\Component\Console\Application->doRunCommand() at /home/williamdes/.config/composer/vendor/symfony/console/Application.php:264
 Symfony\Component\Console\Application->doRun() at /home/williamdes/.config/composer/vendor/symfony/console/Application.php:140
 Symfony\Component\Console\Application->run() at /home/williamdes/.config/composer/vendor/code-lts/doctum/bin/doctum-binary.php:26
 require_once() at /home/williamdes/.config/composer/vendor/code-lts/doctum/bin/doctum.php:4
ptomulik commented 3 years ago

The same happens to me, when trying to run on an empty source tree or a source tree with files that provide no classes/functions (test.tar.gz). Checked with 5.2.1

ptomulik@barakus:$ php ../doctum-5.2.1.phar update -vvv --force docs/doctum.conf.php 
 Updating project 

Version main
-------------

In SymfonyStyle.php line 422:

  [Symfony\Component\Console\Exception\RuntimeException]  
  The ProgressBar is not started.                         

Exception trace:
  at phar:///tmp/doctum-5.2.1.phar/vendor/symfony/console/Style/SymfonyStyle.php:422
 Symfony\Component\Console\Style\SymfonyStyle->getProgressBar() at phar:///tmp/doctum-5.2.1.phar/vendor/symfony/console/Style/SymfonyStyle.php:326                                                                                                    
 Symfony\Component\Console\Style\SymfonyStyle->progressFinish() at phar:///tmp/doctum-5.2.1.phar/vendor/code-lts/cli-tools/src/ErrorsConsoleStyle.php:152                                                                                             
 CodeLts\CliTools\ErrorsConsoleStyle->progressFinish() at phar:///tmp/doctum-5.2.1.phar/vendor/code-lts/cli-tools/src/Symfony/SymfonyStyle.php:116                                                                                                    
 CodeLts\CliTools\Symfony\SymfonyStyle->progressFinish() at phar:///tmp/doctum-5.2.1.phar/src/Console/Command/Command.php:310                                                                                                                         
 Doctum\Console\Command\Command->endProgress() at phar:///tmp/doctum-5.2.1.phar/src/Console/Command/Command.php:281
 Doctum\Console\Command\Command->messageCallback() at n/a:n/a
 call_user_func() at phar:///tmp/doctum-5.2.1.phar/src/Project.php:474
 Doctum\Project->parseVersion() at phar:///tmp/doctum-5.2.1.phar/src/Project.php:125
 Doctum\Project->update() at phar:///tmp/doctum-5.2.1.phar/src/Console/Command/Command.php:183
 Doctum\Console\Command\Command->update() at phar:///tmp/doctum-5.2.1.phar/src/Console/Command/UpdateCommand.php:54
 Doctum\Console\Command\UpdateCommand->execute() at phar:///tmp/doctum-5.2.1.phar/vendor/symfony/console/Command/Command.php:255
 Symfony\Component\Console\Command\Command->run() at phar:///tmp/doctum-5.2.1.phar/vendor/symfony/console/Application.php:1009
 Symfony\Component\Console\Application->doRunCommand() at phar:///tmp/doctum-5.2.1.phar/vendor/symfony/console/Application.php:273
 Symfony\Component\Console\Application->doRun() at phar:///tmp/doctum-5.2.1.phar/vendor/symfony/console/Application.php:149
 Symfony\Component\Console\Application->run() at phar:///tmp/doctum-5.2.1.phar/bin/doctum-binary.php:26
 include() at /tmp/doctum-5.2.1.phar:9

update [--only-version ONLY-VERSION] [--force] [--output-format OUTPUT-FORMAT] [--no-progress] [--ignore-parse-errors] [--] <config>
williamdes commented 3 years ago

I need to fix this quickly

To avoid this issue you can use --force

ptomulik commented 3 years ago

I need to fix this quickly

To avoid this issue you can use --force

In my case --force does not help (as you can see from the example above). Of course, my case is a rarely seen in real world. Just found this by an accident.

ptomulik commented 3 years ago

In my case (empty project) it happens on first run as well.

williamdes commented 3 years ago

I really need to add more Unit and Integration tests, this project lacks them Feel free to contribute to writing tests

I hope to jump to fixes on this project next week, let me know if you need an urgent fix

ptomulik commented 3 years ago

I really need to add more Unit and Integration tests, this project lacks them Feel free to contribute to writing tests

I hope to jump to fixes on this project next week, let me know if you need an urgent fix

Nothing urgent, just wanted to provide some additional details to this issue. :)

williamdes commented 3 years ago

I published the 5.2.2-dev phar that should solve this issue until the next version is out

ptomulik commented 3 years ago

Thx!