Support for deprecated route names and RouteMatch::getRouteName()
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- drupal, php
Hướng nghiên cứu
Read the Drupal issues linked in the description to understand the proposed deprecation support and replacement method. Then inspect how phpstan-drupal currently handles route deprecations and RouteMatch::getRouteName(). The issue leaves open whether to detect deprecated names in comparisons or warn on string comparisons, so done requires settling that behavior and adding matching analysis and coverage.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Feature request
In https://www.drupal.org/project/drupal/issues/2723579 we realised that although we have deprecation support for routes, this doesn't work for RouteMatch::getRouteName() because that only returns a string for the current route.
We wondered whether it would be feasible to detect in phpstan when RouteMatch::getRouteName() is compared against a (hard coded) list of routes, and then point to the replacement route.
There is also https://www.drupal.org/project/drupal/issues/3506653 , which would provide a way to trigger a deprecation if a deprecated route name is used. But because there are valid reasons to get the current route name other than comparison, we wouldn't be able to deprecated RouteMatch::getRouteName() entirely.
However, if the hard-coded list of deprecated routes is not really viable, maybe phpstan could warn when the result of RouteMatch::getRouteName() is compared to a string, and recommend the new method instead?
- Ngôn ngữ chính
- PHP
- Star
- 208
- Fork
- 88
- Merge trung bình
- 2 ngày 17 giờ
- Pull request đã merge (30 ngày)
- 15
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 mglaman/phpstan-drupal
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
mglaman/phpstan-drupal#1078 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
mglaman/phpstan-drupal#1079 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Report constraint plugins that break on Drupal 12 because they have no named-arguments constructorCó thể đã có người làm @goba đã nhận 2 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
mglaman/phpstan-drupal#1075 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Magic properties: original on entities, name on UserSession and password on User are not reported as deprecatedCó thể đã có người làm @goba đã nhận 2 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
mglaman/phpstan-drupal#1074 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
mglaman/phpstan-drupal#1051 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của mglaman/phpstan-drupal
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
nikic/PHP-Parser#1187 ·
-
15.0
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Icinga/icinga-notifications-web#645 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
OpenMage/magento-lts#5865 ·
Maintainer thường phản hồi trong vòng 3 ngày