Issue in /main/src/pages/development/components/routing.md
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 1/5
- Thời gian dự kiến
- Dưới một giờ
- Mức phù hợp với người mới
- 90/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- php
- Lĩnh vực
- documentation
Hướng nghiên cứu
Mở main/src/pages/development/components/routing.md và tìm phần “Example of routing usage”. So sánh ví dụ với vendor/magento/framework/App/ActionFactory.php, sau đó xóa đối số thứ hai không được sử dụng khỏi lệnh gọi ActionFactory::create(). Hoàn tất khi ví dụ khớp với chữ ký phương thức được ghi trong tài liệu và giữ lại các tham số request đã được thiết lập trên đối tượng request.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
In the Routing documentation under the "Example of routing usage" section, the custom Router class example passes a second argument to ActionFactory::create():
return $this->actionFactory->create(Forward::class, ['request' => $request]);
However, Magento\Framework\App\ActionFactory::create() only accepts a single parameter ($actionName). The second argument ['request' => $request] is never used.
Reference:
vendor/magento/framework/App/ActionFactory.php
public function create($actionName)
{
if (!is_subclass_of($actionName, \Magento\Framework\App\ActionInterface::class)) {
throw new \InvalidArgumentException(
'The action name provided is invalid. Verify the action name and try again.'
);
}
return $this->_objectManager->create($actionName);
}
Suggested fix:
return $this->actionFactory->create(Forward::class);
The request parameters (moduleName, controllerName, actionName) are already set on the $request object prior to this line, so the Forward action will read them from the request directly. No additional constructor arguments are needed.
- Ngôn ngữ chính
- JavaScript
- Star
- 11
- Fork
- 178
- Merge trung bình
- 1 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của AdobeDocs/commerce-php
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
AdobeDocs/commerce-php#313 ·
-
What is the default value for a plugin's `sortOrder`?Có thể đã có người làm @jlnarvaez đã nhận 921 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
AdobeDocs/commerce-php#234 ·
-
Issue in /src/pages/development/components/api-concepts.mdCó thể làm lại được @pawan đã nhận 229 ngày trước và không có pull request nào đang mở. Đang mở
AdobeDocs/commerce-php#432 · 5 bình luận · 1 người được giao ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
AdobeDocs/commerce-php#392 ·
-
Error while using code from docsĐang mởbug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 58/100
AdobeDocs/commerce-php#389 · 1 bình luận ·
Tất cả issue của AdobeDocs/commerce-php
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
awesome-dsh-plugin/awesome-dsh-plugin#9184 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
RpcTest.makeClient: accept disableFatalDefectsCó thể đã có người làm @effect-bot đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Effect-TS/effect#9893 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
0.2.1-rc.3 compatibility: 21 peer ranges enumerate exact versions, so rc.3 is rejectedCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
NanmiCoder/dsh-agent-teams#277 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[ordering-review] workshop order graph: 1 confirmed ordering problem, 3 cycles are false positivesĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
githubnext/gh-aw-workshop#4943 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày