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

Do not use an optional parameter in LintMessage's constructor #97

Merged
merged 2 commits into from
Sep 29, 2023

Conversation

xknown
Copy link
Contributor

@xknown xknown commented Sep 29, 2023

Using optional parameters before required parameters is deprecated since PHP 8.0 -- https://www.php.net/manual/en/migration80.deprecated.php

Removing the default value has no effect.

Using optional parameters before required parameters is deprecated since PHP 8.0 -- https://www.php.net/manual/en/migration80.deprecated.php

Removing the default value has no effect.
@sirbrillig
Copy link
Owner

Thanks for spotting that! I think it needs some slight adjustment as now it throws this error:

TypeError: Argument 2 passed to PhpcsChanged\LintMessage::__construct() must be of the type string, null given, called in /home/runner/work/phpcs-changed/phpcs-changed/PhpcsChanged/PhpcsMessagesHelpers.php on line 48

Probably we just need to change that parameter type to ?string.

It might also be `null`
@sirbrillig sirbrillig merged commit 80840f6 into sirbrillig:trunk Sep 29, 2023
13 checks passed
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