Skip to content

Commit 49677cb

Browse files
committed
Deprecate IndexInfo::getNamespace
1 parent 9f5b441 commit 49677cb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Model/IndexInfo.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,14 @@ public function getName()
9696
/**
9797
* Return the index namespace (e.g. "db.collection").
9898
*
99+
* @deprecated
100+
*
99101
* @return string
100102
*/
101103
public function getNamespace()
102104
{
105+
@trigger_error('MongoDB 4.4 drops support for the namespace in indexes, the method "IndexInfo::getNamespace()" will be removed in a future release', E_USER_DEPRECATED);
106+
103107
return (string) $this->info['ns'];
104108
}
105109

@@ -131,7 +135,7 @@ public function is2dSphere()
131135
*/
132136
public function isGeoHaystack()
133137
{
134-
trigger_error('MongoDB 5.0 removes support for "geoHaystack" indexes, the method "IndexInfo::isGeoHaystack()" will be removed in a future release', E_USER_DEPRECATED);
138+
@trigger_error('MongoDB 5.0 removes support for "geoHaystack" indexes, the method "IndexInfo::isGeoHaystack()" will be removed in a future release', E_USER_DEPRECATED);
135139

136140
return array_search('geoHaystack', $this->getKey(), true) !== false;
137141
}

0 commit comments

Comments
 (0)