Replies: 1 comment
-
Many application frameworks are seriously exploitable inside the PHP ecosystem, to building a console application. The most popular and standard is the Symfony Console component. I use it directly for the Condorcet command line version, and you can read the code, it no too complicated. Some of them extend this Symphony Console component, like the Laravel equivalent (but must be used in a Laravel project, it's coupled and very opiniated), or Termwind (a very crazy thing, a trip between css and PHP for beauty seekers). The PHP-cli project is independent from Symfony and looks easier than others, and very well maintened. It also looks less opinionated, so it could be not too hard to use without refactoring your app too much. But not so much easier than Symfony Console, is less standard (less mature, less used, less documented) . |
Beta Was this translation helpful? Give feedback.
-
Right now, the output of this program comes from
echo()
. But Would it be worth it to switch to using Symfony, which Condorcet uses?I'm particularly thinking of Narrative Mode, in the 'split-vote' branch (which will soon be merged to master).
I have managed to figure out how to use Symfony to output text. Though I don't know how to do tables. I also don't know if it has an internal function for slowly outputting text like
ContestNarrative::write()
, or if I would have to imitate that function.@julien-boudry
Beta Was this translation helpful? Give feedback.
All reactions