OPCache bug
还没有人认领这个 Issue。
评估
调研方向
从 src/RequestInformation.php 第 66 行开始,将其 PhpDoc 用法与 doctrine/annotations 的 AnnotationReader.php 第 122 行进行比较。将 opcache.save_comments 设置为 0,重现用户的 GET 请求,然后确定 SDK 是否可以避开失败的 annotation 路径,或清楚地记录受支持的 workaround。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
Hi,
I'm using your library for Microsoft SSO. I only need to fetch basic user information like: getId, getMail, getGivenName, getSurname, and getUserPrincipalName. I’m doing this with the following script:
However, the doctrine/annotations library recently fixed a bug that affects our integration: https://github.com/doctrine/annotations/pull/446/files
I’m using OPCache, so option opcache.save_comments with the flag value set as 0. So while you are using PhpDoc I'm getting error from: https://github.com/doctrine/annotations/blob/2.0.x/lib/Doctrine/Common/Annotations/AnnotationReader.php#L122
Expected behavior
The only place where PhpDoc data is read is here: https://github.com/microsoft/kiota-abstractions-php/blob/main/src/RequestInformation.php#L66 - and microsoft/kiota-abstractions-php is a dependency of microsoftgraph/msgraph-sdk-php-core.
The dependency chain is quite large, but it seems that in my case, I don’t have any query parameters - and those are likely required for this issue to occur.
How can I work around this problem, aside from enabling comments in the cache?
How to reproduce
Set option opcache.save_comments with the flag value as 0
$tokenRequestContext = new AuthorizationCodeContext(
tenantId: $config['tenant'],
clientId: $config['clientId'],
clientSecret: $config['clientSecret'],
authCode: $params[self::PARAM_IN_CODE],
redirectUri: $config['redirectUri'],
);
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $config['scopes']);
$user = $graphServiceClient->me()->get()->wait();
$userData = [
'id' => $user->getId(),
'userPrincipalName' => $user->getUserPrincipalName(),
'userEmail' => $user->getMail(),
'userFirstName' => $user->getGivenName(),
'userLastName' => $user->getSurname(),
];
// ...
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_
- 主要语言
- PHP
- 星标
- 669
- 派生
- 149
- 平均合并
- 1 天 4 小时
- 30 天内合并 PR
- 5
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoftgraph/msgraph-sdk-php 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
microsoftgraph/msgraph-sdk-php#1794 · 2 条评论 ·
-
bug: metadata type:bug
难度 1/5 1 小时以内 新手友好度 88/100
microsoftgraph/msgraph-sdk-php#1739 · 6 条评论 ·
-
status:waiting-for-triage type:bug
难度 1/5 1 小时以内 新手友好度 68/100
microsoftgraph/msgraph-sdk-php#1643 · 8 条评论 · 4 个 reaction ·
-
status:waiting-for-triage
难度 5/5 一周以上 新手友好度 35/100
microsoftgraph/msgraph-sdk-php#1800 · 3 个 reaction ·
-
Now未关闭
难度 5/5 一周以上 新手友好度 1/100
microsoftgraph/msgraph-sdk-php#1799 ·
查看 microsoftgraph/msgraph-sdk-php 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
matomo-org/plugin-CustomAlerts#310 ·
维护者通常 1 天内回复
-
Bug Status: Needs Triage
难度 1/5 1 小时以内 新手友好度 68/100
维护者通常 1 天内回复
-
domain/checkout Platform(Default) priority/low testing/acceptance
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
pluginsGLPI/addressing#132 ·
-
5.14.0 PIE packages still declare PHP >=8.3, so PIE installs them on PHP 8.3 and the build fails未关闭
难度 2/5 1-3 小时 新手友好度 66/100