Skip to content

Commit 48a1245

Browse files
committed
refactor(firebase_functions)!: remove deprecated APIs
1 parent 5c7f2ff commit 48a1245

File tree

6 files changed

+1
-63
lines changed

6 files changed

+1
-63
lines changed

packages/cloud_functions/cloud_functions/lib/cloud_functions.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,7 @@ import 'package:flutter/foundation.dart';
1414
import 'package:meta/meta.dart';
1515

1616
export 'package:cloud_functions_platform_interface/cloud_functions_platform_interface.dart'
17-
show
18-
// ignore: deprecated_member_use
19-
CloudFunctionsException,
20-
HttpsCallableOptions,
21-
FirebaseFunctionsException;
17+
show HttpsCallableOptions, FirebaseFunctionsException;
2218

2319
part 'src/firebase_functions.dart';
2420
part 'src/https_callable.dart';

packages/cloud_functions/cloud_functions/lib/src/firebase_functions.dart

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,6 @@ class FirebaseFunctions extends FirebasePluginPlatform {
5454
return newInstance;
5555
}
5656

57-
// ignore: public_member_api_docs
58-
@Deprecated(
59-
"Constructing CloudFunctions is deprecated, use 'FirebaseFunctions.instance' or 'FirebaseFunctions.instanceFor' instead")
60-
factory FirebaseFunctions({FirebaseApp app, String region}) {
61-
return FirebaseFunctions.instanceFor(app: app, region: region);
62-
}
63-
6457
final String _region;
6558

6659
String _origin;
@@ -73,12 +66,6 @@ class FirebaseFunctions extends FirebasePluginPlatform {
7366
return HttpsCallable._(_delegate.httpsCallable(_origin, name, options));
7467
}
7568

76-
@Deprecated("Deprecated in favor of httpsCallable()")
77-
// ignore: public_member_api_docs
78-
HttpsCallable getHttpsCallable({@required String functionName}) {
79-
return httpsCallable(functionName);
80-
}
81-
8269
/// Changes this instance to point to a Cloud Functions emulator running locally.
8370
///
8471
/// Set the [origin] of the local emulator, such as "http://localhost:5001", or `null`
@@ -100,21 +87,3 @@ class FirebaseFunctions extends FirebasePluginPlatform {
10087
_origin = origin;
10188
}
10289
}
103-
104-
@Deprecated("Deprecated in favor of FirebaseFunctions")
105-
// ignore: public_member_api_docs
106-
class CloudFunctions extends FirebaseFunctions {
107-
/// Returns an instance using the default [FirebaseApp].
108-
static FirebaseFunctions get instance {
109-
return FirebaseFunctions.instanceFor(
110-
app: Firebase.app(),
111-
);
112-
}
113-
114-
// ignore: public_member_api_docs
115-
@Deprecated(
116-
"Constructing CloudFunctions is deprecated, use 'FirebaseFunctions.instance' or 'FirebaseFunctions.instanceFor' instead")
117-
factory CloudFunctions({FirebaseApp app, String region}) {
118-
return FirebaseFunctions.instanceFor(app: app, region: region);
119-
}
120-
}

packages/cloud_functions/cloud_functions/lib/src/https_callable.dart

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,6 @@ class HttpsCallable {
3131
assert(_delegate != null);
3232
return HttpsCallableResult<T>._(await _delegate.call(parameters));
3333
}
34-
35-
@Deprecated(
36-
"Setting the timeout is deprecated in favor of using [HttpsCallableOptions]")
37-
// ignore: public_member_api_docs
38-
set timeout(Duration duration) {
39-
_delegate.timeout = duration;
40-
}
4134
}
4235

4336
/// Asserts whether a given call parameter is a valid type.

packages/cloud_functions/cloud_functions/test/firebase_functions_test.dart

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,4 @@ void main() {
7070
functions.httpsCallable('testName');
7171
verify(kMockFirebaseFunctionsPlatform.httpsCallable(any, 'testName', any));
7272
});
73-
74-
//
75-
test('getHttpsCallable()', () {
76-
// ignore: deprecated_member_use_from_same_package
77-
functions.getHttpsCallable(functionName: 'testName');
78-
verify(kMockFirebaseFunctionsPlatform.httpsCallable(any, 'testName', any));
79-
});
8073
}

packages/cloud_functions/cloud_functions/test/https_callable_test.dart

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,5 @@ void main() {
102102
verify(kMockHttpsCallablePlatform(parameters));
103103
});
104104
});
105-
106-
group('set.timeout (deprecated)', () {
107-
test('sets timeout value', () async {
108-
// ignore: deprecated_member_use_from_same_package
109-
kHttpsCallable.timeout = Duration(minutes: 2);
110-
111-
verify(kMockHttpsCallablePlatform.timeout = Duration(minutes: 2));
112-
});
113-
});
114105
});
115106
}

packages/cloud_functions/cloud_functions_platform_interface/lib/src/firebase_functions_exception.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,3 @@ class FirebaseFunctionsException extends FirebaseException
2121
/// Additional data provided with the exception.
2222
final dynamic details;
2323
}
24-
25-
@Deprecated("Deprecated in favor of FirebaseFunctionsException")
26-
// ignore: public_member_api_docs
27-
class CloudFunctionsException extends FirebaseFunctionsException {}

0 commit comments

Comments
 (0)