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

Fix PHP 8.1 deprecation messages #928

Merged
merged 3 commits into from Dec 14, 2021

Conversation

YAhiru
Copy link
Contributor

@YAhiru YAhiru commented Dec 13, 2021

Type: bugfix
Breaking change: no

Fix following deprecation messages (running with PHP8.1)

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /path/to/vendor/phpmd/phpmd/src/main/php/PHPMD/RuleSetFactory.php on line 414

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /path/to/vendor/phpmd/phpmd/src/main/php/PHPMD/RuleSetFactory.php on line 417

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /path/to/vendor/phpmd/phpmd/src/main/php/PHPMD/RuleSetFactory.php on line 420
Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /path/to/vendor/phpmd/phpmd/src/main/php/PHPMD/Rule/UnusedFormalParameter.php on line 99
Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /path/to/vendor/phpmd/phpmd/src/main/php/PHPMD/Rule/Naming/BooleanGetMethodName.php on line 82

kylekatarnls
kylekatarnls previously approved these changes Dec 13, 2021
AJenbo
AJenbo previously approved these changes Dec 13, 2021
Copy link
Member

@AJenbo AJenbo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not my favorite code style, but logic wise it works for me :)

Co-authored-by: Kyle <kylekatarnls@users.noreply.github.com>
@kylekatarnls kylekatarnls changed the title Fix deprecation messages Fix PHP 8.1 deprecation messages Dec 14, 2021
@kylekatarnls kylekatarnls merged commit 222f430 into phpmd:master Dec 14, 2021
@YAhiru YAhiru deleted the fix-deprecation-messages branch December 14, 2021 09:59
@kylekatarnls kylekatarnls added this to the 2.11.1 milestone Dec 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants