Deprecated nullable type causes a warning on PHP 8.4
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 68/100
Research direction
Start at src/Requests/BaseBatchRequestBuilder.php around line 49 and inspect the constructor signature shown in the report. Run the class under PHP 8.4 to reproduce the deprecation warning. Done means the constructor no longer emits that warning; scan other nullable parameters only if the issue's broader codebase concern is addressed.
Written by the indexing model from the issue text.
Description
Describe the bug
This is a mostly self-explaining problem whose fix is, fortunately, very simple - literally one extra letter.
Deprecated: Microsoft\Graph\Core\Requests\BaseBatchRequestBuilder::__construct(): Implicitly marking parameter $errorMappings as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/vendor/microsoft/microsoft-graph-core/src/Requests/BaseBatchRequestBuilder.php on line 49
Looking at the signature of the constructor
public function __construct(RequestAdapter $requestAdapter, array $errorMappings = null)
should be
public function __construct(RequestAdapter $requestAdapter, ?array $errorMappings = null)
Maybe the whole codebase should be scanned for this deprecation... these will become errors in PHP 9.
Expected behavior
No deprecation warning.
How to reproduce
Run anything with this class under PHP 8.4
SDK Version
2.25.0
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
Click to expand log
```</details>
### Configuration
_No response_
### Other information
_No response_
- Dominant language
- PHP
- Stars
- 669
- Forks
- 150
- Avg merge
- 15h 21m
- Merged PRs (30d)
- 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoftgraph/msgraph-sdk-php
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
microsoftgraph/msgraph-sdk-php#1794 · 2 comments ·
-
bug: metadata type:bug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
microsoftgraph/msgraph-sdk-php#1739 · 6 comments ·
-
status:waiting-for-triage
Difficulty 5/5 Over a week Newbie friendliness 35/100
microsoftgraph/msgraph-sdk-php#1800 · 1 reaction ·
-
Now Open
Difficulty 5/5 Over a week Newbie friendliness 1/100
microsoftgraph/msgraph-sdk-php#1799 ·
-
status:waiting-for-triage
Difficulty 4/5 3-5 days Newbie friendliness 45/100
microsoftgraph/msgraph-sdk-php#1792 ·
All issues in microsoftgraph/msgraph-sdk-php
Similar issues
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nextcloud/fulltextsearch#1011 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
phpstan/phpstan-doctrine#794 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Automattic/static-site-importer#1767 ·