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

Upgrade mediawiki-codesniffer to latest version (45.0.0) #223

Conversation

codders
Copy link
Contributor

@codders codders commented Dec 6, 2024

This repository is currently using version 34 of the Mediawiki coding style phpcs rules. If the code aims to comply with Mediawiki style guidelines, it makes sense that it continues to comply at current versions of the rules.

Besides being simply different, the newer versions of the rules introduce, for example,
MediaWiki.Usage.NullableType.ExplicitNullableTypes, which enforces compliance with coming deprecation rules in PHP 8.4 concerning nullable types. If the code does not remove the soon-to-be-deprecated form of nullable type declarations, the library will no longer be usable in Mediawiki for PHP 8.4 deployments.

Resolves #222

Bug: T379481

@codders codders force-pushed the feat/upgrade-mediawiki-codesniffer-20241206 branch from 551cc60 to 33173ba Compare December 6, 2024 14:12
@JeroenDeDauw
Copy link
Member

Thanks. I like your changes. Same comments as on DataValues/Interfaces#63

@codders codders force-pushed the feat/upgrade-mediawiki-codesniffer-20241206 branch from 33173ba to dc6f042 Compare December 6, 2024 15:09
@codders
Copy link
Contributor Author

codders commented Dec 6, 2024

Thanks for the feedback! Made the same changes here - hope that works.

This repository is currently using version 34 of the Mediawiki coding
style phpcs rules. If the code aims to comply with Mediawiki style
guidelines, it makes sense that it continues to comply at current
versions of the rules.

Besides being simply different, the newer versions of the rules
introduce, for example,
MediaWiki.Usage.NullableType.ExplicitNullableTypes, which enforces
compliance with coming deprecation rules in PHP 8.4 concerning nullable
types. If the code does not remove the soon-to-be-deprecated form of
nullable type declarations, the library will no longer be usable in
Mediawiki for PHP 8.4 deployments.

Note that mediawiki-codesniffer 45.0.0 requires PHP version 7.4 or
later - PHP 7.3 support will be dropped with this change. PHP 7.3
has been out of support since 6. Dec 2021.

Resolves DataValues#222

Bug: T379481
@codders codders force-pushed the feat/upgrade-mediawiki-codesniffer-20241206 branch from dc6f042 to f84a4db Compare December 6, 2024 15:12
@JeroenDeDauw JeroenDeDauw merged commit 518f36a into DataValues:master Dec 6, 2024
5 of 6 checks passed
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.

Support mediawiki-codesniffer@45.0.0, PHP 8.4 readiness
2 participants