From 5e141d816c34c438e79b801f978497bac2d9fbd2 Mon Sep 17 00:00:00 2001 From: Sam <40273116+Aweptimum@users.noreply.github.com> Date: Wed, 5 Jul 2023 15:22:35 -0400 Subject: [PATCH] Use triggerIfCalledFromOutside in listTableDetails Though listTableDetails is deprecated, it is still called internally. To avoid getting deprecation messages when called by other doctrine function, we can replace the use of Deprecation::trigger with Deprecation::triggerIfCalledFromOutside in the SchemaManagers. With the exception of SqliteSchemaManager, which already did this --- src/Schema/AbstractSchemaManager.php | 2 +- src/Schema/DB2SchemaManager.php | 2 +- src/Schema/MySQLSchemaManager.php | 2 +- src/Schema/OracleSchemaManager.php | 2 +- src/Schema/PostgreSQLSchemaManager.php | 2 +- src/Schema/SQLServerSchemaManager.php | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Schema/AbstractSchemaManager.php b/src/Schema/AbstractSchemaManager.php index 445c9ff2fb8..7da2b1178db 100644 --- a/src/Schema/AbstractSchemaManager.php +++ b/src/Schema/AbstractSchemaManager.php @@ -442,7 +442,7 @@ protected function doListTables(): array */ public function listTableDetails($name) { - Deprecation::trigger( + Deprecation::triggerIfCalledFromOutside( 'doctrine/dbal', 'https://github.com/doctrine/dbal/pull/5595', '%s is deprecated. Use introspectTable() instead.', diff --git a/src/Schema/DB2SchemaManager.php b/src/Schema/DB2SchemaManager.php index 95d32174105..1070a14e277 100644 --- a/src/Schema/DB2SchemaManager.php +++ b/src/Schema/DB2SchemaManager.php @@ -50,7 +50,7 @@ public function listTables() */ public function listTableDetails($name) { - Deprecation::trigger( + Deprecation::triggerIfCalledFromOutside( 'doctrine/dbal', 'https://github.com/doctrine/dbal/pull/5595', '%s is deprecated. Use introspectTable() instead.', diff --git a/src/Schema/MySQLSchemaManager.php b/src/Schema/MySQLSchemaManager.php index bd383b01292..2ddc249d812 100644 --- a/src/Schema/MySQLSchemaManager.php +++ b/src/Schema/MySQLSchemaManager.php @@ -73,7 +73,7 @@ public function listTables() */ public function listTableDetails($name) { - Deprecation::trigger( + Deprecation::triggerIfCalledFromOutside( 'doctrine/dbal', 'https://github.com/doctrine/dbal/pull/5595', '%s is deprecated. Use introspectTable() instead.', diff --git a/src/Schema/OracleSchemaManager.php b/src/Schema/OracleSchemaManager.php index 9ab32a998c0..07375221460 100644 --- a/src/Schema/OracleSchemaManager.php +++ b/src/Schema/OracleSchemaManager.php @@ -51,7 +51,7 @@ public function listTables() */ public function listTableDetails($name) { - Deprecation::trigger( + Deprecation::triggerIfCalledFromOutside( 'doctrine/dbal', 'https://github.com/doctrine/dbal/pull/5595', '%s is deprecated. Use introspectTable() instead.', diff --git a/src/Schema/PostgreSQLSchemaManager.php b/src/Schema/PostgreSQLSchemaManager.php index 7ca6f335107..183ef5e6a75 100644 --- a/src/Schema/PostgreSQLSchemaManager.php +++ b/src/Schema/PostgreSQLSchemaManager.php @@ -63,7 +63,7 @@ public function listTables() */ public function listTableDetails($name) { - Deprecation::trigger( + Deprecation::triggerIfCalledFromOutside( 'doctrine/dbal', 'https://github.com/doctrine/dbal/pull/5595', '%s is deprecated. Use introspectTable() instead.', diff --git a/src/Schema/SQLServerSchemaManager.php b/src/Schema/SQLServerSchemaManager.php index f717593af31..64538e6898c 100644 --- a/src/Schema/SQLServerSchemaManager.php +++ b/src/Schema/SQLServerSchemaManager.php @@ -55,7 +55,7 @@ public function listTables() */ public function listTableDetails($name) { - Deprecation::trigger( + Deprecation::triggerIfCalledFromOutside( 'doctrine/dbal', 'https://github.com/doctrine/dbal/pull/5595', '%s is deprecated. Use introspectTable() instead.',