Error in using sdk in Symfony with caching
還沒有人認領這個 Issue。
評估
研究方向
從 issue 中展示的 Symfony 快取回呼開始,檢查 DefaultMarshaller.php 第 50 行,然後比較發生不同錯誤的本機環境和遠端環境。透過快取重現模型取得流程,並確定失敗的序列化邊界;當原因已記錄且該行為已由回歸測試涵蓋時,即表示完成。
由索引模型根據 Issue 內容生成。
描述
When I get a model from the graph, I get the correct model. But I'm using caching in Symfony to save requests.
return $this->cache->get($cacheKey, function (ItemInterface $item) use ($type, $email) {
$item->expiresAfter(self::CACHE_EXPIRES_IN_SECONDS_SHORT);
try {
$requestConfig
= new GroupsRequestBuilderGetRequestConfiguration(queryParameters: GroupsRequestBuilderGetRequestConfiguration::createQueryParameters(filter: 'startsWith(mail,\''
. $email . '\')'));
$groups = $this->graphClient->groups()->get($requestConfig)->wait()->getValue();
if ($groups) {
foreach ($groups as $group) {
if ($group instanceof \Microsoft\Graph\Generated\Models\Group && $group->getMail() == $email) {
return $group;
}
}
}
return null;
} catch (ApiException $exception) {
$this->handleException($exception);
}
});
In my local machine, this gives no trouble, when testing this.
On my remote machine, I get an error
In DefaultMarshaller.php line 50:
Serialization of 'Closure' is not allowed
It seems the serialization does not work well on this model?
Any suggestions?
Tim
- 主要語言
- 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