File tree Expand file tree Collapse file tree 2 files changed +2
-17
lines changed
Expand file tree Collapse file tree 2 files changed +2
-17
lines changed Original file line number Diff line number Diff line change 1414
1515use function method_exists ;
1616use function preg_match ;
17- use function strpos ;
18- use function substr ;
1917
2018/**
2119 * The DiffGenerator class is responsible for comparing two Doctrine\DBAL\Schema\Schema instances and generating a
@@ -127,7 +125,7 @@ private function createToSchema(): Schema
127125 foreach ($ toSchema ->getTables () as $ table ) {
128126 $ tableName = $ table ->getName ();
129127
130- if ($ schemaAssetsFilter ($ this -> resolveTableName ( $ tableName) )) {
128+ if ($ schemaAssetsFilter ($ tableName )) {
131129 continue ;
132130 }
133131
@@ -137,17 +135,4 @@ private function createToSchema(): Schema
137135
138136 return $ toSchema ;
139137 }
140-
141- /**
142- * Resolve a table name from its fully qualified name. The `$name` argument
143- * comes from Doctrine\DBAL\Schema\Table#getName which can sometimes return
144- * a namespaced name with the form `{namespace}.{tableName}`. This extracts
145- * the table name from that.
146- */
147- private function resolveTableName (string $ name ): string
148- {
149- $ pos = strpos ($ name , '. ' );
150-
151- return $ pos === false ? $ name : substr ($ name , $ pos + 1 );
152- }
153138}
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ public function testGenerate(): void
4747 $ this ->dbalConfiguration ->expects (self ::once ())
4848 ->method ('getSchemaAssetsFilter ' )
4949 ->willReturn (
50- static fn ($ name ): bool => $ name === 'table_name1 ' ,
50+ static fn ($ name ): bool => $ name === 'schema. table_name1 ' ,
5151 );
5252
5353 $ table1 = $ this ->createMock (Table::class);
You can’t perform that action at this time.
0 commit comments