{"record":{"id":"9f689f1eb16df39a","repo":"doctrine/orm","slug":"argument-dql-is-required-in-order-to-execute-thi","errorCode":null,"errorMessage":"Argument 'dql' is required in order to execute this command correctly.","messagePattern":"Argument 'dql' is required in order to execute this command correctly\\.","errorType":"console","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"src/Tools/Console/Command/RunDqlCommand.php","lineNumber":67,"sourceCode":"\n                <info>php %command.full_name% \"SELECT u FROM App\\Entity\\User u\" --hydrate=array</info>\n\n                Additionally you can specify the first result and maximum amount of results to\n                show:\n\n                <info>php %command.full_name% \"SELECT u FROM App\\Entity\\User u\" --first-result=0 --max-result=30</info>\n                EOT);\n    }\n\n    protected function execute(InputInterface $input, OutputInterface $output): int\n    {\n        $ui = new SymfonyStyle($input, $output);\n\n        $em = $this->getEntityManager($input);\n\n        $dql = $input->getArgument('dql');\n        if ($dql === null) {\n            throw new RuntimeException(\"Argument 'dql' is required in order to execute this command correctly.\");\n        }\n\n        $depth = $input->getOption('depth');\n\n        if (! is_numeric($depth)) {\n            throw new LogicException(\"Option 'depth' must contain an integer value\");\n        }\n\n        $hydrationModeName = (string) $input->getOption('hydrate');\n        $hydrationMode     = 'Doctrine\\ORM\\Query::HYDRATE_' . strtoupper(str_replace('-', '_', $hydrationModeName));\n\n        if (! defined($hydrationMode)) {\n            throw new RuntimeException(sprintf(\n                \"Hydration mode '%s' does not exist. It should be either: object. array, scalar or single-scalar.\",\n                $hydrationModeName,\n            ));\n        }\n","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/doctrine/orm/blob/d9b9ff73016bf598ae07515f97289ce8074e97a5/src/Tools/Console/Command/RunDqlCommand.php#L49-L85","documentation":"Error \"Argument 'dql' is required in order to execute this command correctly.\" thrown in doctrine/orm.","triggerScenarios":"Thrown at src/Tools/Console/Command/RunDqlCommand.php:67 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d9b9ff73016bf598ae07515f97289ce8074e97a5","analyzedAt":"2026-08-21T06:13:15.863Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}