Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Command `getHelper` does not work

Open
#239 7 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
php, symfony
Domain
devtools

Research direction

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.

Written by the indexing model from the issue text.

Description

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 🙂 👋

Dominant language
PHP
Stars
805
Forks
104
Avg merge
27m
Merged PRs (30d)
3

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from phpstan/phpstan-symfony

All issues in phpstan/phpstan-symfony

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.