1515use Symfony \Component \Console \Input \InputInterface ;
1616use Symfony \Component \Console \Input \InputOption ;
1717use Symfony \Component \Console \Output \OutputInterface ;
18+ use Symfony \Component \Console \Question \ChoiceQuestion ;
1819use Symfony \Component \Console \Question \Question ;
1920
2021class PeclCommand extends AbstractReleaseCommand
@@ -93,6 +94,13 @@ private function process(Repository $repository, SimpleXMLElement $xml): void
9394 return ;
9495 }
9596
97+ $ question = new ChoiceQuestion (
98+ '<question>Is this a beta or stable release?</question> ' ,
99+ ['stable ' , 'beta ' ],
100+ 'stable ' ,
101+ );
102+ $ stability = $ helper ->ask ($ this ->input , $ this ->output , $ question );
103+
96104 //new release data
97105 $ release = [
98106 'date ' => date ('Y-m-d ' ),
@@ -101,6 +109,10 @@ private function process(Repository $repository, SimpleXMLElement $xml): void
101109 'release ' => $ newVersion ,
102110 'api ' => '1.0 ' ,
103111 ],
112+ 'stability ' => [
113+ 'release ' => $ stability ,
114+ 'api ' => 'stable ' ,
115+ ],
104116 'notes ' => $ this ->format_notes ($ newVersion ),
105117 ];
106118 $ this ->output ->writeln ($ this ->convertPackageXml ($ xml , $ release ));
@@ -126,6 +138,8 @@ protected function convertPackageXml(SimpleXMLElement $xml, array $new): string
126138 $ xml ->time = $ new ['time ' ];
127139 $ xml ->version ->release = $ new ['version ' ]['release ' ];
128140 $ xml ->version ->api = $ new ['version ' ]['api ' ];
141+ $ xml ->stability ->release = $ new ['stability ' ]['release ' ];
142+ $ xml ->stability ->api = $ new ['stability ' ]['api ' ];
129143 $ xml ->notes = $ new ['notes ' ];
130144
131145 //prettify
0 commit comments