From cf41a9b8282b034cdf09cdc94637d0d68097043b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pavl=C3=AD=C4=8Dek?= Date: Thu, 26 Mar 2026 19:12:49 +0100 Subject: [PATCH] Support for regex in schema tool filter --- lib/Common/EntityManagerFactory.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Common/EntityManagerFactory.php b/lib/Common/EntityManagerFactory.php index 4b4ac25..771032f 100755 --- a/lib/Common/EntityManagerFactory.php +++ b/lib/Common/EntityManagerFactory.php @@ -57,7 +57,11 @@ class EntityManagerFactory if ($skip_names_in_schema_tool) { $connection->getConfiguration()->setSchemaAssetsFilter(function (AbstractNamedObject|string $object) use ($skip_names_in_schema_tool) { $object_name = is_string($object) ? $object : $object->getObjectName()->toString(); - return !in_array($object_name, $skip_names_in_schema_tool); + foreach ($skip_names_in_schema_tool as $name) { + if (preg_match("/$name/", $object_name)) return false; + } + + return true; }); }