Deprecate ServerHandler (#206)
Towards #205
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 09bd599..f6e6d56 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,7 @@
## 1.2.1-dev
+* Deprecate `ServerHandler`.
+
## 1.2.0
* Added `MiddlewareExtensions` which provides `addMiddleware` and `addHandler`
diff --git a/analysis_options.yaml b/analysis_options.yaml
index ce270b7..3839e36 100644
--- a/analysis_options.yaml
+++ b/analysis_options.yaml
@@ -2,6 +2,8 @@
analyzer:
strong-mode:
implicit-casts: false
+ errors:
+ deprecated_member_use_from_same_package: ignore
linter:
rules:
- avoid_unused_constructor_parameters
diff --git a/lib/src/server_handler.dart b/lib/src/server_handler.dart
index 01f2915..865b50a 100644
--- a/lib/src/server_handler.dart
+++ b/lib/src/server_handler.dart
@@ -16,6 +16,8 @@
/// Requests to the handler are sent to the server's mounted handler once it's
/// available. This is used to expose a virtual [Server] that's actually one
/// part of a larger URL-space.
+@Deprecated('Do not use. If you have a use case for this class add a comment '
+ 'at https://github.com/dart-lang/shelf/issues/205')
class ServerHandler {
/// The server.
///