Document the generate-fixtures asset store (fixtures.assets, $cwa->asset(), prune-fixture-assets)
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- php, yaml
- 領域
- api, documentation
調査の方向性
Start in content/4.api/ and find the existing generate-fixtures and scaffold pages, then read the config and command details in the issue body and in components-web-app/api-components-bundle#466. Add a section that covers the fixtures.assets config keys, the one-off --assets-store and --assets-dir options, the .assets.json manifest, the prune-fixture-assets command and the load-time error. Done when each bullet in the issue has a matching passage and the page matches the merged #466 behaviour.
索引モデルが issue の本文から書いたものです。
説明
components-web-app/api-components-bundle#466 (for components-web-app/api-components-bundle#462) adds a fixture asset store to generate-fixtures. The API bundle's fixture docs (content/4.api/, the generate-fixtures / scaffold pages) should cover the following.
What to document
-
Why it exists. Without it,
generate-fixtureswrites a readable copy of every uploaded file toassets/beside the scaffold. That is still the default. For a large site you can instead keep the files in a store and commit only a small manifest. -
Configuration
silverback_api_components: fixtures: assets: store: local | flysystem # an env var works, e.g. '%env(FIXTURE_ASSETS_STORE)%' path: ... # local: the folder; default is assets/ beside the scaffold class adapter: gcloud # flysystem: one of the app's filesystem adapter aliases (required) prefix: fixtures/ # flysystem: folder within the adapterGenerating and loading both read this config. Generating needs write access to the store, and loading needs read access.
-
What gets generated
- Each file is stored once under its SHA-256.
- The class refers to it as
$cwa->asset('<hash>'). - The class gets a
<ClassName>.assets.jsonmanifest beside it, listing name, mime type, size and source fields. Commit the manifest with the class. - The same content uploaded under another name is written as
$cwa->asset('<hash>', name: '…').
-
One-off options:
--assets-store local|flysystemand--assets-dir <folder>(a local folder). -
Loading:
doctrine:fixtures:loadresolves each hash through the configured store and stores the file under its manifest name. A missing or changed asset fails the load with a message naming the store. -
Pruning
- Generating into a local store deletes the assets the new manifest no longer lists. Give each scaffold its own local folder.
silverback:api-components:prune-fixture-assets <manifest>... [--dry-run]deletes from the store the assets that none of the given manifests lists. List every manifest a branch or deployment still loads.- Only hash-named files directly under the prefix are ever touched.
-
Hand-written scaffolds can call
$cwa->asset()too, with a manifest beside the class. -
Not built yet: an export-time
--max-dimensiondownscale (see #462).
- 主要言語
- Vue
- スター
- 0
- フォーク
- 0
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
components-web-app/docs のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
components-web-app/docs#245 ·
-
難易度 2/5 半日 初心者へのやさしさ 68/100
components-web-app/docs#244 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
components-web-app/docs#243 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
components-web-app/docs#241 ·
-
documentation
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
components-web-app/docs#246 ·
components-web-app/docs の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
polarsource/polar#15580 ·
メンテナーはふだん 1 日以内に返信
-
accepted bug via-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 69/100
pingdotgg/t3code#20931 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug/1-unconfirmed kind/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 87/100
plone/plone.scale#167 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信