Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

generate-fixtures round trip and new fixture builder API (api-components-bundle #321)

已关闭 适合新手
#97 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-2 天
新手友好度
72/100
Issue 类型
文档
描述清晰度
基本清楚
活跃度
活跃
技术栈
php
领域
documentation

调研方向

从 fixtures/scaffold 文档页面以及 issue 中描述的 silverback:api-components:generate-fixtures 命令开始。记录 CwaFixtureBuilder 的四个方法、重定向、依赖路由的回调,以及如何在 purge-and-reload 之前捕获 live site;完成的标准是,文档化的 API 和工作流覆盖所列出的 fixture 行为。

由索引模型根据 Issue 内容生成。

描述

documentation

Source: components-web-app/api-components-bundle#321, PR components-web-app/api-components-bundle#322.

silverback:api-components:generate-fixtures now writes a scaffold that reloads as the same site after a purge. It carries:

  • published state and drafts
  • uploaded files, copied to assets/ next to the scaffold
  • component-owned groups and groups shared through locationReference
  • relations (e.g. a navigation link's route), dates, and inherited and non-public fields
  • meta descriptions, scheduled or draft routes (liveAt) and redirects

The command lists anything it cannot reproduce.

New CwaFixtureBuilder API:

  • allow: on page groups
  • liveAt(?DateTimeImmutable) on page and page data builders
  • $cwa->redirect('/old', to: 'routeName')
  • $cwa->afterRoutes(fn (CwaFixtureBuilder $cwa) => ...), which runs once routes exist and before positions are created. Use it for anything that references a route.

Docs impact: the fixtures / scaffold pages should document the four builder methods and how to capture a live site with generate-fixtures before a purge-and-reload.

主要语言
Vue
星标
0
派生
0
PR 合并指标
30 天内没有已合并 PR

环境准备

我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

components-web-app/docs 的其他 Issue

查看 components-web-app/docs 的全部 Issue

相似的 Issue

更多 Documentation Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。