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

Add progress bar #82

Merged
merged 21 commits into from
Mar 30, 2023
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
1946c83
add progress bar
dimtrovich Mar 8, 2023
e899014
add method to initialize progress via a command
dimtrovich Mar 8, 2023
e9bbcad
update readme to add progress bar usage guide
dimtrovich Mar 8, 2023
b452059
Update src/Output/ProgressBar.php
dimtrovich Mar 20, 2023
fbee526
Update src/Output/ProgressBar.php
dimtrovich Mar 20, 2023
bf32903
Update src/Output/ProgressBar.php
dimtrovich Mar 20, 2023
e2d459f
fix: remove singleton call for progress in command
dimtrovich Mar 27, 2023
fa0b43a
provide setter for option & color the progressbar
dimtrovich Mar 27, 2023
455ac8a
update readme: add progress bar settings
dimtrovich Mar 27, 2023
21f7271
Merge branch 'adhocore:main' into feat-add-progressbar-to-output
dimtrovich Mar 27, 2023
b25e04f
Merge pull request #78 from dimtrovich/feat-add-progressbar-to-output
adhocore Mar 28, 2023
b94bffd
refactor(helper.output): expose stringifyArgs
adhocore Mar 29, 2023
ceb0071
refactor(helper): move isWindows() to Terminal, refactor Shell
adhocore Mar 29, 2023
434874d
chore(input.cmd): remove unused var
adhocore Mar 29, 2023
17f7e34
refactor(output.progress): use \r in WIN, shorten code
adhocore Mar 29, 2023
ee23ec1
test: stringify
adhocore Mar 29, 2023
733e21d
test: command progress
adhocore Mar 29, 2023
b5e2bf8
test: progress bar functionality
adhocore Mar 29, 2023
23794c5
style: styleci
adhocore Mar 29, 2023
ac25c67
fix(test): IteratorAggregate compatibility on php 8.1
dimtrovich Mar 29, 2023
48d5821
Merge pull request #83 from dimtrovich/81-progress-bar
adhocore Mar 30, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: remove singleton call for progress in command
dimtrovich committed Mar 27, 2023
commit e2d459f519e807e19b55ac015546860b93504d4f
10 changes: 1 addition & 9 deletions src/Input/Command.php
Original file line number Diff line number Diff line change
@@ -391,14 +391,6 @@ protected function io(): Interactor
*/
protected function progress(int $total = null): ProgressBar
{
if ($this->_progressBar === null) {
$this->_progressBar = new ProgressBar(null, $this->writer());
}

if ($total !== null) {
$this->_progressBar->total($total);
}

return $this->_progressBar;
return new ProgressBar($total, $this->writer());
}
}