Custom code

Critical errors are raised when the custom code is referencing entities that are not present in the target Adobe Commerce version. These errors are also reported when critical coding standards have been broken.

Error codeError descriptionSuggested action
1110Instantiating non-existent Adobe Commerce class/interfaceUpdate code to use a class marked as @api. Instantiating non-existent Adobe Commerce class/interface.
1111Extending from non-existent Adobe Commerce classThe extended class is no longer present in the codebase. Inheritance is not recommended way of extending Adobe Commerce functionality. Update code to use a class marked as @api.
1112Importing non-existent Adobe Commerce classUpdate code to use a class marked as @api.
1113Loading non-existent Adobe Commerce classUpdate code to use a class marked as @api.
1114Using non-existent Adobe Commerce classUpdate code to use a class marked as @api.
1214Using non-existent Adobe Commerce constantConsider introducing and using a private constant of the required value within the custom code instead.
1215Overriding non-existent Adobe Commerce constantConsider introducing and using a private constant of the required value within the custom code instead.
1216Assignation of non-existent Adobe Commerce constantConsider introducing and using a private constant of the required value within the custom code instead.
1312Imported non-existent Adobe Commerce interfaceConsider removing the inheritance or replacing it with the interface introduced in the scope of the customization.
1314Used non-existent Adobe Commerce interfaceConsider removing the inheritance or replacing it with the interface introduced in the scope of the customization.
1317Inherited non-existent Adobe Commerce interfaceConsider removing the inheritance or replacing it with the interface introduced in the scope of the customization.
1318Implemented non-existent Adobe Commerce interfaceConsider removing the inheritance or replacing it with the interface introduced in the scope of the customization.
1410Call non-existent Adobe Commerce methodUpdate code to use a class marked as @api.
1514Using non-existent Adobe Commerce propertyUpdate code to use a class marked as @api.
1515Overriding non-existent Adobe Commerce propertyUpdate code to use a class marked as @api.
1516Assignation of non-existent Adobe Commerce propertyUpdate code to use a class marked as @api. Update the property access level to private if it can be used within a single class only.
5002The opening PHP tag must be the first content in the fileEnsure there is no content in the file before the PHP opening tag.
5003Function has been deprecatedUse a replacement suggested in the error message. If the message does not suggest a replacement, a close review is needed to select an alternative function or implementation.
5005PHP syntax errorThe code must be updated to comply with the PHP syntax standards.
5072Possible Magento 2 design violation. Detected a typical Magento 1.x constructionUpdate construction to Magento 2 standards.
5076Cannot use in namespace as it is reserved since PHP 7Replace the reserved word in the namespace with a non-reserved keyword.
5077Cannot use as class name as it is reserved since PHP 7Replace the reserved class name with a non-reserved name.

DB Schema

DB Schema critical issues are reported if removed core tables or columns are referenced by custom constraints.

Error codeError descriptionSuggested action
7009Custom constraint is referencing a core table that was removed in the target versionRemove the constraint or update referenceTable and referenceColumn attributes
7010Custom constraint is referencing a core column that was removed in the target versionRemove the constraint or update the referenceColumn attribute

GraphQL Schema

GraphQL Schema critical issues are raised if the schema items are not present in the target version.

Error codeError descriptionSuggested action
3101Type was removedList all queries that are referencing this field. Check if these queries are used by the customization implementation. Update the client code to handle the changed query interface.
3102Type removed from unionIf the union type is used in the GraphQL request constructing or response processing implementation it may need to be updated.
3103Field removedCheck if the field is referenced in the customization codebase. Adjust the implementation to correctly handle the new field type.
3105Implemented interface removedCheck if the type implementing the removed interface is used in the customization. The implementation may need to be updated if it is relying on the removed interface.
3106Value removed from enumIf the removed enum value is used in the GraphQL request constructing or response processing implementation it may need to be updated.
3107Argument removedCheck if the field is used in the customization codebase. Remove the argument for this field.
3109Directive removedCheck if the directive is used in the customization codebase. Adjust the implementation to remove the reference to the directive.
3110Directive argument removedCheck if the directive is used in the customization codebase. Remove the directive argument.
3111Directive repeatable removedCheck if the directive is used in the customization codebase. Adjust the implementation to handle the interface changes.
3112Directive location removedCheck if the directive is used in the customization codebase. Adjust the implementation to handle the interface changes.
3201Type changed kindList all queries that are referencing this field. Check if these queries are used by the customization implementation. Update the client code to handle the changed query interface.
3203Field changed kindCheck if the field is referenced in the customization codebase. Adjust the implementation to correctly handle the new field type.
3207Argument changed kindCheck if the field is used in the customization codebase. Update the argument type for this field.
3303Required input field addedThe field should be added to the request if the query including this field is used for the customization.
3307Required argument addedCheck if the field is used in the customization codebase. The new required argument should be specified when using the field.
3310Required directive argument addedCheck if the directive is used in the customization codebase. Add the directive argument.

Errors

Custom code

Custom code errors are raised when custom code is using the Adobe Commerce entry points that are not considered/marked as @api. The preserved behavior of such entry points is not guaranteed. The customization should rely on @api entry points instead. The functionality that is based on non-API Adobe Commerce code should be tested after the upgrade. These errors are also reported when major coding standards have been broken.

Error codeError descriptionSuggested action
1104Using non-API class that is inheriting API interfaceClasses that are not marked as @api may be changed. Consider updating the code to rely on the interface marked as @api instead. Otherwise, the functionality relying on this implementation should be tested after the upgrade.
1121Extending from non-Adobe Commerce API classThe extended class is no longer present in the codebase. Inheritance is not recommended way of extending Adobe Commerce functionality. Update code to use a class marked as @api.
1122Importing non-Adobe Commerce API classThe extended class is no longer present in the codebase. Update code to use a class marked as @api. Otherwise, the functionality relying on this implementation should be tested after the upgrade.
1123Loading non-Adobe Commerce API classThe extended class is no longer present in the codebase. Update code to use a class marked as @api. Otherwise, the functionality relying on this implementation should be tested after the upgrade.
1124Using non-Adobe Commerce API classThe extended class is no longer present in the codebase. Update code to use a class marked as @api. Otherwise, the functionality relying on this implementation should be tested after the upgrade.
1224Using non-Adobe Commerce API constantConstants that are not marked as @api may be changed. Consider introducing and using a private constant of the required value within the custom code instead.
1225Overriding non-Adobe Commerce API constantConstants that are not marked as @api may be changed. Consider introducing and using a private constant of the required value within the custom code instead.
1226Assignation of non-Adobe Commerce API constantConstants that are not marked as @api may be changed. Consider introducing and using a private constant of the required value within the custom code instead.
1322Imported non-Adobe Commerce API interfaceInterfaces not marked as @api may be changed. Consider removing this inheritance or replacing it with inheritance from the Adobe Commerce interface that is marked as @api or an interface introduced in the scope of customization code.
1324Used non-Adobe Commerce API interfaceInterfaces not marked as @api may be changed. Consider removing this inheritance or replacing it with inheritance from the Adobe Commerce interface that is marked as @api or an interface introduced in the scope of customization code.
1327Inherited non-Adobe Commerce API interfaceConstants that are not marked as @api may be changed. Consider introducing and using a private constant of the required value within the custom code instead.
1328Implemented non-Adobe Commerce API interfaceInterfaces not marked as @api may be changed. Consider removing this inheritance or replacing it with inheritance from the Adobe Commerce interface that is marked as @api or an interface introduced in the scope of customization code.
1420Instantiating non-Adobe Commerce API class/interfaceClasses that are not marked as @api may be changed. Consider updating the code to rely on the interface marked as @api instead. Otherwise, the functionality relying on this implementation should be tested after the upgrade. Also, the recommended way of retrieving an instance of the class is using DI. Consider using a factory if a new instance of the class is required.
1428Possible dependency on implementation details.Classes that are not marked as @api may be changed. Consider updating the code to rely on the interface marked as @api instead. Otherwise, the functionality relying on this implementation should be tested after the upgrade.
1429Call non-Adobe Commerce API methodsMethods that are not marked as @api or are not declared within API class/interface may be changed. Even if the interface of the method is not updated in the new version, its behaviour or output can be different. Consider relying on an interface method. Otherwise, the functionality relying on this implementation should be tested after the upgrade.
1449Call to non-interface method (that is present in implementation)Methods that are not declared in the interface may be changed. Consider relying on an interface method. Otherwise, the functionality relying on this implementation should be tested after the upgrade.
1524Using non-Adobe Commerce API propertyValues of the properties that are not marked as @api may be changed. Consider relying on the API interface method instead.
1525Overriding non-Adobe Commerce API propertyValues of the properties that are not marked as @api may be changed. Consider relying on the API interface method instead.
1526Assignation of non-Adobe Commerce API propertyValues of the properties that are not marked as @api may be changed. Consider relying on the API interface method instead.
5004Function without argument has been deprecatedPass the input to validate as the first argument of the function.
5007The use of certain functions is discouragedAvoid using these functions.
5009Template directives may not invoke methods. Only scalar array access is allowedRemove method invocations from the template.
5010Template @vars comment block contains invalid JSONFix invalid JSON.
5011Template @vars comment block contains invalid labelFix invalid label.
5012Template @vars comment block is missing a variable used in the templateAdd missing variable to @vars comment block.
5013Avoid using self-closing tag with non-void html elementUse close tag instead.
5014The "active" attribute is obsoleteThe list of active modules is defined in deployment configuration.
5015The <param> node is obsoleteUse <argument name="..." xsi:type="..."> instead.
5016The <instance> node is obsoleteUse <argument name="..." xsi:type="object"> instead.
5017The <array> node is obsoleteUse <argument name="..." xsi:type="array"> instead.
5018The <item key="..."> node is obsoleteUse <item name="..." xsi:type="..."> instead.
5019The <value> node is obsoleteInstead, provide the actual value as a text literal.
5020Obsolete node: <supported_blocks>To be replaced with <supported_containers>.
5021Obsolete node: <block_name>To be replaced with <container_name>.
5022Factory name detectedWidget type should not begin with /.
5023Obsolete ACL structure detected in lineCheck lib/internal/Magento/Framework/Acl/etc/acl.xsd.
5024Obsolete menu structure detected in lineCheck app/code/Magento/Backend/etc/menu.xsd.
5025Obsolete system configuration structure detected in fileCheck app/code/Magento/Config/etc/system_file.xsd.
5026Do not use "text/javascript" type attributeUse only public members.
5028Access to protected and private members of Block class is obsolete in phtml templatesUse only public members.
5031Contains obsolete methodUse getConnection() method instead.
5042Incorrect format of PHP class referenceCheck that class is referenced using only camelCased letters, numbers, and no leading slash.
5043Incorrect format of module referenceCheck that module is referenced using only letters, numbers, underscores, and no leading slash.
5044Class Zend_Db_Select is restrictedSuggested replacement: \Magento\Framework\DB\Select.
5045Class Zend_Db_Adapter_Pdo_Mysql is restrictedSuggested replacement: \Magento\Framework\DB\Adapter\Pdo\Mysql.
5046Class Magento\Framework\Serialize\Serializer\Serialize is restrictedSuggested replacement: Magento\Framework\Serialize\SerializerInterface.
5047Class ArrayObject is restrictedSuggested replacement: Custom class, extended from ArrayObject with overwritten serialize/unserialize methods.
5048Class Magento\Framework\View\Element\UiComponent\ArrayObjectFactory is restrictedSuggested replacement: Factory that creates custom class, extended from ArrayObject with overwritten serialize/unserialize methods.
5050The block being referenced is removedRemove reference to block.
5051output="toHtml" is obsoleteUse output="1".
5052The class \Magento\Framework\View\Element\Text\ListText is not supposed to be used in layout anymoreRemove class \Magento\Framework\View\Element\Text\ListText from layout.
5053Call of method via layout instruction <action> is not allowedAvoid using offending method in <action>.
5054helper attribute contains /Remove / from helper attribute.
5055helper attribute does not contain ::Add :: to helper attribute.
5056Install scripts are obsoleteUse declarative schema approach in module's etc/db_schema.xml file.
5057InstallSchema scripts are obsoleteUse declarative schema approach in module's etc/db_schema.xml file.
5058InstallData scripts are obsoleteUse data patches approach in module's Setup/Patch/Data dir.
5059Install scripts are obsoleteCreate a class InstallData in the module's Setup folder.
5060Upgrade scripts are obsoleteUse declarative schema approach in module's etc/db_schema.xml file.
5061UpgradeSchema scripts are obsoleteUse declarative schema approach in module's etc/db_schema.xml file.
5062UpgradeData scripts are obsoleteUse data patches approach in module's Setup/Patch/Data dir.
5063Upgrade scripts are obsoleteUse data patches approach in the module's Setup/Patch/Data dir.
5064Recurring scripts are obsoleteCreate class Recurring in the module's Setup folder.
5065‘data’ is in an invalid directoryCreate a data patch within module’s Setup/Patch/Data folder for data upgrades or use declarative schema approach in module’s etc/db_schema.xml file for schema changes.
5066‘sql’ is in an invalid directoryCreate a data patch within module’s Setup/Patch/Data folder for data upgrades or use declarative schema approach in module’s etc/db_schema.xml file for schema changes.
5067Nodes identified by XPath are obsoleteObsolete XML pointed out in the error should be updated. Follow the suggestions from the error message.
5068Directive {{htmlescape}} is obsoleteUse {{var}} instead.
5069Directive {{escapehtml}} is obsoleteUse {{var}} instead.
50703rd parameter is not needed anymore for getChildHtml()Remove 3rd parameter from call to getChildHtml().
50714th parameter is not needed anymore for getChildHtml()Remove 4th parameter from call to getChildHtml().
5073Legacy table names with slash must be fixed to direct table namesUse direct table name instead.
5075Application modules should not use classes from test modulesRemove usage of classes from test modules.
5078Class must be requested in constructor, otherwise compiler will not be able to find and generate these classesAdd class to constructor.
5079Use of var class variables is discouragedAvoid using ‘var’ to declare class variable.
5080Possible raw SQL statement detectedUse repositories or data patches instead.
5081The use of helpers in templates is discouragedUse ViewModel instead.
5082The use of $this in templates is deprecatedUse $block instead.
5083Constants are not allowed as the first argument of translation functionUse string literal instead.
5085The use of certain functions is discouragedUse the alternative function advised on the message instead.
5087PHP cross-version compatibility issueFollow the suggestions from the message and check the migration guide.
5088Optional parameters found after required onesMove required parameters after optional ones.
5089Method visibility final private foundChange method visibility from final private to only private.
5090Magic method __set_state is not defined as staticMagic method __set_state must be defined as static.
5091Class with __toString() method not inheriting from Stringable interfaceAdd Stringable interface to class with __toString() method.
5092is_resource() method used for functions that now return ObjectChange is_resource() to instanceof Object.
6001jQuery.andSelf() removedUse jQuery.addBack().
6002jQuery $.bind and $.unbind are deprecatedUse $.on and $.off instead.
6003jQuery method to subscribe to event is deprecated and shouldn’t be usedUse .on("event name", fn) method instead to subscribe to that event.
6003jQuery method to trigger event is deprecated and shouldn’t be usedUse .trigger("event name") method instead to trigger that event.
6004jQuery $.delegate and $.undelegate are deprecatedUse $.on and $.off instead.
6005(jQuery.load() / jQuery.unload() / jQuery.error()) was removedUse (.on("load", fn) / .on("unload", fn) / .on("error", fn)) instead.
6006jQuery.size() removedUse jQuery.length.
6007jQuery.trim is deprecatedUse String.prototype.trim.
6008(addButton, addContextToolbar, addMenuItem, addSidebar, file_browser_callback, insert_button_items, ‘inlite’ theme, ‘mobile’ theme, ‘modern’ theme) is removedUpdate code to be compatible with tinymce5.
6009jQuery.isFunction() is deprecatedIn most cases, it can be replaced by [typeof x === “function”].
6009jQuery.type() is deprecatedReplace with an appropriate type check like [typeof x === “function”].
6009jQuery.isArray() is deprecatedUse the native Array.isArray method instead.
6009jQuery.parseJSON() is deprecatedTo parse JSON strings, use the native JSON.parse method instead.
6010(jQuery.expr[":"], jQuery.expr.filters) is deprecatedUse jQuery.expr.pseudos instead.

DB Schema

DB Schema errors are raised if the database tables, columns, indexes or constraints, added or removed in the target Adobe Commerce version, may result into conflicts with custom database schema.

Error codeError descriptionSuggested action
7001The target core version introduces a table with the same name as a table declared by a custom moduleUse the new core table (if suitable) or rename the custom table
7002The core table that is extended by a custom module was removed in the target versionAll removed core table references should be removed from the codebase
7003The target core version introduces a column with the same name as a column declared by a custom moduleUse the new core column (if suitable) or rename the custom column
7004The core column that is extended by a custom module was removed in the target versionAll removed core column references should be removed from the codebase
7005The target core version introduces an index with the same referenceId as an index declared by a custom moduleRemove (if duplicate to the introduced core index) or rename the custom index
7006The core index that is extended by a custom module was removed in the target versionAll removed core index references should be removed from the codebase
7007The target core version introduces a constraint with the same name as a constraint declared by a custom moduleRemove (if duplicate to the introduced core constraint) or rename the custom constraint
7008The core constraint that is extended by a custom module was removed in the target versionUse the new core constraint (if suitable) or rename the custom constraint

Warnings

Core code

These warnings are reported when there are minor inconsistencies in the core codebase.

Error codeError descriptionSuggested action
2004Composer dependency version mismatchIssue indicates that Composer dependency version in etalon and actual project is different. Update dependency by running composer update <package_name>.

Custom code

Custom code warnings are raised when the references to deprecated code are detected. Such references should be replaced with the supported extension points. Pay attention to the @see annotation of deprecated item for recommendations. These errors are also reported when minor coding standards have been broken.

Error codeError descriptionSuggested action
1131Extending from Adobe Commerce @deprecated classThe extended class will be removed in upcoming versions. Inheritance is not recommended way of extending Adobe Commerce functionality. Update code to use a class marked as @api.
1132Importing Adobe Commerce @deprecated classThe extended class will be removed in upcoming versions. Consider using Adobe Commerce class marked as @api instead.
1133Loading Adobe Commerce @deprecated classThe extended class will be removed in upcoming versions. Consider using Adobe Commerce class marked as @api instead.
1134Using Adobe Commerce @deprecated classThe extended class will be removed in upcoming versions. Consider using Adobe Commerce class marked as @api instead.
1234Using Adobe Commerce @deprecated constantThe deprecated constant will be removed in upcoming versions. Consider using a constant marked as @api or a private constant within your implementation instead.
1235Overriding Adobe Commerce @deprecated constantThe deprecated constant will be removed in upcoming versions. Consider using a constant marked as @api or a private constant within your implementation instead.
1236Assignation of Adobe Commerce @deprecated constantThe deprecated constant will be removed in upcoming versions. Consider using a constant marked as @api or a private constant within your implementation instead.
1332Imported Adobe Commerce @deprecated interfaceThe deprecated interface will be removed in upcoming versions. Consider using an interface or class marked as @api instead.
1334Used Adobe Commerce @deprecated interfaceThe deprecated interface will be removed in upcoming versions. Consider using an interface or class marked as @api instead.
1337Inherited from Adobe Commerce @deprecated interfaceThe deprecated interface will be removed in upcoming versions. Consider removing the interface inheritance, using an interface marked as @api or an interface introduced within your implementation instead.
1338Implemented Adobe Commerce @deprecated interfaceThe deprecated interface will be removed in upcoming versions. Consider removing the interface inheritance, using an interface marked as @api or an interface introduced within your implementation instead.
1430Call not declared dataobject methodThe magic methods that are not declared may be changed. Consider relying on interface methods instead.
1439Call Adobe Commerce @deprecated methodThe deprecated method will be removed in upcoming versions. Consider relying on methods declared in API interfaces instead.
1440Method signature mismatchA call or override of core method is detected with parameters, arguments or return type that does not match the method signature.
1534Using Adobe Commerce @deprecated propertyThe deprecated method will be removed in upcoming versions. Consider relying on methods declared in API interfaces instead.
1535Overriding Adobe Commerce @deprecated propertyThe deprecated property will be removed in upcoming versions. Consider relying on methods declared in API interfaces or using a private property within your implementation instead.
1536Assignation of Adobe Commerce @deprecated propertyThe deprecated method will be removed in upcoming versions. Consider relying on methods declared in API interfaces instead.
5006Proxies and interceptors MUST never be explicitly requested in constructorsThe original class should be declared as a type of the constructor parameter. The Interceptor/Proxy class will be passed by the framework dependency injection implementation.
5074Use of deprecated method getResource() to (save / load / delete) data detected.Use a repository instead.
5086Visibility is not declared on a constantDeclare the visibility on all constants.

GraphQL Schema

GraphQL Schema warnings are raised when the additional items are added to the schema in the new version. It is recommended to review the implementation to see if they should be used for requests.

Error codeError descriptionSuggested action
3206Argument default value changedIf the query is used in the customization the argument value may have to be specified explicitly.
3302Type added to unionThe type was added to the union. Check the implementation processing the result of the query returning this union type and ensure it is able to handle the added type.
3304Optional input field addedOptional input field added. Check the implementation to ensure.
3305Implemented interface addedThe field can accept/provide more information that can be considered in the implementation.
3306Value added to enumA value was added to an enum. If clients contain a switch statement on the enum’s value and do not include a default case, this change might cause unexpected behavior.
3308Optional argument addedIf the query is using a new argument in the customization it may need to be added to the request.
Next pageRelated tools