You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feature #550 Deprecate "mongo" handler type in favor of new "mongodb" syntax (jmikola, GromNaN)
This PR was merged into the 3.x branch.
Discussion
----------
Deprecate "mongo" handler type in favor of new "mongodb" syntax
| Q | A
| ------------- | ---
| Branch? | 3.x <!-- for features and bug -->
| Bug fix? | no
| New feature? | yes
| Deprecations? | yes
| Issues | [PHPORM-398](https://jira.mongodb.org/browse/PHPORM-398)
| License | MIT
Define a new "mongodb" handler type. It accepts an "id" reference like the old "mongo" type; however, "uri" instead of a single "host" and "port". The "uri" option is more flexible.
Additionally, the "username" and "password" options have been renamed and are no longer used to modify the connection string directly ("mongo" never applied URL encoding). Instead, the options are set in the URI options array, which does not require encoding. The "mongodb" never requires a password, as a username alone is valid for some auth mechanisms.
Lastly, a "monolog-bundle" app name is specified when the bundle constructs a MongoDB\Client instance for both "mongo" and "mongodb" handler syntax.
Commits
-------
c1899dd Deprecate "mongo" handler type in favor of new "mongodb" syntax
trigger_deprecation('symfony/monolog-bundle', '3.11', 'The "mongo" handler type is deprecated in MonologBundle since version 3.11.0, use the "mongodb" type instead.');
269
+
270
+
if (!class_exists('MongoDB\Client')) {
271
+
thrownew \RuntimeException('The "mongo" handler requires the mongodb/mongodb package to be installed.');
trigger_deprecation('symfony/monolog-bundle', '3.8', 'The "elasticsearch" handler type is deprecated in MonologBundle since version 3.8.0, use the "elastica" type instead, or switch to the official Elastic client using the "elastic_search" type.');
297
340
// no break
@@ -1021,6 +1064,7 @@ private function getHandlerClassByType($handlerType)
0 commit comments