Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Console] Better error handling when misuse of ArgvInput with arrays #54576

Open
wants to merge 3 commits into
base: 7.1
Choose a base branch
from

Conversation

symfonyaml
Copy link
Contributor

Q A
Branch? 7.1
Bug fix? no
New feature? no
Deprecations? no
Issues Fix #53836
License MIT

Issue

When we don't use ArgvInput correclty, and use array in $argv values, it returns different PHP fatal errors.
See all details and how to reproduce it in the issue #53836

Solution

In this PR

  • Add some DX with an exception explaining the problem, to avoid PHP fatal errors
  • Add tests**

Note : Old PR #54147 was targeting 5.4, see this comment for more details

Copy link
Member

@chalasr chalasr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR.
7.1 in feature freeze period (focus on stabilization) so don't be surprised if you don't have much traction on this PR in the 2 upcoming months.

@OskarStark
Copy link
Contributor

I would consider it a bug if it throws fatal errors on wrong usage 🤔

@symfonyaml
Copy link
Contributor Author

I would consider it a bug if it throws fatal errors on wrong usage 🤔

@OskarStark the usage is a misuse though

@OskarStark
Copy link
Contributor

I understand, but would also vote for a bugfix, even if its most likely gonna be merged as a new feature 👍

@OskarStark OskarStark changed the title [Console] Better error handling when misuse of ArgvInput with arrays [Console] Better error handling when misuse of ArgvInput with arrays Apr 19, 2024
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.

[Console] Misuse of ArgvInput with arrays needs a better error handling
5 participants