Skip to content

Conversation

@mamazu
Copy link
Contributor

@mamazu mamazu commented Aug 2, 2025

Q A
Branch? 7.4
Bug fix? no
New feature? yes
Deprecations? no
Issues -
License MIT

When trying to debug, having an error like this is not very helpful:

1) Sylius\Bundle\GridBundle\Tests\Functional\Maker\MakeGridTest::it_can_create_grids_interactively
Symfony\Component\Console\Exception\MissingInputException: Aborted.

symfony/console/Helper/QuestionHelper.php:273
symfony/console/Helper/QuestionHelper.php:139
symfony/console/Helper/QuestionHelper.php:65
symfony/console/Helper/QuestionHelper.php:473
symfony/console/Helper/QuestionHelper.php:67
symfony/console/Style/SymfonyStyle.php:307
symfony/console/Style/SymfonyStyle.php:247

When trying to debug where the error is actually coming from. More helpful would be:

1) Sylius\Bundle\GridBundle\Tests\Functional\Maker\MakeGridTest::it_can_create_grids_interactively
Symfony\Component\Console\Exception\MissingInputException: Aborted while asking: Entity class to create a grid for

@mamazu mamazu force-pushed the more_helpful_errors branch from 7de3250 to 9aa3023 Compare August 2, 2025 21:25
@mamazu
Copy link
Contributor Author

mamazu commented Aug 3, 2025

This issue has been incorrectly tagged with deprecation.

But I would also be happy to apply this to a lower version of Symfony so that more people can have better error messages.

@carsonbot carsonbot changed the title Adding more helpful error messages to the Questionhelper [Console] Adding more helpful error messages to the Questionhelper Aug 3, 2025
@fabpot
Copy link
Member

fabpot commented Aug 6, 2025

FYI, such improvements are always merged for the next version.

@fabpot
Copy link
Member

fabpot commented Aug 6, 2025

Thank you @mamazu.

@fabpot fabpot merged commit d0118a9 into symfony:7.4 Aug 6, 2025
11 of 12 checks passed
@mamazu mamazu deleted the more_helpful_errors branch August 6, 2025 06:53
vrana added a commit to vrana/symfony that referenced this pull request Sep 7, 2025
nicolas-grekas added a commit that referenced this pull request Sep 8, 2025
This PR was merged into the 7.4 branch.

Discussion
----------

[Console] Fix test after #61308

| Q             | A
| ------------- | ---
| Branch?       | 7.4
| Bug fix?      | yes
| New feature?  | no <!-- if yes, also update src/**/CHANGELOG.md -->
| Deprecations? | no <!-- if yes, also update UPGRADE-*.md and src/**/CHANGELOG.md -->
| License       | MIT

#61308 broke this test in Git Bash.

Commits
-------

cff606a [Console] Fix test after #61308
nicolas-grekas added a commit that referenced this pull request Sep 8, 2025
* 7.4:
  [FrameworkBundle] Normalize workflow places separately
  [Console] Don’t automatically append EOT to multiline test inputs
  [Serializer] add correct psalm and phpstan return types for `DenormalizerInterface`
  [Validator] Review Albanian translations
  [Intl] Remove incorrect condition in CurrencyDataGenerator::icuPairToDate
  [Console] Fix test after #61308
  [Config] Fix `GlobResource` pattern with trailing slash
This was referenced Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants