Fix deprecated control/class/interface/type issues that UI5 linter reports but cannot auto-fix. Use this skill when linter outputs:
- `no-deprecated-api` with messages about deprecated class, interface, type, property, or property of class
- Messages like "Use of deprecated class '...'", "Use of deprecated interface '...'", "Use of deprecated property '...'"
Trigger on: deprecated control usage in JS `new` expressions, deprecated properties in constructor settings, deprecated interfaces/types in metadata, deprecated controls/properties in XML views, sap.m.MessagePage modernization to IllustratedMessage.
Use this skill whenever you see 'deprecated class', 'deprecated property', 'deprecated interface', or 'deprecated type' in linter output, even if the user doesn't explicitly mention deprecation.
Provides replacement guidance for deprecated UI5 controls and their properties.
Fix deprecated control/class/interface/type issues that UI5 linter reports but cannot auto-fix. Use this skill when linter outputs:
- `no-deprecated-api` with messages about deprecated class, interface, type, property, or property of class
- Messages like "Use of deprecated class '...'", "Use of deprecated interface '...'", "Use of deprecated property '...'"
Trigger on: deprecated control usage in JS `new` expressions, deprecated properties in constructor settings, deprecated interfaces/types in metadata, deprecated controls/properties in XML views, sap.m.MessagePage modernization to IllustratedMessage.
Use this skill whenever you see 'deprecated class', 'deprecated property', 'deprecated interface', or 'deprecated type' in linter output, even if the user doesn't explicitly mention deprecation.
Provides replacement guidance for deprecated UI5 controls and their properties.
Fix Deprecated Controls, Classes, Interfaces, and Types
This skill fixes deprecated control/class/interface/type issues that the UI5 linter detects but cannot auto-fix because they require understanding the specific replacement APIs.
Linter Rules Handled
Rule ID
Message Pattern
This Skill's Action
no-deprecated-api
Use of deprecated class '...'
Replace with new class
no-deprecated-api
Use of deprecated interface '...'
Replace with new interface
no-deprecated-api
Use of deprecated type '...'
Replace with new type
no-deprecated-api
Use of deprecated property '...'
Remove or replace property
no-deprecated-api
Use of deprecated property '...' of class '...'
Replace with new property/API
When to Use
Apply this skill when you see linter output like:
MyController.js:15:5 error Use of deprecated class 'sap.ui.commons.Button' no-deprecated-api
MyController.js:20:5 error Use of deprecated property 'blocked' of class 'sap.m.Button' no-deprecated-api
MyView.view.xml:10:5 error Use of deprecated class 'sap.m.DateTimeInput' no-deprecated-api
Component.js:25:5 error Use of deprecated interface 'sap.ui.core.IFormContent' no-deprecated-api
Getting Replacement Information
Run the linter with --details flag to get links to API documentation with replacement guidance:
npx @ui5/linter --details
Use the UI5 MCP Server's get_api_reference tool to check deprecation status and find replacements:
Query: sap.ui.commons.Button or sap.m.Button#blocked
Fix Strategy: Replace with the current interface or remove if no longer needed.
// After - use current interface
sap.ui.define([
"sap/ui/core/Control"
], function(Control) {
"use strict";
returnControl.extend("my.app.control.MyControl", {
metadata: {
interfaces: ["sap.ui.core.ISemanticFormContent"] // Updated interface
}
});
});
4. Deprecated Type in Metadata
Problem: Using a deprecated type in property definition.
// Before - deprecated typemetadata: {
properties: {
size: { type: "sap.ui.core.CSSSize" } // May be deprecated
}
}
Fix Strategy: Check the API reference and use the current type.
5. Deprecated Controls in XML Views
Problem: Using deprecated controls in XML views.
<!-- Before - DateTimeInput is deprecated --><mvc:Viewxmlns:mvc="sap.ui.core.mvc"xmlns="sap.m"><DateTimeInputvalue="{/date}" /></mvc:View>
Fix Strategy: Replace with the modern equivalent controls.
<!-- After - use DatePicker and TimePicker --><mvc:Viewxmlns:mvc="sap.ui.core.mvc"xmlns="sap.m"><DatePickervalue="{/date}" /><TimePickervalue="{/time}" /></mvc:View>
6. Deprecated Properties in XML Views
Problem: Using deprecated properties on controls in XML.
<!-- Before - blocked property deprecated --><Buttontext="Submit"blocked="true" />
Fix Strategy: Replace with the current property.
<!-- After - use enabled with inverted logic --><Buttontext="Submit"enabled="false" />
7. Deprecated Aggregations in XML Views
Problem: Using deprecated aggregations.
<!-- Before - plugins aggregation may be deprecated in some contexts --><table:Table><table:plugins><table:MultiSelectionPlugin /></table:plugins></table:Table>
Fix Strategy: Check API reference for the current aggregation name or approach.
8. sap.m.MessagePage → sap.m.IllustratedMessage
sap.m.MessagePage is deprecated in favor of sap.m.IllustratedMessage. Key changes: text+description → single description, icon → illustrationType enum, showNavButton/navButtonPress → Button in additionalContent aggregation.
For the full property mapping table, XML/JS examples, and illustration type list, read references/control-modernization-details.md.
Key changes: variantItems → items, VariantItem.text → .title, showExecuteOnSelection → supportApplyAutomatically, showShare → supportPublic. The standard variant must be explicitly created with rename="false" and remove="false".
For the full property mapping table and standard variant XML example, read references/control-modernization-details.md.
10. Deprecated Core Classes
Key replacements: MessageManager → sap/ui/core/Messaging, Export* → sap/ui/export/Spreadsheet, LocalBusyIndicator → Control.setBusy(true). SearchProvider, OpenSearchProvider, and ScrollBar have no replacement.
For the full table and MessageManager→Messaging code example, read references/control-modernization-details.md.
Implementation Steps
Run linter with --details to get replacement documentation links:
npx @ui5/linter --details
Identify the deprecated item from the error message (class, property, interface, type)
Check if this is a p13n/personalization control — if the deprecated class is any of:
Do NOT attempt to auto-modernize these. The p13n framework modernization requires significant architectural changes (different initialization patterns, state persistence models, and panel configurations) that cannot be reliably automated. Instead, report them to the user:
⚠️ Manual modernization required: <ClassName> at <file>:<line>
Replacement: sap.m.p13n.* framework
Reason: p13n modernization requires architectural changes — see UI5 documentation for sap.m.p13n
Look up the replacement (for non-p13n controls) in:
The details link from npx @ui5/linter --details
UI5 API Reference using the get_api_reference tool
The deprecation tables above
Apply the fix:
For classes: Change import and class name
For properties: Change property name or use new API
For interfaces/types: Update metadata
For XML: Update element names and attributes
Verify by re-running the linter
Example Fix Session
Given linter output:
npx @ui5/linter --details
MyController.js:15:5 error Use of deprecated class 'sap.m.DateTimeInput' no-deprecated-api
Details: {@link sap.m.DateTimeInput}
MyController.js:25:5 error Use of deprecated property 'blocked' of class 'sap.m.Button' no-deprecated-api
Details: {@link sap.m.Button#blocked}
Always check the UI5 API Reference for the specific replacement guidance
Some deprecated controls may have multiple possible replacements depending on your use case
When replacing deprecated libraries (sap.ui.commons, sap.ui.ux3), the replacement controls may have different APIs
Property replacements may have inverted logic (e.g., blocked: true → enabled: false)
Consider using npx @ui5/linter --details to get direct links to modernization documentation
sap.f.IllustratedMessage and sap.f.Illustration are deprecated in favor of sap.m.IllustratedMessage and sap.m.Illustration — this is a simple namespace move with the same API
When modernizing sap.ui.comp.variants.VariantManagement, the standard variant must be explicitly created (see section 9)
Related Skills
fix-table-row-mode: For deprecated row-related properties on sap.ui.table.Table (visibleRowCountMode, visibleRowCount, rowHeight, etc.), use fix-table-row-mode — it handles the modernization to the rowMode aggregation
fix-partially-deprecated-apis: For partially deprecated API signatures (e.g., Parameters.get, View.create), use fix-partially-deprecated-apis instead of this skill