Open m2-assistant[bot] opened 1 month ago
Hi @engcom-November. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
Area: XXXXX
label to the ticket, indicating the functional areas it may be related to.2.4-develop
branch@magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure. 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.Issue: Confirmed
once verification is complete. Hello @jissereitsma,
Thank you for the report and collaboration!
Verified this on 2.4-develop with php 8.3.
When running bin/magento dev:di:info "<class-namespace>"
we are getting below error:
There is an error in /opt/homebrew/var/www/magento8/vendor/symfony/console/Output/Output.php at line: 109
Symfony\Component\Console\Output\Output::writeln(): Argument #1 ($messages) must be of type Traversable|array|string, null given, called in /opt/homebrew/var/www/magento8/app/code/Magento/Developer/Console/Command/DiInfoCommand.php on line 96#0 /opt/homebrew/var/www/magento8/app/code/Magento/Developer/Console/Command/DiInfoCommand.php(96): Symfony\Component\Console\Output\Output->writeln(NULL)
#1 /opt/homebrew/var/www/magento8/app/code/Magento/Developer/Console/Command/DiInfoCommand.php(167): Magento\Developer\Console\Command\DiInfoCommand->printConstructorArguments('Magento\\Quote\\M...', Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 /opt/homebrew/var/www/magento8/vendor/symfony/console/Command/Command.php(326): Magento\Developer\Console\Command\DiInfoCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /opt/homebrew/var/www/magento8/lib/internal/Magento/Framework/Interception/Interceptor.php(58): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /opt/homebrew/var/www/magento8/lib/internal/Magento/Framework/Interception/Interceptor.php(138): Magento\Developer\Console\Command\DiInfoCommand\Interceptor->___callParent('run', Array)
#5 /opt/homebrew/var/www/magento8/lib/internal/Magento/Framework/Interception/Interceptor.php(153): Magento\Developer\Console\Command\DiInfoCommand\Interceptor->Magento\Framework\Interception\{closure}(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /opt/homebrew/var/www/magento8/generated/code/Magento/Developer/Console/Command/DiInfoCommand/Interceptor.php(77): Magento\Developer\Console\Command\DiInfoCommand\Interceptor->___callPlugins('run', Array, Array)
#7 /opt/homebrew/var/www/magento8/vendor/symfony/console/Application.php(1078): Magento\Developer\Console\Command\DiInfoCommand\Interceptor->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /opt/homebrew/var/www/magento8/vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand(Object(Magento\Developer\Console\Command\DiInfoCommand\Interceptor), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /opt/homebrew/var/www/magento8/lib/internal/Magento/Framework/Console/Cli.php(118): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /opt/homebrew/var/www/magento8/vendor/symfony/console/Application.php(175): Magento\Framework\Console\Cli->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /opt/homebrew/var/www/magento8/bin/magento(23): Symfony\Component\Console\Application->run()
#12 {main}
This is due to the parameter being passed to Output::writeln
should be of Traversable|array|string
.
Since the render()
function renders the output by default there is no need to pass it to Output::writeln
.
Note: There is a render function being passed to Output::writeln
in line number 145 as well. it would be great if you could remove Output::writeln
in line 145.
Hence confirming the issue.
Thank you.
:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-12120 is successfully created for this GitHub issue.
:white_check_mark: Confirmed by @engcom-November. Thank you for verifying the issue.
Issue Available: @engcom-November, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
This one can be closed as it duplicates https://github.com/magento/magento2/issues/38740
This issue is automatically created based on existing pull request: magento/magento2#38813: Fix table render of DiInfoCommand
When running the DiInfoCommand under Magento 2.4.7 and PHP 8.3, line 96 mentions to pass the output of
$paramsTable->render()
to the$output
. However, because of typing issues, this causes a Fatal Error. According the Symfony docs (since a long time) therender()
method is already giving output, so the output should not be passed to$output->writeln()
anyway. This PR fixes things.