Skip to content

feat: add an exception when trying to pass an argument that does not exist #20

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

viduc
Copy link

@viduc viduc commented Oct 27, 2024

Hi,

I propose a PR to add an exception when some arguments does not exist in the target class to build.

this allows you to avoid passing an argument that does not exist without realizing that it is therefore not taken into account

I hope that my contribution will be interesting to you

@brambaud
Copy link
Contributor

Hello! Thanks for the suggestion!

I'll check it and think about it as soon as I may 🤓

I also need to think about it.
Like does it need to be a runtime check or is it more a static analysis job for phpstan or psalm to report this (and this lib needs to make sure phpstan/psalm report this error)?

@viduc
Copy link
Author

viduc commented Oct 31, 2024

Hello and thank you. Well in fact I would say both... the easiest seems to be throwing an exception but if the analysis tools could detect it and even propose the available parameters that would be really good I think...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants