File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 */
1010namespace Phpbb \Epv \Output ;
1111
12- // Runtime selection of HtmlOutput implementation based on PHP version and Symfony interface
12+ // Runtime selection of HtmlOutput implementation based on PHP version
1313if (PHP_VERSION_ID >= 80000 ) {
14- // Check if Symfony interface has union types (Symfony 7+)
15- $ reflection = new \ReflectionMethod ('\Symfony\Component\Console\Output\OutputInterface ' , 'write ' );
16- $ parameters = $ reflection ->getParameters ();
17- $ hasUnionTypes = $ parameters [0 ]->getType () && $ parameters [0 ]->getType ()->__toString () === 'string|iterable ' ;
18-
19- if ($ hasUnionTypes ) {
20- class_alias ('\Phpbb\Epv\Output\HtmlOutputPhp8 ' , '\Phpbb\Epv\Output\HtmlOutput ' );
21- } else {
22- class_alias ('\Phpbb\Epv\Output\HtmlOutputLegacy ' , '\Phpbb\Epv\Output\HtmlOutput ' );
23- }
14+ class_alias ('\Phpbb\Epv\Output\HtmlOutputPhp8 ' , '\Phpbb\Epv\Output\HtmlOutput ' );
2415} else {
2516 class_alias ('\Phpbb\Epv\Output\HtmlOutputLegacy ' , '\Phpbb\Epv\Output\HtmlOutput ' );
2617}
Original file line number Diff line number Diff line change 99 */
1010namespace Phpbb \Epv \Output ;
1111
12- // Runtime selection of Output implementation based on PHP version and Symfony interface
12+ // Runtime selection of Output implementation based on PHP version
1313if (PHP_VERSION_ID >= 80000 ) {
14- // Check if Symfony interface has union types (Symfony 7+)
15- $ reflection = new \ReflectionMethod ('\Symfony\Component\Console\Output\OutputInterface ' , 'write ' );
16- $ parameters = $ reflection ->getParameters ();
17- $ hasUnionTypes = $ parameters [0 ]->getType () && $ parameters [0 ]->getType ()->__toString () === 'string|iterable ' ;
18-
19- if ($ hasUnionTypes ) {
20- class_alias ('\Phpbb\Epv\Output\OutputPhp8 ' , '\Phpbb\Epv\Output\Output ' );
21- } else {
22- class_alias ('\Phpbb\Epv\Output\OutputLegacy ' , '\Phpbb\Epv\Output\Output ' );
23- }
14+ class_alias ('\Phpbb\Epv\Output\OutputPhp8 ' , '\Phpbb\Epv\Output\Output ' );
2415} else {
2516 class_alias ('\Phpbb\Epv\Output\OutputLegacy ' , '\Phpbb\Epv\Output\Output ' );
2617}
You can’t perform that action at this time.
0 commit comments