Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Add Graph API version to base URI

Đang mở
#195 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
php
Lĩnh vực
api, backend

Hướng nghiên cứu

Start by reading GraphClientFactory and the existing base_uri configuration, using the request examples in this issue as the expected entry points. The work is done when the factory uses Graph API version v1.0 by default, allows selecting beta, and requests no longer need a version prefix in their paths.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

type:feature
Is your feature request related to a problem? Please describe the problem.

Currently, the base URI only contains the national cloud host, meaning each request needs a Graph API version prefix:

$httpClient = GraphClientFactory::createWithConfig($config);
$response = $httpClient->get("/v1.0/me");

Current workaround is to override the base_uri via config:


$httpClient = GraphClientFactory::createWithConfig(['base_uri' => NationalCloud::Global + "/v1.0"]);
$response = $httpClient->get("/me");

This would be a breaking change.

Describe the solution you'd like.

Support setting the Graph API version via the factory & default to v1.0
(With default v1.0)


$httpClient = GraphClientFactory::create();
$response = $httpClient->get("/me");

Or to change to beta


$httpClient = GraphClientFactory::setApiVersion('beta')::create();
$response = $httpClient->get("/me");
Additional context?

No response

Ngôn ngữ chính
PHP
Star
16
Fork
8
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoftgraph/msgraph-sdk-php-core

Tất cả issue của microsoftgraph/msgraph-sdk-php-core

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.