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

AssertFields has an Error #19

Open
asivaneswaran opened this issue Jan 6, 2021 · 4 comments
Open

AssertFields has an Error #19

asivaneswaran opened this issue Jan 6, 2021 · 4 comments

Comments

@asivaneswaran
Copy link
Contributor

The method fieldCheck has an error: PHP Fatal error: During class fetch: Uncaught ErrorException: Required parameter $method follows optional parameter $value in /Users/arasivaneswaran/Documents/repos/ccp-kin-ball-v5/vendor/dillingham/nova-assertions/src/Assert/AssertFields.php:47

protected function fieldCheck($attribute, $value = null, $method)

@dillingham
Copy link
Owner

@asivaneswaran can you add your test code that you're writing.. thanks 🙏

@asivaneswaran
Copy link
Contributor Author

Just a classic $response->assertFieldsInclude(['email', 'telephone', 'extension']);

But it's because in AssertFields you have protected function fieldCheck($attribute, $value = null, $method)

Which in PHP 8 is not allowed anymore. $method needs to be nullable or $value needs to be the last parameter.

@asivaneswaran
Copy link
Contributor Author

I made a PR for the fix:
#20

@martin-ro
Copy link

This PR also fixes the error for me, any chance this will be merged anytime soon?

This was referenced Apr 18, 2021
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

No branches or pull requests

3 participants