Questions tagged [deprecation-warning]

A deprecation warning indicates that a method is obsolete. Using a newer method (which has been provided in the meanwhile) is preferred.

A deprecation warning indicates that a method, property or other software feature is obsolete. Using a newer feature (which has been provided in the meanwhile) is preferred.

547 questions
230
votes
5 answers

Method setDrawerListener is deprecated

While I'm doing something on my app, I see that the navigation drawer on my app reduced its size. But I'm not doing anything on that. Then, after checking the code, I saw that setDrawerListener is deprecated. Does anyone has a solution to this?…
david glorioso
  • 2,567
  • 2
  • 9
  • 13
208
votes
1 answer

Is it possible to mark something as deprecated in typescript?

I'm writing typescript definitions for a Javascript API with a deprecated method. Here's an extract of the documentation (they say API but it's just about this single method): This API has no effect. It has been maintained for…
lhk
  • 27,458
  • 30
  • 122
  • 201
170
votes
5 answers

Is `shouldOverrideUrlLoading` really deprecated? What can I use instead?

Is "shouldOverrideUrlLoading" really deprecated? If so, what can I use instead? It seems like shouldOverrideUrlLoading is deprecated targeting Android N and I need to make an app work since API 19 until the latest right now which is Android N…
Minion
  • 2,497
  • 4
  • 27
  • 29
164
votes
10 answers

Turn off deprecated errors in PHP 5.3

My server is running PHP 5.3 and my WordPress install is spitting these errors out on me, causing my session_start() to break. Deprecated: Assigning the return value of new by reference is deprecated in /home//public_html/hub/wp-settings.php on…
atwellpub
  • 5,660
  • 11
  • 38
  • 52
140
votes
4 answers

material-ui Drawer - findDOMNode is deprecated in StrictMode

I have a simple ReactJS app based on hooks (no classes) using StrictMode. I am using React version 16.13.1 and Material-UI version 4.9.10. In the Appbar I am using Drawer.
126
votes
18 answers

onBackPressed() is deprecated. What is the alternative?

I have upgraded targetSdkVersion and compileSdkVersion to 33. I am now getting a warning telling me that onBackPressed is deprecated. I see suggestions to use android.window.OnBackInvokedCallback or androidx.activity.OnBackPressedCallback to handle…
Rumit Patel
  • 8,830
  • 18
  • 51
  • 70
108
votes
6 answers

Convention for HTTP response header to notify clients of deprecated API

I'm upgrading our REST API endpoints and I want to notify clients when they are calling the to-be-deprecated endpoint. What header should I use in the response with a message along the lines of "This API version is being deprecated, please consult…
BlazingFrog
  • 2,265
  • 3
  • 21
  • 31
107
votes
10 answers

setBackgroundDrawable() deprecated

So my sdk goes from 15 to 21 and when I call setBackgroundDrawable(), Android Studio tells me that it's deprecated. I thought of going around it using: int sdk = android.os.Build.VERSION.SDK_INT; if(sdk < android.os.Build.VERSION_CODES.JELLY_BEAN)…
Makoto
  • 1,455
  • 4
  • 13
  • 17
89
votes
3 answers

How should I mark a method as "obsolete" in JS?

I am refactoring a rather large JS file that contains many unrelated methods into something that will regroup the methods together according to their usage, and renaming some of them as needed (to prevent misleading names). However, most of the web…
JBG
  • 1,044
  • 1
  • 7
  • 7
78
votes
2 answers

React 16.7 - React.SFC is now deprecated

I use to declare stateless components like this: const example: React.SFC = ({propsType}) => (); However the SFC is now deprecated, maybe this twitter post from Dan Abramov explains why. What should we use now that SFC is deprecated?
Jonas Praem
  • 2,296
  • 5
  • 32
  • 53
74
votes
7 answers

How to warn about class (name) deprecation

I have renamed a python class that is part of a library. I am willing to leave a possibility to use its previous name for some time but would like to warn user that it's deprecated and will be removed in the future. I think that to provide backward…
68
votes
11 answers

getCurrentPosition() and watchPosition() are deprecated on insecure origins

I am getting this error on my website which requests Geolocation data from the user: getCurrentPosition() and watchPosition() are deprecated on insecure origins, and support will be removed in the future. You should consider switching your…
Jason Axelrod
  • 7,155
  • 10
  • 50
  • 78
61
votes
6 answers

DeprecationWarning: Listening to events on the Db class has been deprecated and will be removed in the next major version

I am using mongoose and mocha for MongoDB schema design and API development I am getting this warning... what does this mean, how it will affect me and what is the fix?? Below the actual warning text: (node:9872) DeprecationWarning: Listening to…
Kritagya Khandelwal
  • 775
  • 1
  • 6
  • 12
59
votes
13 answers

Django 1.9 deprecation warnings app_label

I've just updated to Django v1.8, and testing my local setup before updating my project and I've had a deprecation warning that I've never seen before, nor does it make any sense to me. I may be just overlooking something or misunderstanding the…
Llanilek
  • 3,386
  • 5
  • 39
  • 65
56
votes
9 answers

Getting screen width on API Level 30 (Android 11): getDefaultDisplay() and getMetrics() are now deprecated. What should we use instead?

I currently calculate the screen width like this : public static int getScreenWidth(@NonNull Context context) { DisplayMetrics displayMetrics = new DisplayMetrics(); ((Activity)…
Greelings
  • 4,964
  • 7
  • 34
  • 70
1
2 3
36 37