{"record":{"id":"62628adb5df07823","repo":"doctrine/orm","slug":"option-depth-must-contain-an-integer-value","errorCode":null,"errorMessage":"Option 'depth' must contain an integer value","messagePattern":"Option 'depth' must contain an integer value","errorType":"console","errorClass":"LogicException","httpStatus":null,"severity":"error","filePath":"src/Tools/Console/Command/RunDqlCommand.php","lineNumber":73,"sourceCode":"                <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\n        $query = $em->createQuery($dql);\n\n        $firstResult = $input->getOption('first-result');\n        if ($firstResult !== null) {\n            if (! is_numeric($firstResult)) {\n                throw new LogicException(\"Option 'first-result' must contain an integer value\");","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/doctrine/orm/blob/d9b9ff73016bf598ae07515f97289ce8074e97a5/src/Tools/Console/Command/RunDqlCommand.php#L55-L91","documentation":"Error \"Option 'depth' must contain an integer value\" thrown in doctrine/orm.","triggerScenarios":"Thrown at src/Tools/Console/Command/RunDqlCommand.php:73 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"}