diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..9a76f88 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,62 @@ +name: Bug report +description: A specific address parses incorrectly, or the library errors unexpectedly. +labels: ["bug"] +body: + - type: markdown + attributes: + value: | + Thanks for the report! The single most useful thing you can give us is the **exact input string** that misparses and what you expected — that turns straight into a test case. + - type: textarea + id: input + attributes: + label: Input + description: The exact address string passed to the parser. Paste it verbatim (in backticks) — whitespace and invisible characters matter. + placeholder: "`\"John Doe\" `" + validations: + required: true + - type: textarea + id: expected + attributes: + label: Expected result + description: What should the parser return? (valid/invalid, the local part / domain, or the error code you'd expect.) + validations: + required: true + - type: textarea + id: actual + attributes: + label: Actual result + description: What does it return instead? Include the relevant fields — e.g. `invalid`, `invalidReason`, `invalidReasonCode`, `localPart`, `domain`. + validations: + required: true + - type: textarea + id: options + attributes: + label: Options / preset used + description: Which preset or `ParseOptions` did you configure? Paste the `ParseOptions::...` / `withX()` setup (or "defaults / `new Parse()`"). + render: php + placeholder: | + $parser = new Parse(null, ParseOptions::rfc5322()->withRequireFqdn(false)); + $result = $parser->parseSingle($input); + validations: + required: true + - type: input + id: package-version + attributes: + label: Package version + description: "Output of `composer show mmucklo/email-parse | grep versions` (e.g. 3.8.0, or 3.8.0.71 for the PHP 7.1 build)." + validations: + required: true + - type: input + id: php-version + attributes: + label: PHP version + description: "Output of `php -v` (first line)." + validations: + required: true + - type: input + id: rfc + attributes: + label: Relevant RFC (optional) + description: If you know the rule this violates, cite it — e.g. "RFC 5322 §3.2.4". Helps us confirm the correct behavior. + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..c123299 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: Question or usage help + url: https://github.com/mmucklo/email-parse/discussions + about: For "how do I…" and general questions, please open a Discussion rather than an issue. + - name: Cookbook + url: https://github.com/mmucklo/email-parse/blob/master/docs/cookbook.md + about: Common recipes — check here first; your use case may already be covered. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..26dc104 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,33 @@ +name: Feature request +description: Suggest a new option, validation rule, or capability. +labels: ["enhancement"] +body: + - type: textarea + id: problem + attributes: + label: What problem does this solve? + description: The use case or gap you're hitting. What are you trying to do that the library doesn't support today? + validations: + required: true + - type: textarea + id: proposal + attributes: + label: Proposed API / behavior + description: How might it look? A `ParseOptions` flag, a new preset, a new output field, etc. Sketch the call site if you can. + render: php + validations: + required: false + - type: input + id: rfc + attributes: + label: RFC reference (if applicable) + description: If this is about standards conformance, cite the relevant RFC section — e.g. "RFC 6854 (group syntax)". + validations: + required: false + - type: textarea + id: alternatives + attributes: + label: Alternatives considered + description: Workarounds you've tried, or why an existing option doesn't fit. + validations: + required: false diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..ad85306 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,3 @@ +# Code of Conduct + +**tl;dr:** be kind, follow the golden rule, no harassment or doxxing, keep it decent and appropriate. Complaints: **mmucklo@gmail.com**. diff --git a/ROADMAP.md b/ROADMAP.md index 51cb10d..a2bbca4 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -123,8 +123,8 @@ The comparison harness remains a local dev tool (not a CI gate). Every fixed clu **Community / documentation:** - [x] `CONTRIBUTING.md` — dev setup, all `composer` scripts, test-case guidance, code-style rules, RFC citation expectations. -- [~] GitHub issue + pull-request templates. (PR template done; issue templates still to add.) -- [ ] `CODE_OF_CONDUCT.md`. +- [x] GitHub issue + pull-request templates — YAML issue forms (parser-tailored bug report + feature request) with a config linking Discussions/cookbook, plus a PR template. +- [x] `CODE_OF_CONDUCT.md` — minimal statement + report contact (mmucklo@gmail.com). - [x] Examples cookbook — `docs/cookbook.md` (parsing, presets, streaming, UTF-8/IDN, error codes/severity, `canonical()`, local-part normalizer, confusable-domain detection, legacy array API). Linked from the README. - [ ] README cleanup — split the large reference tables into `docs/` sub-pages if the top-level README grows further.