Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Feature request: Confirm if class and action method exist for Symfony controller definition

Đang mở
#285 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
30/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
php, symfony
Lĩnh vực
backend, devtools

Hướng nghiên cứu

The entry points are Symfony YAML route definitions and controller strings such as nonexistent_controller_class::indexAction. Start by tracing how phpstan-symfony currently reads or analyzes route definitions. Done means reporting missing controller classes or action methods during static analysis, before the route is invoked, with coverage for the shown example.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Currently, if a controller definition refers to a non-existent class/action method an error would be raised at time of route invocation.

example routing definition:

example_route:
  path: /example/route
  controller: nonexistent_controller_class::indexAction

When curl'ing this route, this raises the following exception:

InvalidArgumentException
The controller for URI "/example/route" is not callable: Controller "nonexistent_controller_class" does neither exist as service nor as class.

I would like phpstan-symfony to analyze route definitions so errors like this can be caught ahead of time rather than at runtime.

Ngôn ngữ chính
PHP
Star
806
Fork
104
Merge trung bình
27 phút
Pull request đã merge (30 ngày)
3

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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của phpstan/phpstan-symfony

Tất cả issue của phpstan/phpstan-symfony

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.