For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
预约演示登录免费开始
  • 使用 SDK
    • SDK 概述
    • SDK 如何工作
    • Quickstart
    • Customer showcase
  • 使用 SDK
    • 项目结构
    • 添加自定义代码
    • Migrating to Replay
    • 功能特性
  • 参考
      • Generating an SDK
      • 发布到 Packagist
      • PHP 配置
      • 添加自定义代码
      • 变更日志
      • Customer showcase
  • 资源
    • generators.yml
Checking status...
SOC2Soc 2 Type II
© 2026 Fern • Birch Solutions, Inc., a Postman company

Documentation

SDKsDocsAsk FernCLI Reference

API Definitions

OpenAPIAsyncAPIOpenRPCgRPC

Resources

BlogSupportPricing

Company

Brand KitPrivacy PolicyTerms of Service
LogoLogo
预约演示登录免费开始
参考PHP

Changelog

February 11, 2025
February 11, 2025
此页面是否有帮助?
编辑此页面
上一个

February 12, 2025

下一个

February 9, 2025

0.10.0

(feat): 现在您可以通过在生成器配置中添加 composerJson 属性来修改生成的 composer.json 文件。 以下是带有 composerJson 属性的 generators.yml 文件示例:

generators.yml ... groups:
1 php-sdk:
2 generators:
3 - name: fernapi/fern-php-sdk
4 ...
5 config:
6 composerJson:
7 description: This is my PHP library
8 keywords:
9 - myCustomTag
10 license:
11 - "LGPL-2.1-only"
12 - "GPL-3.0-or-later"
13 scripts:
14 hello: echo hello

这将产生以下 composer.json 文件:

composer.json {
1 // ...,
2 "description": "This is my PHP library",
3 "keywords": [
4 "myCustomTag",
5 // ...,
6 ],
7 "license": [
8 "LGPL-2.1-only",
9 "GPL-3.0-or-later"
10 ],
11 // ...,
12 "scripts": {
13 // ...,
14 "hello": "echo hello"
15 }
16} ```
17
18## 0.9.0
19**`(feat):`** 添加从每个类访问 alpha 或未记录响应属性的能力。用户可以这样访问附加属性:
20```php $response = $client->users->get(...); $additionalProperties = $response->getAdditionalProperties(); ```
21
22## 0.8.0
23**`(feat):`** 为返回分页响应的端点添加自动分页支持。
24以下是用户如何使用分页端点的示例:
25```php $items = $client->list($request); foreach($items as $item){
26 echo $item;
27} $pages = $items->getPages(); foreach($pages as $page){
28 foreach($page as $item){
29 echo $item;
30 }
31} ```