From 61079a6ce74c1be2bdcb3b3617b1e3ba0dc56f02 Mon Sep 17 00:00:00 2001 From: Luffy <52o@qq52o.cn> Date: Tue, 5 Aug 2025 14:26:59 +0800 Subject: [PATCH] Add bug report and documentation improvement templates --- .github/ISSUE_TEMPLATE/bug-issue.md | 25 ----------- .github/ISSUE_TEMPLATE/bug-report.yml | 43 +++++++++++++++++++ .../documentation-improvement.yml | 40 +++++++++++++++++ .github/ISSUE_TEMPLATE/documentation-issue.md | 23 ---------- 4 files changed, 83 insertions(+), 48 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug-issue.md create mode 100644 .github/ISSUE_TEMPLATE/bug-report.yml create mode 100644 .github/ISSUE_TEMPLATE/documentation-improvement.yml delete mode 100644 .github/ISSUE_TEMPLATE/documentation-issue.md diff --git a/.github/ISSUE_TEMPLATE/bug-issue.md b/.github/ISSUE_TEMPLATE/bug-issue.md deleted file mode 100644 index 288276398a70..000000000000 --- a/.github/ISSUE_TEMPLATE/bug-issue.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -name: "Bug Report" -about: "Report an issue with the PHP documentation" -title: "Issue with ..." -labels: "bug" -assignees: "" ---- - -**Affected page** - -_(Provide the URL or file path of the affected documentation page.)_ - -**Issue description** - -_(Describe the bug, including incorrect behavior, broken links, or missing content.)_ - -**Steps to reproduce** - -1. Go to _(page URL)_ -2. _(Describe the actions leading to the issue)_ -3. _(Explain the expected behavior)_ - -**Suggested fix** - -_(Provide corrections or relevant references if possible.)_ diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml new file mode 100644 index 000000000000..f9cda35a01b5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -0,0 +1,43 @@ +name: "Bug Report" +description: "Report an issue with the PHP documentation" +labels: ["bug"] + +body: + - type: input + id: affected-page + attributes: + label: "Affected page" + description: "Provide the URL or file path of the affected documentation page." + placeholder: "e.g., https://www.php.net/manual/en/function.strlen.php" + validations: + required: true + + - type: textarea + id: issue-description + attributes: + label: "Issue description" + description: "Describe the bug, including incorrect behavior, broken links, or missing content." + placeholder: "Describe what's wrong or missing on the page." + validations: + required: true + + - type: textarea + id: steps-to-reproduce + attributes: + label: "Steps to reproduce" + description: "Explain how to reproduce the issue." + placeholder: | + 1. Go to the page + 2. Describe the actions + 3. Explain the expected behavior + validations: + required: false + + - type: textarea + id: suggested-fix + attributes: + label: "Suggested fix" + description: "Provide corrections or relevant references if possible." + placeholder: "e.g., link to correct behavior or suggested text/code." + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/documentation-improvement.yml b/.github/ISSUE_TEMPLATE/documentation-improvement.yml new file mode 100644 index 000000000000..50b4508e3306 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/documentation-improvement.yml @@ -0,0 +1,40 @@ +name: "Documentation Improvement" +description: "Suggest an improvement for the PHP documentation" +labels: ["enhancement"] + +body: + - type: input + id: affected-page + attributes: + label: "Affected page" + description: "Provide the URL or file path of the documentation to improve." + placeholder: "e.g., https://www.php.net/manual/en/function.strlen.php" + validations: + required: true + + - type: textarea + id: current-issue + attributes: + label: "Current issue" + description: "Explain what is wrong or lacking, such as outdated info, missing examples, or unclear explanations." + placeholder: "Explain why the current documentation needs improvement." + validations: + required: true + + - type: textarea + id: suggested-improvement + attributes: + label: "Suggested improvement" + description: "Provide updated content, better examples, or clarifications." + placeholder: "Share your proposed improvement." + validations: + required: true + + - type: textarea + id: additional-context + attributes: + label: "Additional context (optional)" + description: "Provide references, links, or examples from official or relevant sources." + placeholder: "Optional references or further explanation." + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/documentation-issue.md b/.github/ISSUE_TEMPLATE/documentation-issue.md deleted file mode 100644 index 5df5e59d70a0..000000000000 --- a/.github/ISSUE_TEMPLATE/documentation-issue.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -name: "Documentation Improvement" -about: "Suggest an improvement for the PHP documentation" -title: "Improve ..." -labels: "enhancement" -assignees: "" ---- - -**Affected page** - -_(Provide the URL or file path of the documentation to improve.)_ - -**Current issue** - -_(Explain why the content could be improved, e.g., outdated information, missing examples, lack of clarity.)_ - -**Suggested improvement** - -_(Provide updated content, code snippets, or explanations that could enhance the documentation.)_ - -**Additional context** - -_(Optional: Provide any references or examples from official sources.)_