Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit 8513a04

Browse files
committed
AC-1537: Added UCT error codes coming from magento-coding-standards
1 parent 02d012a commit 8513a04

File tree

1 file changed

+53
-53
lines changed

1 file changed

+53
-53
lines changed

src/_includes/upgrade/uct-error-reference.md

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -98,56 +98,56 @@ Custom code errors are raised when custom code is using the Adobe Commerce entry
9898
| 5003 | Function has been deprecated | Use an alternative function |
9999
| 5005 | PHP syntax error | Fix syntax error |
100100
| 5006 | Proxies and interceptors MUST never be explicitly requested in constructors | Pass original base classes in constructor instead |
101-
| 5007 | The use of function sizeof() is discouraged | Use count() instead |
102-
| 5007 | The use of function delete() is discouraged | Use unset() instead |
101+
| 5007 | The use of function `sizeof()` is discouraged | Use `count()` instead |
102+
| 5007 | The use of function `delete()` is discouraged | Use `unset()` instead |
103103
| 5008 | Possible Magento 2 design violation. Detected typical Magento 1.x construction | Update code to use Magento 2 standards |
104104
| 5009 | Template directives may not invoke methods. Only scalar array access is allowed | Remove method invocations from template |
105-
| 5010 | Template @vars comment block contains invalid JSON | Fix invalid JSON |
106-
| 5011 | Template @vars comment block contains invalid label | Fix invalid label |
107-
| 5012 | Template @vars comment block is missing a variable used in the template | Add missing variable to @vars comment block |
105+
| 5010 | Template `@vars` comment block contains invalid JSON | Fix invalid JSON |
106+
| 5011 | Template `@vars` comment block contains invalid label | Fix invalid label |
107+
| 5012 | Template `@vars` comment block is missing a variable used in the template | Add missing variable to @vars comment block |
108108
| 5013 | Avoid using self-closing tag with non-void html element | Use close tag instead |
109-
| 5014 | The "active" attribute is obsolete | The list of active modules is defined in deployment configuration |
110-
| 5015 | The <param> node is obsolete | Use <argument name="..." xsi:type="..."> instead |
111-
| 5016 | The <instance> node is obsolete | Use <argument name="..." xsi:type="object"> instead |
112-
| 5017 | The <array> node is obsolete | Use <argument name="..." xsi:type="array"> instead |
113-
| 5018 | The <item key="..."> node is obsolete | Use <item name="..." xsi:type="..."> instead |
114-
| 5019 | The <value> node is obsolete | Instead, provide the actual value as a text literal. |
115-
| 5020 | Obsolete node: <supported_blocks> | To be replaced with <supported_containers> |
116-
| 5021 | Obsolete node: <block_name> | To be replaced with <container_name> |
109+
| 5014 | The `"active"` attribute is obsolete | The list of active modules is defined in deployment configuration |
110+
| 5015 | The `<param>` node is obsolete | Use `<argument name="..." xsi:type="...">` instead |
111+
| 5016 | The `<instance>` node is obsolete | Use `<argument name="..." xsi:type="object">` instead |
112+
| 5017 | The `<array>` node is obsolete | Use `<argument name="..." xsi:type="array">` instead |
113+
| 5018 | The `<item key="...">` node is obsolete | Use `<item name="..." xsi:type="...">` instead |
114+
| 5019 | The `<value>` node is obsolete | Instead, provide the actual value as a text literal. |
115+
| 5020 | Obsolete node: `<supported_blocks>` | To be replaced with `<supported_containers>` |
116+
| 5021 | Obsolete node: `<block_name>` | To be replaced with `<container_name>` |
117117
| 5022 | Factory name detected | Widget type should not begin with / |
118118
| 5023 | Obsolete ACL structure detected in line | Check lib/internal/Magento/Framework/Acl/etc/acl.xsd |
119119
| 5024 | Obsolete menu structure detected in line | Check app/code/Magento/Backend/etc/menu.xsd |
120120
| 5025 | Obsolete system configuration structure detected in file | Check app/code/Magento/Config/etc/system_file.xsd |
121-
| 5026 | Please do not use "text/javascript" type attribute | Use only public members |
122-
| 5027 | Access to members and methods of Block class through $this is obsolete in phtml templates | Use only $block instead of $this |
123-
| 5028 | Access to protected and private members of Block class is obsolete in phtml templates | Use only public members |
124-
| 5029 | Please do not use "jquery/ui" library in templates | Use needed jquery ui widget instead |
121+
| 5026 | Please do not use `"text/javascript"` type attribute | Use only public members |
122+
| 5027 | Access to members and methods of Block class through $this is obsolete in phtml templates | Use only `$block` instead of `$this` |
123+
| 5028 | Access to protected and private members of `Block` class is obsolete in phtml templates | Use only public members |
124+
| 5029 | Please do not use `"jquery/ui"` library in templates | Use needed jquery ui widget instead |
125125
| 5030 | Please do not initialize JS component in PHP | initialize JS component in template |
126-
| 5031 | Contains obsolete method 'xxx' | Please use getConnection() method instead. |
127-
| 5032 | loadLayout method is deprecated | Please use \Magento\Framework\View\Layout\Builder::build instead. |
128-
| 5033 | renderLayout method is deprecated | Please use \Magento\Framework\Controller\ResultInterface::renderResult instead. |
129-
| 5034 | _redirect method is deprecated | Please use \Magento\Backend\Model\View\Result\Redirect::render instead. |
130-
| 5035 | _forward method is deprecated | Please use \Magento\Backend\Model\View\Result\Forward::forward instead. |
131-
| 5036 | _setActiveMenu method is deprecated | Please use \Magento\Backend\Model\View\Result\Page::setActiveMenu instead. |
132-
| 5037 | _addBreadcrumb method is deprecated | Please use \Magento\Backend\Model\View\Result\Page::addBreadcrumb instead. |
133-
| 5038 | _addContent method is deprecated | Please use \Magento\Backend\Model\View\Result\Page::addContent instead. |
134-
| 5039 | _addLeft method is deprecated | Please use \Magento\Backend\Model\View\Result\Page::addLeft instead. |
135-
| 5040 | _addJs method is deprecated | Please use \Magento\Backend\Model\View\Result\Page::addJs instead |
136-
| 5041 | _moveBlockToContainer method is deprecated | Please use \Magento\Backend\Model\View\Result\Page::moveBlockToContainer instead. |
126+
| 5031 | Contains obsolete method `'xxx'` | Please use `getConnection()` method instead. |
127+
| 5032 | `loadLayout` method is deprecated | Please use `\Magento\Framework\View\Layout\Builder::build` instead. |
128+
| 5033 | `renderLayout` method is deprecated | Please use `\Magento\Framework\Controller\ResultInterface::renderResult` instead. |
129+
| 5034 | `_redirect` method is deprecated | Please use `\Magento\Backend\Model\View\Result\Redirect::render` instead. |
130+
| 5035 | `_forward` method is deprecated | Please use `\Magento\Backend\Model\View\Result\Forward::forward` instead. |
131+
| 5036 | `_setActiveMenu` method is deprecated | Please use `\Magento\Backend\Model\View\Result\Page::setActiveMenu` instead. |
132+
| 5037 | `_addBreadcrumb` method is deprecated | Please use `\Magento\Backend\Model\View\Result\Page::addBreadcrumb` instead. |
133+
| 5038 | `_addContent` method is deprecated | Please use `\Magento\Backend\Model\View\Result\Page::addContent` instead. |
134+
| 5039 | `_addLeft` method is deprecated | Please use `\Magento\Backend\Model\View\Result\Page::addLeft` instead. |
135+
| 5040 | `_addJs` method is deprecated | Please use `\Magento\Backend\Model\View\Result\Page::addJs` instead |
136+
| 5041 | `_moveBlockToContainer` method is deprecated | Please use `\Magento\Backend\Model\View\Result\Page::moveBlockToContainer` instead. |
137137
| 5042 | Incorrect format of PHP class reference | Check that class is referenced using only camelCased letters, numbers and no leading slash |
138138
| 5043 | Incorrect format of module reference | Check that module is referenced using only letters, numbers, underscores and no leading slash |
139-
| 5044 | Class 'Zend_Db_Select' is restricted | Suggested replacement: \Magento\Framework\DB\Select |
140-
| 5045 | Class 'Zend_Db_Adapter_Pdo_Mysql' is restricted | Suggested replacement: \Magento\Framework\DB\Adapter\Pdo\Mysql |
141-
| 5046 | Class 'Magento\Framework\Serialize\Serializer\Serialize' is restricted | Suggested replacement: Magento\Framework\Serialize\SerializerInterface |
142-
| 5047 | Class 'ArrayObject' is restricted | Suggested replacement: Custom class, extended from ArrayObject with overwritten serialize/unserialize methods |
143-
| 5048 | Class 'Magento\Framework\View\Element\UiComponent\ArrayObjectFactory' is restricted | Suggested replacement: Factory that creates custom class, extended from ArrayObject with overwritten serialize/unserialize methods |
144-
| 5049 | Blocks \Magento\Theme\Block\Html\Head\{Css,Link,Script} are allowed within the "head" block only | Verify integrity of the nodes nesting |
139+
| 5044 | Class `Zend_Db_Select` is restricted | Suggested replacement: `\Magento\Framework\DB\Select` |
140+
| 5045 | Class `Zend_Db_Adapter_Pdo_Mysql` is restricted | Suggested replacement: `\Magento\Framework\DB\Adapter\Pdo\Mysql` |
141+
| 5046 | Class `Magento\Framework\Serialize\Serializer\Serialize` is restricted | Suggested replacement: `Magento\Framework\Serialize\SerializerInterface` |
142+
| 5047 | Class `ArrayObject` is restricted | Suggested replacement: Custom class, extended from `ArrayObject` with overwritten serialize/unserialize methods |
143+
| 5048 | Class `Magento\Framework\View\Element\UiComponent\ArrayObjectFactory` is restricted | Suggested replacement: Factory that creates custom class, extended from `ArrayObject` with overwritten serialize/unserialize methods |
144+
| 5049 | Blocks `\Magento\Theme\Block\Html\Head\{Css,Link,Script}` are allowed within the "head" block only | Verify integrity of the nodes nesting |
145145
| 5050 | The block being referenced is removed | Remove reference to block |
146-
| 5051 | output="toHtml" is obsolete | Use output="1" |
147-
| 5052 | The class '\Magento\Framework\View\Element\Text\ListText' is not supposed to be used in layout anymore | Remove class '\Magento\Framework\View\Element\Text\ListText' from layout |
148-
| 5053 | Call of method "xx" via layout instruction <action> is not allowed | Avoid using offending method in <action> |
149-
| 5054 | 'helper' attribute contains '/' | Remove '/' from helper attribute |
150-
| 5055 | 'helper' attribute does not contain '::' | Add '::' to helper attribute |
146+
| 5051 | `output="toHtml"` is obsolete | Use `output="1"` |
147+
| 5052 | The class `\Magento\Framework\View\Element\Text\ListText` is not supposed to be used in layout anymore | Remove class `\Magento\Framework\View\Element\Text\ListText` from layout |
148+
| 5053 | Call of method "xx" via layout instruction `<action>` is not allowed | Avoid using offending method in <action> |
149+
| 5054 | `helper` attribute contains `/` | Remove `/` from helper attribute |
150+
| 5055 | `helper` attribute does not contain `::` | Add `::` to helper attribute |
151151
| 5056 | Install scripts are obsolete | Please use declarative schema approach in module\'s etc/db_schema.xml file |
152152
| 5057 | InstallSchema scripts are obsolete | Please use declarative schema approach in module\'s etc/db_schema.xml file |
153153
| 5058 | InstallData scripts are obsolete | Please use data patches approach in module\'s Setup/Patch/Data dir |
@@ -160,13 +160,13 @@ Custom code errors are raised when custom code is using the Adobe Commerce entry
160160
| 5065 | 'data' is in an invalid directory | Create 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. |
161161
| 5066 | 'sql' is in an invalid directory | Create 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. |
162162
| 5067 | Nodes identified by XPath 'xx' are obsolete | Use suggestion from error message itself |
163-
| 5068 | Directive {{htmlescape}} is obsolete | Use {{var}} instead |
164-
| 5069 | Directive {{escapehtml}} is obsolete | Use {{var}} instead |
165-
| 5070 | 3rd parameter is not needed anymore for getChildHtml() | Remove 3rd parameter from call to getChildHtml() |
166-
| 5071 | 4th parameter is not needed anymore for getChildHtml() | Remove 4th parameter from call to getChildHtml() |
163+
| 5068 | Directive `{{htmlescape}}` is obsolete | Use `{{var}}` instead |
164+
| 5069 | Directive `{{escapehtml}}` is obsolete | Use `{{var}}` instead |
165+
| 5070 | 3rd parameter is not needed anymore for `getChildHtml()` | Remove 3rd parameter from call to `getChildHtml()` |
166+
| 5071 | 4th parameter is not needed anymore for `getChildHtml()` | Remove 4th parameter from call to `getChildHtml()` |
167167
| 5072 | Possible Magento 2 design violation. Detected typical Magento 1.x construction | Update construction to Magento 2 standards |
168168
| 5073 | Legacy table names with slash must be fixed to direct table names | Use direct table name instead |
169-
| 5074 | Use of deprecated method 'getResource()' to (save / load / delete) data detected. | Use a repository instead |
169+
| 5074 | Use of deprecated method `getResource()` to (save / load / delete) data detected. | Use a repository instead |
170170
| 5075 | Application modules should not use classes from test modules | Remove usage of classes from test modules |
171171
| 5076 | Cannot use "xxx" in namespace as it is reserved since PHP 7 | Remove usage of "xxx" from namespace |
172172
| 5077 | Cannot use "xxx" as class name as it is reserved since PHP 7 | Remove usage of "xxx" from class name |
@@ -177,15 +177,15 @@ Custom code errors are raised when custom code is using the Adobe Commerce entry
177177
| 5082 | The use of $this in templates is deprecated | Use $block instead |
178178
| 5083 | Constants are not allowed as the first argument of translation function | use string literal instead |
179179
| 5084 | Please do not initialize JS component in php | Initialize JS component in template |
180-
| 6001 | jQuery.andSelf() removed | Use jQuery.addBack() |
181-
| 6002 | jQuery $.bind and $.unbind are deprecated | Use $.on and $.off instead |
182-
| 6003 | Instead of .blur(fn), .focus(fn), focusin(fn), .focusout(fn), .resize(fn), .scroll(fn), .dblclick(fn), .mousedown(fn), .mouseup(fn), .mousemove(fn), .mouseover(fn), .mouseout(fn), .mouseenter(fn), .mouseleave(fn), .change(fn), .select(fn), .submit(fn), .keydown(fn), .keypress(fn), .keyup(fn), .contextmenu(fn) or .click(fn) | use .on("blur", fn), .on("focus", fn), .on("focusin", fn), .on("focusout", fn), .on("resize", fn), .on("scroll", fn), .on("dblclick", fn), .on("mousedown", fn), .on("mouseup", fn), .on("mousemove", fn), .on("mouseover", fn), .on("mouseout", fn), .on("mouseenter", fn), .on("mouseleave", fn), .on("change", fn), .on("select", fn), .on("submit", fn), .on("keydown", fn), .on("keypress", fn), .on("keyup", fn), .on("contextmenu", fn) or .on("click", fn) |
183-
| 6003 | Instead of .blur(), .focus(), focusin(), .focusout(), .resize(), .scroll(), .dblclick(), .mousedown(), .mouseup(), .mousemove(), .mouseover(), .mouseout(), .mouseenter(), .mouseleave(), .change(), .select(), .submit(), .keydown(), .keypress(), .keyup(), .contextmenu() or .click() | use .trigger("blur"), .trigger("focus"), .trigger("focusin"), .trigger("focusout"), .trigger("resize"), .trigger("scroll"), .trigger("dblclick"), .trigger("mousedown"), .trigger("mouseup"), .trigger("mousemove"), .trigger("mouseover"), .trigger("mouseout"), .trigger("mouseenter"), .trigger("mouseleave"), .trigger("change"), .trigger("select"), .trigger("submit"), .trigger("keydown"), .trigger("keypress"), .trigger("keyup"), .trigger("contextmenu") or .trigger("click") |
184-
| 6004 | jQuery $.delegate and $.undelegate are deprecated | Use $.on and $.off instead |
185-
| 6005 | (jQuery.load() / jQuery.unload() / jQuery.error()) was removed | Use (.on("load", fn), .on("unload", fn), .on("error", fn)) instead |
186-
| 6006 | jQuery.size() removed | Use jQuery.length |
187-
| 6007 | jQuery.trim is deprecated | Use String.prototype.trim |
188-
| 6008 | (addButton, addContextToolbar, addMenuItem, addSidebar, file_browser_callback, insert_button_items, 'inlite' theme, 'mobile' theme, 'modern' theme) is removed | Update code to be compatible with tinymce5 |
180+
| 6001 | `jQuery.andSelf()` removed | Use `jQuery.addBack()` |
181+
| 6002 | jQuery `$.bind` and `$.unbind` are deprecated | Use `$.on` and `$.off` instead |
182+
| 6003 | Instead of `.blur(fn)`, `.focus(fn)`, `.focusin(fn)`, `.focusout(fn)`, `.resize(fn)`, `.scroll(fn)`, `.dblclick(fn)`, `.mousedown(fn)`, `.mouseup(fn)`, `.mousemove(fn)`, `.mouseover(fn)`, `.mouseout(fn)`, `.mouseenter(fn)`, `.mouseleave(fn)`, `.change(fn)`, `.select(fn)`, `.submit(fn)`, `.keydown(fn)`, `.keypress(fn)`, `.keyup(fn)`, `.contextmenu(fn)` or `.click(fn)` | Use `.on("blur", fn)`, `.on("focus", fn)`, `.on("focusin", fn)`, `.on("focusout", fn)`, `.on("resize", fn)`, `.on("scroll", fn)`, `.on("dblclick", fn)`, `.on("mousedown", fn)`, `.on("mouseup", fn)`, `.on("mousemove", fn)`, `.on("mouseover", fn)`, `.on("mouseout", fn)`, `.on("mouseenter", fn)`, `.on("mouseleave", fn)`, `.on("change", fn)`, `.on("select", fn)`, `.on("submit", fn)`, `.on("keydown", fn)`, `.on("keypress", fn)`, `.on("keyup", fn)`, `.on("contextmenu", fn)` or `.on("click", fn)` |
183+
| 6003 | Instead of `.blur()`, `.focus()`, `.focusin()`, `.focusout()`, `.resize()`, `.scroll()`, `.dblclick()`, `.mousedown()`, `.mouseup()`, `.mousemove()`, `.mouseover()`, `.mouseout()`, `.mouseenter()`, `.mouseleave()`, `.change()`, `.select()`, `.submit()`, `.keydown()`, `.keypress()`, `.keyup()`, `.contextmenu()` or `.click()` | Use `.trigger("blur")`, `.trigger("focus")`, `.trigger("focusin")`, `.trigger("focusout")`, `.trigger("resize")`, `.trigger("scroll")`, `.trigger("dblclick")`, `.trigger("mousedown")`, `.trigger("mouseup")`, `.trigger("mousemove")`, `.trigger("mouseover")`, `.trigger("mouseout")`, `.trigger("mouseenter")`, `.trigger("mouseleave")`, `.trigger("change")`, `.trigger("select")`, `.trigger("submit")`, `.trigger("keydown")`, `.trigger("keypress")`, `.trigger("keyup")`, `.trigger("contextmenu")` or `.trigger("click")` |
184+
| 6004 | jQuery `$.delegate` and `$.undelegate` are deprecated | Use `$.on` and `$.off` instead |
185+
| 6005 | (`jQuery.load()` / `jQuery.unload()` / `jQuery.error()`) was removed | Use (`.on("load", fn)` / `.on("unload", fn)` / `.on("error", fn)`) instead |
186+
| 6006 | `jQuery.size()` removed | Use `jQuery.length` |
187+
| 6007 | `jQuery.trim` is deprecated | Use `String.prototype.trim` |
188+
| 6008 | (`addButton`, `addContextToolbar`, `addMenuItem`, `addSidebar`, `file_browser_callback`, `insert_button_items`, 'inlite' theme, 'mobile' theme, 'modern' theme) is removed | Update code to be compatible with tinymce5 |
189189

190190
## Warnings
191191

0 commit comments

Comments
 (0)