You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: guides/v2.2/contributor-guide/backward-compatible-development/index.md
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -122,6 +122,8 @@ Add a new optional parameter to the constructor at the end of the arguments list
122
122
123
123
In the constructor body, if the new dependency is not provided (i.e. the value of the introduced argument is `null`), fetch the dependency using `Magento\Framework\App\ObjectManager::getInstance()`.
124
124
125
+
Prefix the type name with a question mark when declaring a parameter with a `null` default value.
Copy file name to clipboardExpand all lines: guides/v2.3/contributor-guide/backward-compatible-development/index.md
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -128,6 +128,8 @@ Add a new optional parameter to the constructor at the end of the arguments list
128
128
129
129
In the constructor body, if the new dependency is not provided (i.e. the value of the introduced argument is `null`), fetch the dependency using `Magento\Framework\App\ObjectManager::getInstance()`.
130
130
131
+
Prefix the type name with a question mark when declaring a parameter with a `null` default value.
0 commit comments