66
77use Composer \InstalledVersions ;
88use Symfony \Component \Console \Application as SymfonyConsoleApplication ;
9+ use Symfony \Component \Console \Helper \FormatterHelper ;
910
1011class Application extends SymfonyConsoleApplication
1112{
@@ -76,8 +77,6 @@ public function getLongVersion(): string
7677 );
7778 $ longVersion .= PHP_EOL . $ phpVersion ;
7879
79- // TODO: Print PHP_BUILD_DATE for PHP >=8.5.
80-
8180 $ phpSapi = sprintf (
8281 '%-15s %s ' ,
8382 'SAPI ' ,
@@ -87,11 +86,17 @@ public function getLongVersion(): string
8786
8887 $ longVersion .= PHP_EOL . PHP_EOL . '<comment>Support Composer SemVer:</> ' ;
8988
90- $ longVersion .= PHP_EOL . <<<'SUPPORT'
91- If you find this tool useful, please consider supporting its development.
92- Every contribution counts, regardless how big or small.
93- I, <href=https://typist.tech/>Tang Rufus</>, am eternally grateful to all sponsors who fund my open source journey.
94- SUPPORT;
89+ $ supportBlock = (new FormatterHelper ())
90+ ->formatBlock (
91+ [
92+ 'If you find this tool useful, please consider supporting its development. ' ,
93+ 'Every contribution counts, regardless how big or small. ' ,
94+ 'I am eternally grateful to all sponsors who fund my open source journey. ' ,
95+ ],
96+ 'question ' ,
97+ true ,
98+ );
99+ $ longVersion .= PHP_EOL . $ supportBlock ;
95100
96101 $ sponsorUrl = sprintf (
97102 '%1$-15s <href=%2$s>%2$s</> ' ,
@@ -102,11 +107,17 @@ public function getLongVersion(): string
102107
103108 $ longVersion .= PHP_EOL . PHP_EOL . '<comment>Hire Tang Rufus:</> ' ;
104109
105- $ longVersion .= <<<'HIRE'
106- <fg=black;bg=yellow;options=bold>
107- I am looking for my next role!
108- If you are looking for a backend developer to build weird PHP / Ruby / Go stuffs like this, please get in touch.</>
109- HIRE;
110+ $ hireBlock = (new FormatterHelper ())
111+ ->formatBlock (
112+ [
113+ 'I am looking for my next role, freelance or full-time. ' ,
114+ 'If you find this tool useful, I can build you more weird stuffs like this. ' ,
115+ "Let's talk if you are hiring PHP / Ruby / Go developers. " ,
116+ ],
117+ 'error ' ,
118+ true ,
119+ );
120+ $ longVersion .= PHP_EOL . $ hireBlock ;
110121
111122 $ sponsorUrl = sprintf (
112123 '%1$-15s <href=%2$s>%2$s</> ' ,
@@ -115,9 +126,6 @@ public function getLongVersion(): string
115126 );
116127 $ longVersion .= PHP_EOL . PHP_EOL . $ sponsorUrl ;
117128
118-
119- $ longVersion .= PHP_EOL ;
120-
121129 return $ longVersion ;
122130 }
123131}
0 commit comments