Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

#[Publishable] on AbstractPage / AbstractPageData — page-level draft/live toggle

オープン
#186 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
php, symfony

調査の方向性

AbstractPage と AbstractPageData から始め、既存のコンポーネントレベルの #[Publishable] 実装と voter ロジックを追跡します。AbstractRoutableVoter と RouteVoter も含めます。ルート解決と resource_manifest エンドポイントに加え、テンプレートおよび子パスとの相互作用を確認します。公開アクセスの拒否、管理者アクセス、PATCH による公開、既存ページ向けの後方互換性のあるマイグレーションについて Behat のカバレッジを追加します。

索引モデルが issue の本文から書いたものです。

説明

Problem

#[Publishable] (with publishedAt) exists for components: a component can be in draft state even inside a published page. There is no equivalent for pages themselves.

Currently, the only "draft" signal for a page is the absence of a Route. This works before publication, but once a page is live (route exists), there is no way to take it offline without deleting the route — losing URL history and any redirects pointed at it.

Desired behaviour

  • AbstractPage (base of Page and AbstractPageData) gets a publishedAt: ?\DateTimeInterface column via #[Publishable] (or a new #[PublishablePage] attribute if there are conflicts with the existing component-level implementation)
  • Unpublished pages (publishedAt: null) are invisible to unauthenticated users via the existing voter infrastructure (AbstractRoutableVoter, RouteVoter)
  • Admins can still access and edit unpublished pages via the entity IRI (same as draft components today)
  • RouteVoter gates public route resolution by the target page's publishedAt state
  • The resource_manifest endpoint respects the same gate

Things to consider

  • #[Publishable] today lives on components; its voter logic (PublishableVoter?) would need to be checked / extended for page-level entities
  • Page.isTemplate pages should probably always be accessible to admins regardless of publishedAt (template pages are never public-facing)
  • Draft page data entities with an existing Route — the route should resolve to 404/403 for public traffic, not 500
  • Interaction with cascadeChildPaths and the children endpoint: should unpublished children be hidden from the public children list?
  • Migration: existing pages have no publishedAt — default to null (draft) or to now() (treat existing pages as already published)? Likely now() for backwards compatibility

Acceptance criteria

  • AbstractPage and/or AbstractPageData gain a publishedAt column
  • Unauthenticated GET /_/routes/{path} to a page with publishedAt: null returns 403/404
  • Admin GET /_/resource_manifest/{uuid} for an unpublished page works for ROLE_ADMIN
  • Behat scenarios cover: public access denied, admin access allowed, publish via PATCH
  • Backwards-compatible migration (existing pages treated as published)
主要言語
PHP
スター
32
フォーク
8
平均マージ
40分
マージ済み PR(30日)
129

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

components-web-app/api-components-bundle のほかの issue

components-web-app/api-components-bundle の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。