Skip to content
62 changes: 62 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -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\" <john@example.com>`"
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
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -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.
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -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**.
4 changes: 2 additions & 2 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Loading