This document lists APIs that are not replaced or can't be replaced automatically by the UI5 linter at this time. These APIs require manual modification or special handling.
Note: This list is not exhaustive; there are more APIs that are currently not replaced automatically. This document provides examples of common APIs that require manual modification.
- Scope of Autofix
- Code outside of
sap.ui.define/sap.ui.require- Most fixes require a new module import, which cannot be added automatically if the code is not inside asap.ui.defineorsap.ui.requireblock - Change from sync to async APIs - Requires restructuring code flow (often affecting multiple files), which cannot be done automatically
- Complex API replacements - Some APIs require complex replacements with multiple API calls and new local variables, this is currently not supported
- Context-dependent replacements - Some replacements depend on how the API is used in the broader context
- Return value usage - Some return types or values differ, making automatic replacements impossible if the return value is used
- jQuery.sap.act - Successor module is private, see #563
- jQuery.sap.getObject - No direct replacement, see #529
- jQuery.sap.getUriParameters - No direct replacement, see #530
- jQuery.sap.isSpecialKey - No direct replacement, see #543
- jQuery.sap.registerModulePath - Currently not implemented, see #588
- jQuery.sap.registerResourcePath - Currently not implemented, see #588
- jQuery.sap.removeUrlWhitelist - Too complex, see #657
- All deprecated jQuery plugins - Currently not detected by UI5 linter and therefore cannot be fixed automatically, see #580
- Missing plugin module dependencies - Not detected automatically, so the linter cannot add missing dependencies to the corresponding plugin modules, see #580
- Assignments to global variables - Cannot be replaced automatically
deleteexpressions on globals - Cannot be replaced automatically, see #668- Third-party modules - Usages of third-party modules (
sap/ui/thirdparty/*) via globals (such asjQuery) are currently not replaced automatically
- Pseudo module imports - Currently not implemented, see #715
Core APIs (See #619)
Many methods on the Core API (accessed via either the sap/ui/core/Core module import or via sap.ui.getCore()) cannot be replaced automatically:
- Core#getTemplate - Concept has been discarded
- Core#attachLocalizationChanged - Event object has a different API
- Core#detachLocalizationChanged - Event object has a different API
- Core#attachThemeChanged - Event object has a different API
- Core#detachThemeChanged - Event object has a different API
- Core#attachControlEvent - Concept has been discarded
- Core#detachControlEvent - Concept has been discarded
- Core#attachFormatError - Replacement only available on ManagedObject
- Core#attachParseError - Replacement only available on ManagedObject
- Core#attachValidationError - Replacement only available on ManagedObject
- Core#attachValidationSuccess - Replacement only available on ManagedObject
- Core#detachFormatError - Replacement only available on ManagedObject
- Core#detachParseError - Replacement only available on ManagedObject
- Core#detachValidationError - Replacement only available on ManagedObject
- Core#detachValidationSuccess - Replacement only available on ManagedObject
- Core#fireFormatError - Replacement only available on ManagedObject
- Core#fireParseError - Replacement only available on ManagedObject
- Core#fireValidationError - Replacement only available on ManagedObject
- Core#fireValidationSuccess - Replacement only available on ManagedObject
- Core#createRenderManager - Concept has been discarded
- Core#getRenderManager - Concept has been discarded
- Core#getModel - Replacement only available on ManagedObject
- Core#setModel - Replacement only available on ManagedObject
- Core#hasModel - Replacement only available on ManagedObject
- Core#getApplication - Concept has been discarded
- Core#getRootComponent - No direct replacement
- Core#getLoadedLibraries - No direct replacement
- Core#getMessageManager - Different return types, manual modification necessary
- Core#createUIArea - No direct replacement
- Core#getUIArea - Cannot determine whether the static UIArea is requested
- Core#getUIDirty - Concept has been discarded
- Core#applyChanges - Concept has been discarded
- Core#includeLibraryTheme - No replacement
- Core#isInitialized - Use Core#ready instead
- Core#isLocked - Concept has been discarded
- Core#isThemeApplied - Developers should replace with theme-applied event
- Core#lock - Concept has been discarded
- Core#registerPlugin - Concept has been discarded
- Core#setRoot - No direct replacement
- Core#setThemeRoot - No direct replacement
- Core#unlock - Concept has been discarded
- Core#unregisterPlugin - Concept has been discarded
- Core.extend - No direct replacement
- Core.getMetadata - No direct replacement
Core Configuration APIs (See #620)
Some methods on the Configuration API (accessed via either the sap/ui/core/Configuration module import or via sap.ui.getCore().getConfiguration()) cannot be replaced automatically:
- Configuration.applySettings - No direct replacement
- Configuration.getAnimation - Currently not implemented, see #620
- Configuration.getAppCacheBuster - No replacement
- Configuration.getAppCacheBusterMode - No replacement
- Configuration.getApplication - Concept has been discarded
- Configuration.getAutoAriaBodyRole - No replacement
- Configuration.getCompatibilityVersion - Concept has been discarded
- Configuration.getDebug - No replacement
- Configuration.getFileShareSupport - No replacement
- Configuration.getFiori2Adaptation - No replacement
- Configuration.getFlexibilityServices - Concept has been discarded
- Configuration.getFormatSettings - Complex replacement
- Configuration.getInspect - Concept has been discarded
- Configuration.getManifestFirst - No replacement
- Configuration.getNoDuplicateIds - Concept has been discarded
- Configuration.getOriginInfo - Concept has been discarded
- Configuration.getRootComponent - Concept has been discarded
- Configuration.getStatisticsEnabled - No replacement
- Configuration.getVersion - Sync to async replacement
Currently, UI5 linter cannot automatically replace APIs that execute synchronously if their replacement would execute asynchronously (i.e. returns a promise). This is a general restriction as it would require restructuring the code flow. Examples include:
- Core#loadLibrary
- Only replaced with
sap/ui/core/Lib.load()ifasync: trueis explicitly specified - Synchronous library loading cannot be automatically replaced
- Only replaced with
- Core#createComponent
- Only replaced with
sap/ui/core/Component.create()ifasync: trueis explicitly specified - Synchronous component creation cannot be automatically replaced
- Only replaced with
- Core#getLibraryResourceBundle
- Not replaced if any argument is a boolean with value true (which would make it return a promise)
- Synchronous resource bundle loading cannot be automatically replaced with asynchronous
- Component creation:
sap.ui.component()→Component.create() - View creation:
sap.ui.view()→View.create() - Fragment loading:
sap.ui.xmlfragment()→Fragment.load() - XMLView loading:
sap.ui.xmlview()→XMLView.create() - JSONView loading:
sap.ui.jsonview()→JSONView.create() - JSView loading:
sap.ui.jsview()→JSView.create() - HTMLView loading:
sap.ui.htmlview()→HTMLView.create()