Deprecated nullable type causes a warning on PHP 8.4
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 1/5
- Thời gian dự kiến
- Dưới một giờ
- Mức phù hợp với người mới
- 68/100
Hướng nghiên cứu
Bắt đầu tại src/Requests/BaseBatchRequestBuilder.php, khoảng dòng 49, và kiểm tra chữ ký constructor được nêu trong báo cáo. Chạy class này trên PHP 8.4 để tái hiện cảnh báo deprecation. Được xem là hoàn thành khi constructor không còn phát ra cảnh báo đó; chỉ kiểm tra các tham số nullable khác nếu mối lo ngại rộng hơn của codebase trong issue được giải quyết.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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_
- Ngôn ngữ chính
- PHP
- Star
- 669
- Fork
- 150
- Merge trung bình
- 15 giờ 21 phút
- Pull request đã merge (30 ngày)
- 3
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoftgraph/msgraph-sdk-php
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
microsoftgraph/msgraph-sdk-php#1794 · 2 bình luận ·
-
bug: metadata type:bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
microsoftgraph/msgraph-sdk-php#1739 · 6 bình luận ·
-
status:waiting-for-triage
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
microsoftgraph/msgraph-sdk-php#1800 · 1 reaction ·
-
Now Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 1/100
microsoftgraph/msgraph-sdk-php#1799 ·
-
status:waiting-for-triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
microsoftgraph/msgraph-sdk-php#1792 ·
Tất cả issue của microsoftgraph/msgraph-sdk-php
Issue tương tự
-
priority: p3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
googleapis/librarian#7636 ·
-
0. Needs triage bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
nextcloud/fulltextsearch#1011 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
phpstan/phpstan-doctrine#794 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Automattic/static-site-importer#1767 ·