Download the PHP package goletter/hyperf-docs without Composer

On this page you can find all versions of the php package goletter/hyperf-docs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package hyperf-docs

Docs

Hyperf 文档平台扩展包,支持多平台:

安装

本地 path 开发(推荐,可自动加载 ConfigProvider)

Hyperf 通过 Composer::getMergedExtra('hyperf')['config'] 收集各已安装包extra.hyperf.config
若只在根项目 autoload.psr-4 映射源码目录,包不会进入 vendor/composer/installed.jsonConfigProvider 不会自动加载

请用 path 仓库以 Composer 包方式引入:

然后执行:

成功后会出现 vendor/goletter/hyperf-docs(一般为软链),ConfigProvider 中的 dependencies / annotations.scan.paths / publish 会自动合并进框架,无需再在 config/autoload/dependencies.php 手动绑定。

不要同时保留根项目 autoload.psr-4 里的 Goletter\\Docs\\ 映射,以免与 path 包重复定义。

配置

发布配置:

环境变量:

Google:access_token 短期有效,请保存 refresh_token 并在过期后刷新。
腾讯文档需先在 开放合作平台 创建应用并完成审核;OpenAPI 除 Access-Token 外必须带 Open-Id(换 token 回包中的 user_id)。表格接口通常需要 scope.sheet / scope.sheet.readonly

使用

两个平台都已定义,通过工厂模式创建,可同时配置、按需选用。

扩展自定义平台:

统一 createSpreadsheet 返回值:

Google OAuth / Sheets

Range / gid

写法 说明
Sheet1!A1:Z100 按工作表标题
'含空格标题'!A1 特殊字符标题自动加引号
gid:123456 整表(读为 A:Z
gid:123456!A1:Z100 指定 gid + A1
gid:123456!F1 只写某一列

读取

按内容查找指定行

写入(受保护列 / 勾选框)

编辑指定行

删除指定行

追加到表格末尾

null 时会先算下一空行,再只写有值的列(避开受保护列)。勾选列请传布尔 true / false,不要用 ''

其它

也可直接注入底层 GoogleAuth / GoogleSheets(不经过工厂),参数为原始 accessToken 字符串。

腾讯文档 OAuth / 表格

权限变更或接口报 Request Scope Invalid 时:在开放平台开通表格相关权限 → 用户重新授权换新 token。

能力对照

能力 Google 腾讯文档
OAuth 授权 / 刷新
创建表格 ✅ Spreadsheet type=sheet
读单元格 ✅ Values(过滤空行) ✅ spreadsheet v3
写单元格 ✅ Values(null 跳过保护列) ✅ sheetbook v2
编辑指定行 updateRow(行号 / 按列查找) updateRow
删除指定行 deleteRow(行号 / 按列查找) deleteRow
追加行 appendCells appendCells
按列内容查找 findRows findRows
gid / sheetId 定位 ✅ URL #gid= ✅ 标题或 sheetId
勾选框 true / false
添加工作表 ✅ spreadsheet v3 batchUpdate
移动到日期目录 ✅ Drive ✅ folders + move
公开只读分享 ✅ anyone reader publicRead

测试命令

包内自带:

业务侧也可自建命令,用 DocsManager + gid / appendCells / findRows 做联调。


All versions of hyperf-docs with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
google/apiclient Version ^2.19
guzzlehttp/guzzle Version ^7.0
hyperf/command Version ~3.1.0
hyperf/contract Version ~3.1.0
hyperf/di Version ~3.1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package goletter/hyperf-docs contains the following files

Loading the files please wait ...