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

Command `getHelper` does not work

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

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
55/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
php, symfony
Lĩnh vực
devtools

Hướng nghiên cứu

Start with the getHelper('question')->ask() call in Shopware's MediaOptimizeCommand.php and compare it with the custom ShopwareCommand.php base class. Reproduce or inspect the reported HelperInterface::ask() error and determine the expected handling for this command; done means the reported call is correctly analyzed without the undefined-method error.

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

Mô tả

Hey there 👋

I updated to version 1.1.2 and now I got the following error during the analysis:

Call to an undefined method Symfony\Component\Console\Helper\HelperInterface::ask()

We do not extend directly from Symfony\Component\Console\Command\Command but have an own AbstractCommand instead. could that be a reason? Otherwise I don't see a reason why a call like this, should not work: $this->getHelper('question')->ask()

Command where the error occurs: https://github.com/shopware/shopware/blob/5.7/engine/Shopware/Bundle/MediaBundle/Commands/MediaOptimizeCommand.php#L117
Abstract command: https://github.com/shopware/shopware/blob/5.7/engine/Shopware/Commands/ShopwareCommand.php

thanks in advance and have a nice day 🙂 👋

Ngôn ngữ chính
PHP
Star
805
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.