@@ -57,17 +57,36 @@ public function test_run_db_table_list() : void
57
57
58
58
$ tester ->assertCommandIsSuccessful ();
59
59
60
- self ::assertSame (
61
- <<<'PHP'
60
+
61
+ // changeColumn was removed in doctrine/dbal 4.0
62
+ // We are using it to perform a different assertion since prior to 4.0 all
63
+ // columns were also getting precision set to 10 due to a bug that was executing precision set
64
+ // even when precision value was null.
65
+ if (!\method_exists (Table::class, 'changeColumn ' )) {
66
+ self ::assertSame (
67
+ <<<'PHP'
62
68
\Flow\ETL\DSL\schema(
63
69
\Flow\ETL\DSL\integer_schema("id", nullable: false, metadata: \Flow\ETL\DSL\schema_metadata(["dbal_column_primary" => "table_01_pkey"])),
64
70
\Flow\ETL\DSL\string_schema("name", nullable: false, metadata: \Flow\ETL\DSL\schema_metadata(["dbal_column_length" => 255])),
65
71
\Flow\ETL\DSL\string_schema("description", nullable: false, metadata: \Flow\ETL\DSL\schema_metadata(["dbal_column_length" => 255])),
66
72
);
67
73
68
74
PHP,
69
- $ tester ->getDisplay ()
70
- );
75
+ $ tester ->getDisplay ()
76
+ );
77
+ } else {
78
+ self ::assertSame (
79
+ <<<'PHP'
80
+ \Flow\ETL\DSL\schema(
81
+ \Flow\ETL\DSL\integer_schema("id", nullable: false, metadata: \Flow\ETL\DSL\schema_metadata(["dbal_column_precision" => 10, "dbal_column_primary" => "table_01_pkey"])),
82
+ \Flow\ETL\DSL\string_schema("name", nullable: false, metadata: \Flow\ETL\DSL\schema_metadata(["dbal_column_length" => 255, "dbal_column_precision" => 10])),
83
+ \Flow\ETL\DSL\string_schema("description", nullable: false, metadata: \Flow\ETL\DSL\schema_metadata(["dbal_column_length" => 255, "dbal_column_precision" => 10])),
84
+ );
85
+
86
+ PHP,
87
+ $ tester ->getDisplay ()
88
+ );
89
+ }
71
90
}
72
91
73
92
protected function dbContext () : DatabaseContext
0 commit comments