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
When to Use
Apply this skill when you see linter output like:
Getting Replacement Information
Run the linter with --details flag to get links to API documentation with replacement guidance:
Use the UI5 MCP Server's get_api_reference tool to check deprecation status and find replacements:
- Query:
sap.ui.commons.Buttonorsap.m.Button#blocked
Fix Strategy
1. Deprecated Class in new Expression
Problem: Using a deprecated control class.
Fix Strategy: Replace with the modern equivalent class.
Common Deprecated Class Replacements:
sap.m Deprecated Controls:
sap.f Deprecated Controls:
sap.ui.table Deprecated Controls:
sap.ui.unified Deprecated Controls:
sap.ui.layout Deprecated Controls:
sap.ui.comp Deprecated Controls:
sap.ui.mdc Deprecated/Changed APIs:
2. Deprecated Property in Constructor
Problem: Using a deprecated property when creating a control.
Fix Strategy: Use the replacement property or API.
Common Deprecated Property Replacements:
3. Deprecated Interface in Metadata
Problem: Using a deprecated interface in control/component metadata.
Fix Strategy: Replace with the current interface or remove if no longer needed.
4. Deprecated Type in Metadata
Problem: Using a deprecated type in property definition.
Fix Strategy: Check the API reference and use the current type.
5. Deprecated Controls in XML Views
Problem: Using deprecated controls in XML views.
Fix Strategy: Replace with the modern equivalent controls.
6. Deprecated Properties in XML Views
Problem: Using deprecated properties on controls in XML.
Fix Strategy: Replace with the current property.
7. Deprecated Aggregations in XML Views
Problem: Using deprecated aggregations.
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.
9. sap.ui.comp.variants.VariantManagement → sap.m.VariantManagement
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:
-
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:
sap.m.P13nDialog,sap.m.P13nColumnsPanel,sap.m.P13nSortPanel,sap.m.P13nGroupPanel,sap.m.P13nFilterPanelsap.m.TablePersoDialog,sap.m.TablePersoController,sap.m.TablePersoProvidersap.ui.table.TablePersoController
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:
-
Look up the replacement (for non-p13n controls) in:
- The details link from
npx @ui5/linter --details - UI5 API Reference using the
get_api_referencetool - The deprecation tables above
- The details link from
-
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:
Before:
After:
Notes
- 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 --detailsto get direct links to modernization documentation sap.f.IllustratedMessageandsap.f.Illustrationare deprecated in favor ofsap.m.IllustratedMessageandsap.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 therowModeaggregation - fix-partially-deprecated-apis: For partially deprecated API signatures (e.g.,
Parameters.get,View.create), use fix-partially-deprecated-apis instead of this skill


