Skip to content

Fixed ProgressBar PHP Fatal Error

Compare
Choose a tag to compare
@thedava thedava released this 01 Jan 05:46
· 2 commits to master since this release

Due to changes in symfony/console it's not longer possible to inherit from the ProgressBar class. This results in some major changes.

To improve readability all classes are shortened by the following scheme:

DavaHome\Console\AbstractCommand    -> DH\AbstractCommand
DavaHome\Console\Helper\ProgressBar -> DH\ProgressBar
DavaHome\Console\Helper\Table       -> DH\Table

Symfony\Component\Console\Helper\ProgressBar -> SF\ProgressBar
Symfony\Component\Console\Helper\Table       -> SF\Table
  • DH\AbstractCommand::createProgressBar doesn't create a DH\ProgressBar instance any more

    • It will create a SF\ProgressBar instance now
    • This leads to a breaking change. Usages like $progressBar::FORMAT_DEBUG will not work any more
    • The reason is that SF\ProgressBar is final now and therefore suppresses inheritance
  • DH\AbstractCommand::createTable doesn't create a DH\Table instance any more

    • It will create a SF\Table instance now
    • This leads to a breaking change. Usages like $table::STYLE_COMPACT will not work any more
    • This change was made to keep consistency to the ProgressBar
  • DH\ProgressBar was renamed to DavaHome\Console\Helper\ProgressBarOptions

    • This class only contains constants and doesn't provide any functionality any more
  • DH\Table was renamed to DavaHome\Console\Helper\TableOptions

    • This class only contains constants and doesn't provide any functionality any more