Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Document public vs admin Mercure updates (api-components-bundle #497)

Đã đóng Phù hợp với người mới
#258 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
75/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
symfony, typescript
Lĩnh vực
documentation

Hướng nghiên cứu

Đọc phần Mercure / thời gian thực trong content/4.api/ và so sánh với api-components-bundle PR #497 được liên kết từ issue. Ghi lại hành vi của các bản cập nhật công khai, bản cập nhật riêng tư dành cho quản trị viên và bản nháp, grants, định tuyến Messenger, rò rỉ thông tin và một yêu cầu con nội bộ cho mỗi resource được tạo hoặc cập nhật. Hoàn tất khi tài liệu bao quát từng hành vi và lưu ý được liệt kê.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

api-components-bundle PR https://github.com/components-web-app/api-components-bundle/pull/497 (issue #494) changes what Mercure publishes. To document in content/4.api/ (Mercure / real-time section):

  • Public update: the public update for a created or updated resource is what an anonymous GET of that resource returns. When anonymous callers can't read the resource (401/403/404), the public update is a delete {"@id": "<iri>"}. That covers a page no live route reaches, a route before its liveAt, and a published component moved to a future date.
  • Admin update: the writer's view is published privately on <iri>?draft=1 after the public update. It is only published when it differs from the public payload.
  • Grants: every Mercure resource class grants admins <pattern>\\?draft=1. Here an admin is anyone holding the publishable.permission (or a class's own #[Publishable(isGranted:)]).
  • Drafts: a draft is still published only privately on ?draft=1.
  • Messenger routing: an application that routes Symfony\\Component\\Mercure\\Update to an async transport must also route Silverback\\ApiComponentsBundle\\Message\\PublishMercureUpdatesMessage. That message carries a resource's public and private updates in order.
  • Information disclosure: a public delete for a resource that was never public reveals that its IRI exists. A route IRI contains its path.
  • Cost: each created or updated resource costs one internal sub-request.
Ngôn ngữ chính
TypeScript
Star
0
Fork
0
Merge trung bình
1 giờ 20 phút
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của components-web-app/docs

Tất cả issue của components-web-app/docs

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.