Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.Problem/Motivation
Drupal core has a deprecation process documented here: https://www.drupal.org/core/deprecation
Extend documentation coverage for JavaScript since the document currently only covers PHP in its examples.
At the moment there's only single deprecation in our JavaScript code base, but it is likely that we would like to deprecate more of our APIs as part of JavaScript modernization efforts.
Proposed resolution
The deprecation process:
- Mark the function as deprecated using
@deprecated - Provide a function for triggering a deprecation warning. Provide way to suppress the warnings in environments where that is necessary.
- Add change records for deprecated function explaining how to accomplish use cases without the deprecated function..
Comments
Comment #4
lauriiiMarking as a duplicate to #2962344: [policy, no patch] Document how to handle deprecations in JavaScript
Comment #5
lauriii