Skip to content

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 #62

Bug: T379481

* @param string|null $expectedFormat An identifier for the format the raw value did not match
*/
public function __construct( string $message, string $rawValue = null, string $expectedFormat = null ) {
public function __construct( string $message, ?string $rawValue = null, ?string $expectedFormat = null ) {
Copy link
Member

Choose a reason for hiding this comment

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

@JeroenDeDauw
Copy link
Member

CI fails. Suggested fix: drop runs under PHP 7.4 and update PHP requirement in composer.json to match

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 DataValues#62

Bug: T379481
@codders codders force-pushed the feat/upgrade-mediawiki-codesniffer-20241206 branch from 8a558b8 to ae70d19 Compare December 6, 2024 14:56
@codders
Copy link
Contributor Author

codders commented Dec 6, 2024

I've updated the version requirement and amended the PR based on your feedback. Thanks for the input!

@JeroenDeDauw JeroenDeDauw merged commit 7f1aa70 into DataValues:master Dec 6, 2024
2 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 [email protected], PHP 8.4 readiness

2 participants