orm:convert-d1-schema does not support Global Schema Information ? #6058

Open
opened 2026-01-22 15:25:47 +01:00 by admin · 0 comments
Owner

Originally created by @maidmaid on GitHub (Sep 6, 2018).

Bug Report

Q A
BC Break no
Version 2.6.2

Summary

If we run orm:convert-d1-schema with global schema information (https://doctrine.readthedocs.io/en/latest/en/manual/yaml-schema-files.html?highlight=actAs#global-schema-information), that looks broken, like with detect_relations: true as global information.

Current behavior

PHP Fatal error:  Uncaught TypeError: Argument 2 passed to Doctrine\ORM\Tools\ConvertDoctrine1Schema::convertTableName() must be of the type array, boolean given, called in ./vendor/doctrine/orm/lib/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php on line
 105 and defined in ./vendor/doctrine/orm/lib/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php:120
Stack trace:
#0 ./vendor/doctrine/orm/lib/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php(105): Doctrine\ORM\Tools\ConvertDoctrine1Schema->convertTableName('detect_relation...', true, Object(Doctrine\ORM\Mapping\ClassMetadataInfo)

How to reproduce

detect_relations: true

User:
  columns:
    id:
      type: integer(4)
      primary: true
      autoincrement: true
$ php vendor/bin/doctrine orm:convert-d1-schema ./schemas annotation var

Expected behavior

Conversion done, without error.

Originally created by @maidmaid on GitHub (Sep 6, 2018). ### Bug Report <!-- Fill in the relevant information below to help triage your issue. --> | Q | A |------------ | ------ | BC Break | no | Version | 2.6.2 #### Summary If we run `orm:convert-d1-schema` with global schema information (https://doctrine.readthedocs.io/en/latest/en/manual/yaml-schema-files.html?highlight=actAs#global-schema-information), that looks broken, like with `detect_relations: true` as global information. #### Current behavior ``` PHP Fatal error: Uncaught TypeError: Argument 2 passed to Doctrine\ORM\Tools\ConvertDoctrine1Schema::convertTableName() must be of the type array, boolean given, called in ./vendor/doctrine/orm/lib/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php on line 105 and defined in ./vendor/doctrine/orm/lib/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php:120 Stack trace: #0 ./vendor/doctrine/orm/lib/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php(105): Doctrine\ORM\Tools\ConvertDoctrine1Schema->convertTableName('detect_relation...', true, Object(Doctrine\ORM\Mapping\ClassMetadataInfo) ``` #### How to reproduce ```yml detect_relations: true User: columns: id: type: integer(4) primary: true autoincrement: true ``` ``` $ php vendor/bin/doctrine orm:convert-d1-schema ./schemas annotation var ``` #### Expected behavior Conversion done, without error.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#6058