-
Notifications
You must be signed in to change notification settings - Fork 56
Add default FormView vars in the stub class
#271
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
base: master
Are you sure you want to change the base?
Conversation
|
@mpdude thank you for your contribution! I am not familiar with these new array attributes. In Symfony source code, I did not see anything related. Could you please share reference for it? |
|
Thats important information 👍 , so I've updated the initial comment on top ☝🏻 |
|
@mpdude thanks for the explanation 👍 . I got it but I have some concerns:
|
|
I think I don’t get the first and last item… could you please try to rephrase or show me with an example what needs to be done? thanks! |
I think that's fine, the inferred type should be overridden by the |
errors and valid to FormView stubvars in the stub class
|
I have added the remaining vars as well |
67cb17e to
efc983d
Compare
efc983d to
8a859ac
Compare
|
@mpdude thank you. I will try to fix test failures on |
This PR was merged into the 6.2 branch. Discussion ---------- Remove `size` FormView variable | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | While [adding `FormView::$vars` support in the Psalm Plugin for Symfony](psalm/psalm-plugin-symfony#271), I came across the `size` key. I tried to figure out the meaning of the setting, but it is not documented, seems to be used nowhere, and has been around since the early days of the Form Component a decade ago. So, my assumption is that is has no meaning/relevance and thus my suggestion is to remove it. Commits ------- c6d455a Remove `size` FormView variable
This PR was merged into the 6.2 branch. Discussion ---------- Remove `size` FormView variable | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | While [adding `FormView::$vars` support in the Psalm Plugin for Symfony](psalm/psalm-plugin-symfony#271), I came across the `size` key. I tried to figure out the meaning of the setting, but it is not documented, seems to be used nowhere, and has been around since the early days of the Form Component a decade ago. So, my assumption is that is has no meaning/relevance and thus my suggestion is to remove it. Commits ------- c6d455a610 Remove `size` FormView variable
|
@seferov ok, ping me when I shall rebase this PR |
…into form-view-vars
|
@mpdude after merging master, the remaining failing tests are related to this changes. Could you please take a look at them? |
These keys are added to
FormView::$varshere:https://github.com/symfony/symfony/blob/4a22bcbda96f347cafd943236bd3029a9fef9467/src/Symfony/Component/Form/Extension/Core/Type/FormType.php#L107
That's the basic
FormTypeat the very top of the Form Type hierarchy, so about anyFormViewinstance should have these keys in theirvars.