getUsername() deprecated in Symfony 6, but it still works [duplicate]

There is a lot of confusion about this and I'd like to know, what exactly is the difference between depreciated, deprecated and obsolete, in a programming context, but also in general.

I know I could just look at an online dictionary, and I have, even at many, but they don't all agree, or there are differences in what they say. So I decided to just ask here, considering I also want an answer in a programming context.

If I understand right, deprecated means it shouldn't be used anymore, because it has been replaced by a better alternative, or just because it has been abandoned. Obsolete means it doesn't work anymore, was removed, or doesn't work as it should anymore. And depreciated, if I understand right, once more, has completely nothing to do with programming and just means something has a lowered value, or was made worse.

Am I right, or am I wrong, and if I am wrong, what exactly do each of these mean?


Solution 1:

You are correct.

Deprecated means that it is still in use, but only for historical purposes and it will be removed probably in the next big release. It is recommended that you do not use deprecated functions or features - even if they are present in the current library for example.

Obsolete means that is already out-of-use.

Depreciated means the monetary value of something has decreased over time. E.g., cars typically depreciate in value.

Also for more precise definitions of the terms in the context of the English language I recommend using https://english.stackexchange.com/.

Solution 2:

Records are obsolete, CDs are deprecated, and the music industry is depreciated.

Solution 3:

In the context of describing APIs and such, "depreciated" is a misreading, misspelling, and mispronunciation of "deprecated".

I'm thinking people have just seen "depreciated" so often in other contexts, and "deprecated" so rarely, that they don't even register the "i" or lack thereof. It doesn't exactly help that their definitions are similar either.

Solution 4:

Obsolete: should not be used any more

Deprecated: should be avoided in new code, and likely to become obsolete in a later version of the API

Depreciated: usually a typo for deprecated (depreciation is where the value of goods goes down over time, e.g. if you buy a new computer its resale value goes down month by month)