Document array messages in the Logger

Đang mở
#155 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

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

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
72/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ệ
php
Lĩnh vực
documentation

Hướng nghiên cứu

Read the listed Logger and debugger pages, then check the released 3.2.0 code for the signatures and adapter behavior. Update the named pages and upgrade guide, keeping each fact on its home page and linking to it elsewhere. Verify examples against released code and check that internal links and anchors resolve.

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

Mô tả

documentation

Summary

Make the Logger pages match the behavior of quantum-php/framework#613, which lets logger() log an array message. It is in the 3.2.0 milestone because it changes the ReportableInterface contract.

Why

The Logger pages already promise that an array message is JSON-encoded with pretty printing, and that logger() is for structured array messages. In 3.1.x that call throws a TypeError. When #613 ships in 3.2.0, ReportableInterface::report() and the Logger methods accept string|Stringable|array, and each adapter renders the message, so the pages have to describe what really happens in each adapter and in the debugbar. A custom adapter has to widen its report() signature, which is a breaking change.

Pages

  • v3.0/packages/logger/usage.md: the "Log a structured payload" example, checked against the released code.
  • v3.0/packages/logger/contracts.md: the new signature of ReportableInterface::report().
  • v3.0/packages/logger/adapters.md and architecture.md: how each adapter writes an array message, and what the debug-mode adapter keeps for the debugbar.
  • v3.0/packages/logger/helpers.md: the signatures of error(), warning(), notice(), info() and debug(), which accept an array message too, and the two sentences that say the helpers take string messages only.
  • v3.0/packages/debugger/architecture.md: how an array message appears in the messages tab, which is fed by logger()->getAdapter()->getMessages().
  • v3.0/upgrade-guide.md: a note for applications with a custom logger adapter, which must accept string|Stringable|array, and for applications that subclass Logger and override a level method.

Acceptance criteria

  • every name and example exists in the released code and was run
  • each fact is stated once at its home page and linked elsewhere
  • internal links and anchors resolve
  • the pull request goes into staging and is published with the 3.2.0 documentation release
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
3
Fork
1
Merge trung bình
2 phút
Pull request đã merge (30 ngày)
26

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 quantum-php/docs

Tất cả issue của quantum-php/docs

Issue tương tự

Thêm issue về Documentation

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.