{"record":{"id":"804d9a92fbe7a2e1","repo":"doctrine/orm","slug":"the-setclasstable-method-requires-the-dbal-schem","errorCode":null,"errorMessage":"The setClassTable() method requires the DBAL Schema::edit() API which is not available in the current DBAL version. This feature requires doctrine/dbal ^4.5 or higher.","messagePattern":"The setClassTable\\(\\) method requires the DBAL Schema::edit\\(\\) API which is not available in the current DBAL version\\. This feature requires doctrine/dbal \\^4\\.5 or higher\\.","errorType":"exception","errorClass":"BadMethodCallException","httpStatus":null,"severity":"error","filePath":"src/Tools/Event/GenerateSchemaTableEventArgs.php","lineNumber":63,"sourceCode":"\n    public function setSchema(Schema $schema): void\n    {\n        // @phpstan-ignore function.impossibleType (Checking for unreleased Schema::edit() API)\n        if (! method_exists(Schema::class, 'edit')) {\n            throw new BadMethodCallException(\n                'The setSchema() method requires the DBAL Schema::edit() API which is not available in the current DBAL version. '\n                . 'This feature requires doctrine/dbal ^4.5 or higher.',\n            );\n        }\n\n        $this->schema = $schema;\n    }\n\n    public function setClassTable(Table $classTable): void\n    {\n        // @phpstan-ignore function.impossibleType (Checking for unreleased Schema::edit() API)\n        if (! method_exists(Schema::class, 'edit')) {\n            throw new BadMethodCallException(\n                'The setClassTable() method requires the DBAL Schema::edit() API which is not available in the current DBAL version. '\n                . 'This feature requires doctrine/dbal ^4.5 or higher.',\n            );\n        }\n\n        $this->classTable           = $classTable;\n        $this->classTableWasMutated = true;\n    }\n\n    public function classTableWasMutated(): bool\n    {\n        return $this->classTableWasMutated;\n    }\n}\n","sourceCodeStart":45,"sourceCodeEnd":78,"githubUrl":"https://github.com/doctrine/orm/blob/d9b9ff73016bf598ae07515f97289ce8074e97a5/src/Tools/Event/GenerateSchemaTableEventArgs.php#L45-L78","documentation":"Error \"The setClassTable() method requires the DBAL Schema::edit() API which is not available in the current DBAL version. This feature requires doctrine/dbal ^4.5 or higher.\" thrown in doctrine/orm.","triggerScenarios":"Thrown at src/Tools/Event/GenerateSchemaTableEventArgs.php:63 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"}