-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Area: Other Developer ToolsIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P3May be fixed according to the position in the backlog.May be fixed according to the position in the backlog.Progress: doneReproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchThe issue has been reproduced on latest 2.4-develop branchTriage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject itIssue related to Developer Experience and needs help with Triage to Confirm or Reject it
Description
Summary (*)
setup:di:compile produces no useful output when there is a coding error. Using -v, -vv, -vvv or --verbose does nothing to help. The stack trace doesn't identify the file being processed let alone the source line of the error. If we've uploaded multiple files, none of which show any error in the code editor, we have no indicators where to find the code error.
Examples (*)
$ bin/magento set:di:com -vvv
Compilation was started.
Repositories code generation... 1/9 [===>------------------------] 11% < 1 sec 127.0 MiBsyntax error, unexpected '->' (T_OBJECT_OPERATOR)#0 [root]/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile()
#1 [internal function]: Composer\Autoload\ClassLoader->loadClass()
#2 [internal function]: spl_autoload_call()
#3 [root]/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(134): class_exists()
#4 [root]/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(117): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->includeClass()
#5 [root]/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(87): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->extract()
#6 [root]/setup/src/Magento/Setup/Module/Di/App/Task/Operation/RepositoryGenerator.php(61): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->getList()
#7 [root]/setup/src/Magento/Setup/Module/Di/App/Task/Manager.php(56): Magento\Setup\Module\Di\App\Task\Operation\RepositoryGenerator->doOperation()
#8 [root]/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php(216): Magento\Setup\Module\Di\App\Task\Manager->process()
#9 [root]/vendor/symfony/console/Command/Command.php(255): Magento\Setup\Console\Command\DiCompileCommand->execute()
#10 [root]/vendor/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()
#11 [root]/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#12 [root]/vendor/magento/framework/Console/Cli.php(115): Symfony\Component\Console\Application->doRun()
#13 [root]/vendor/symfony/console/Application.php(149): Magento\Framework\Console\Cli->doRun()
#14 [root]/bin/magento(23): Symfony\Component\Console\Application->run()
#15 {main}
Nothing here indicates where the error is.
Proposed solution
As a minimum, the ClassLoader must identify the class it is trying to load. Preferably it would also include the line that generated the error.
- [x ] Severity: S0 - Affects critical data or functionality and leaves users with no workaround.
Aquive
Metadata
Metadata
Assignees
Labels
Area: Other Developer ToolsIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P3May be fixed according to the position in the backlog.May be fixed according to the position in the backlog.Progress: doneReproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchThe issue has been reproduced on latest 2.4-develop branchTriage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject itIssue related to Developer Experience and needs help with Triage to Confirm or Reject it