Skip to content

Commit 4c3bd20

Browse files
authored
Fix missing setFilterSchemaAssetsExpression in phpdoc (#10776)
1 parent f2abf61 commit 4c3bd20

File tree

4 files changed

+28
-4
lines changed

4 files changed

+28
-4
lines changed

lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php

+7-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,13 @@ protected function configure()
7373
by the ORM, you can use a DBAL functionality to filter the tables and sequences down
7474
on a global level:
7575
76-
$config->setFilterSchemaAssetsExpression($regexp);
76+
$config->setSchemaAssetsFilter(function (string|AbstractAsset $assetName): bool {
77+
if ($assetName instanceof AbstractAsset) {
78+
$assetName = $assetName->getName();
79+
}
80+
81+
return !str_starts_with($assetName, 'audit_');
82+
});
7783
EOT
7884
);
7985
}

lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/CreateCommand.php

+7-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,13 @@ protected function configure()
3333
by the ORM, you can use a DBAL functionality to filter the tables and sequences down
3434
on a global level:
3535
36-
$config->setFilterSchemaAssetsExpression($regexp);
36+
$config->setSchemaAssetsFilter(function (string|AbstractAsset $assetName): bool {
37+
if ($assetName instanceof AbstractAsset) {
38+
$assetName = $assetName->getName();
39+
}
40+
41+
return !str_starts_with($assetName, 'audit_');
42+
});
3743
EOT
3844
);
3945
}

lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/DropCommand.php

+7-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,13 @@ protected function configure()
3737
by the ORM, you can use a DBAL functionality to filter the tables and sequences down
3838
on a global level:
3939
40-
$config->setFilterSchemaAssetsExpression($regexp);
40+
$config->setSchemaAssetsFilter(function (string|AbstractAsset $assetName): bool {
41+
if ($assetName instanceof AbstractAsset) {
42+
$assetName = $assetName->getName();
43+
}
44+
45+
return !str_starts_with($assetName, 'audit_');
46+
});
4147
EOT
4248
);
4349
}

lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/UpdateCommand.php

+7-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,13 @@ protected function configure()
6161
by the ORM, you can use a DBAL functionality to filter the tables and sequences down
6262
on a global level:
6363
64-
$config->setFilterSchemaAssetsExpression($regexp);
64+
$config->setSchemaAssetsFilter(function (string|AbstractAsset $assetName): bool {
65+
if ($assetName instanceof AbstractAsset) {
66+
$assetName = $assetName->getName();
67+
}
68+
69+
return !str_starts_with($assetName, 'audit_');
70+
});
6571
EOT
6672
);
6773
}

0 commit comments

Comments
 (0)