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

Guess parameters for event by type hint #219

Merged
merged 3 commits into from
Jan 19, 2021
Merged

Conversation

milo
Copy link
Member

@milo milo commented Apr 11, 2019

  • new feature
  • BC break? I hope no
  • doc PR: will

When you ask for Form values in event by 2nd parameter, you usually do not require form instance at all. For example:

$form->onSuccess[] = function (Form $form, array $value) {
    # I do not need $form here at all
};

This is propose to pass only arguments required by event.

$form->onSuccess[] = function (array $data) {...};
# or
$form->onSuccess[] = function (MyFormData $data) {...};

@dg dg force-pushed the master branch 3 times, most recently from 4876961 to b8d3a7c Compare July 8, 2019 09:58
@dg dg force-pushed the master branch 4 times, most recently from 41ff307 to f03a237 Compare November 19, 2019 15:43
@dg dg force-pushed the master branch 2 times, most recently from 341ed9a to 97e6400 Compare December 11, 2019 19:43
@dg dg force-pushed the master branch 3 times, most recently from 9d62255 to ec59537 Compare January 2, 2020 16:48
@dg dg force-pushed the master branch 2 times, most recently from 21f7326 to 35f9b84 Compare March 9, 2020 10:42
@dg dg force-pushed the master branch 4 times, most recently from dc0cb8f to dd11397 Compare March 29, 2020 13:47
@dg dg added this to the v3.1 milestone Apr 20, 2020
@dg dg force-pushed the master branch 2 times, most recently from dd9d4ef to 458607d Compare May 15, 2020 10:07
@dg dg force-pushed the master branch 4 times, most recently from 1f9d9ec to 4b4f5ba Compare June 6, 2020 13:02
@dg dg force-pushed the master branch 3 times, most recently from f305a97 to 215a482 Compare July 13, 2020 12:18
@dg dg force-pushed the master branch 3 times, most recently from 4c07b63 to f59c35e Compare July 31, 2020 18:03
@dg dg force-pushed the master branch 2 times, most recently from d5e7d21 to 6b69042 Compare October 15, 2020 20:02
@dg dg force-pushed the master branch 5 times, most recently from a358616 to cfe069b Compare November 2, 2020 15:52
@dg dg force-pushed the master branch 8 times, most recently from ecebdcf to 081f2ba Compare January 11, 2021 01:04
@dg dg merged commit 0d3b4f1 into nette:master Jan 19, 2021
dg added a commit that referenced this pull request Jan 19, 2021
Co-authored-by: Adam Žurek <thejabko@gmail.com>
Co-authored-by: Miloslav Hůla <miloslav.hula@fsv.cvut.cz>
Co-authored-by: David Grudl <david@grudl.com>
dg added a commit that referenced this pull request Jan 19, 2021
Co-authored-by: Adam Žurek <thejabko@gmail.com>
Co-authored-by: Miloslav Hůla <miloslav.hula@fsv.cvut.cz>
Co-authored-by: David Grudl <david@grudl.com>
dg added a commit that referenced this pull request Jan 19, 2021
Co-authored-by: Adam Žurek <thejabko@gmail.com>
Co-authored-by: Miloslav Hůla <miloslav.hula@fsv.cvut.cz>
Co-authored-by: David Grudl <david@grudl.com>
dg added a commit that referenced this pull request Jan 19, 2021
Co-authored-by: Adam Žurek <thejabko@gmail.com>
Co-authored-by: Miloslav Hůla <miloslav.hula@fsv.cvut.cz>
Co-authored-by: David Grudl <david@grudl.com>
dg added a commit that referenced this pull request Jan 19, 2021
Co-authored-by: Adam Žurek <thejabko@gmail.com>
Co-authored-by: Miloslav Hůla <miloslav.hula@fsv.cvut.cz>
Co-authored-by: David Grudl <david@grudl.com>
@milo milo deleted the pull-event-args branch April 9, 2021 06:02
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.

None yet

3 participants