Skip to content

Fix "Implicitly marking parameter $fileFetcher as nullable is deprecated"#844

Merged
alistair3149 merged 1 commit intoProfessionalWiki:masterfrom
paladox:patch-2
Mar 7, 2026
Merged

Fix "Implicitly marking parameter $fileFetcher as nullable is deprecated"#844
alistair3149 merged 1 commit intoProfessionalWiki:masterfrom
paladox:patch-2

Conversation

@paladox
Copy link
Contributor

@paladox paladox commented Mar 7, 2026

Mar 7 05:34:27 test151 php: PHP Deprecated: Maps\MapsFactory::newGeoJsonFetcher(): Implicitly marking parameter $fileFetcher as nullable is deprecated, the explicit nullable type must be used instead in /srv/mediawiki/1.45/extensions/Maps/src/MapsFactory.php on line 222

Summary by CodeRabbit

  • Refactor
    • Improved internal code quality and type safety through enhanced type declarations.

Note: This release contains primarily internal improvements with no user-facing changes.

…ted"

> Mar  7 05:34:27 test151 php: PHP Deprecated:  Maps\MapsFactory::newGeoJsonFetcher(): Implicitly marking parameter $fileFetcher as nullable is deprecated, the explicit nullable type must be used instead in /srv/mediawiki/1.45/extensions/Maps/src/MapsFactory.php on line 222
@paladox paladox changed the title Fix "Implicitly marking parameter $fileFetcher as nullable is depreca… Fix "Implicitly marking parameter $fileFetcher as nullable is deprecated" Mar 7, 2026
@coderabbitai
Copy link

coderabbitai bot commented Mar 7, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9eddd968-8230-410c-9175-8983140e7a32

📥 Commits

Reviewing files that changed from the base of the PR and between fed4568 and f8523e9.

📒 Files selected for processing (1)
  • src/MapsFactory.php

📝 Walkthrough

Walkthrough

Updated the newGeoJsonFetcher method parameter type hint from a non-nullable FileFetcher with a default null value to an explicitly nullable ?FileFetcher parameter, aligning with modern PHP type declaration syntax.

Changes

Cohort / File(s) Summary
Type hint modernization
src/MapsFactory.php
Updated newGeoJsonFetcher method parameter to use explicit nullable type hint (?FileFetcher) instead of implicit null default.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately describes the main change: fixing a PHP deprecation warning about implicit nullable parameter typing by adding explicit nullable type hint.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@alistair3149 alistair3149 merged commit 5278375 into ProfessionalWiki:master Mar 7, 2026
3 of 6 checks passed
@paladox paladox deleted the patch-2 branch March 7, 2026 22:26
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