{"record":{"id":"ce63db929c38be77","repo":"doctrine/orm","slug":"option-first-result-must-contain-an-integer-valu","errorCode":null,"errorMessage":"Option 'first-result' must contain an integer value","messagePattern":"Option 'first-result' must contain an integer value","errorType":"console","errorClass":"LogicException","httpStatus":null,"severity":"error","filePath":"src/Tools/Console/Command/RunDqlCommand.php","lineNumber":91,"sourceCode":"            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\");\n            }\n\n            $query->setFirstResult((int) $firstResult);\n        }\n\n        $maxResult = $input->getOption('max-result');\n        if ($maxResult !== null) {\n            if (! is_numeric($maxResult)) {\n                throw new LogicException(\"Option 'max-result' must contain an integer value\");\n            }\n\n            $query->setMaxResults((int) $maxResult);\n        }\n\n        if ($input->getOption('show-sql')) {\n            $ui->text($query->getSQL());\n\n            return 0;","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/doctrine/orm/blob/d9b9ff73016bf598ae07515f97289ce8074e97a5/src/Tools/Console/Command/RunDqlCommand.php#L73-L109","documentation":"Error \"Option 'first-result' must contain an integer value\" thrown in doctrine/orm.","triggerScenarios":"Thrown at src/Tools/Console/Command/RunDqlCommand.php:91 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"}