The Wayback Machine - https://web.archive.org/web/20250610065143/https://github.com/symfony/symfony/issues/60412
Skip to content

[Console] 7.3 Add source filename to #[Option] error messages #60412

Closed
@tacman

Description

@tacman

Description

Although the underlying issue about nullable strings in options will likely change in beta3, I think this request is still valid -- I'd like to see the filename with the error message.

In Option.php line 88:
                                                                      
  [Symfony\Component\Console\Exception\LogicException]                
  The option parameter "$routeName" must not have a default of null.  
                                                                      

Exception trace:
  at /home/tac/g/sites/pgsc/vendor/symfony/console/Attribute/Option.php:88
 Symfony\Component\Console\Attribute\Option::tryFrom() at /home/tac/g/sites/pgsc/vendor/symfony/console/Command/InvokableCommand.php:78
 Symfony\Component\Console\Command\InvokableCommand->configure() at /home/tac/g/sites/pgsc/vendor/symfony/console/Command/Command.php:421

Since I do a lot of bundle development, I'd like to know exactly which file is causing the problem. @kbond Can the error message simply append the Command class that caused the problem?

Example

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions