Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
name: Bug Report
about: Report a bug in laravel-toggle
title: "[Bug]: "
labels: bug
assignees: ''
---

### Description

A clear and concise description of the bug.

### Steps to Reproduce

Provide a minimal code sample or steps that reproduce the issue.

```php
// e.g. defining a flag, calling Toggle::active(), enabling/disabling, etc.
```

1. Configure '...'
2. Call '...'
3. See the error.

### Expected Behavior

Explain what you expected to happen.

### Actual Behavior

What actually happened? Include stack traces, exception messages, or relevant log output.

```
// Paste stack trace / error output here
```

### Environment

- Package version: [e.g., 2.0.0]
- Laravel version: [e.g., 11.x, 12.x, 13.x]
- PHP version: [e.g., 8.3, 8.4, 8.5]
- Driver: [e.g., config, database, mixed]
- Cache store: [e.g., file, redis, array, none]
- OS: [e.g., macOS, Linux, Windows/WSL]

### Relevant Configuration

If applicable, share your `config/toggle.php` overrides (`driver`, `default`, `flags`, `database_flags`, cache settings).

### Additional Context

Add any other context about the problem here (related packages, Inertia setup, custom drivers, etc.).
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
blank_issues_enabled: false
issue_templates:
- name: "Bug Report"
description: "Report a bug."
title: "[Bug]: "
labels: ["bug"]
body: "./ISSUE_TEMPLATE/bug_report.md"
- name: "Feature Request"
description: "Propose a new feature or improvement."
title: "[Feature]: "
labels: ["enhancement"]
body: "./ISSUE_TEMPLATE/feature_request.md"
- name: "Documentation"
description: "Suggest updates or additions to documentation."
title: "[Docs]: "
labels: ["documentation"]
body: "./ISSUE_TEMPLATE/documentation_request.md"
- name: "General Report"
description: "Provide general feedback or inquiries."
title: "[General]: "
labels: ["general"]
body: "./ISSUE_TEMPLATE/general_report.md"
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Documentation
about: Suggest updates or additions to documentation
title: "[Docs]: "
labels: documentation
assignees: ''
---

### Affected Documentation

Which file or section needs updating? (e.g., `README.md`, installation guide, configuration reference, driver examples, CHANGELOG)

### What Is Missing or Incorrect?

Describe what's unclear, outdated, or absent.

### Suggested Changes

Provide a detailed description — or a draft — of the proposed wording or examples.

### Why Is This Needed?

Explain who benefits and how (e.g., new adopters, upgraders from v1.x, contributors).

### Additional Context

Links to related issues, PRs, or external references.
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Feature Request
about: Suggest a new feature or improvement for laravel-toggle
title: "[Feature]: "
labels: enhancement
assignees: ''
---

### Feature Description

What feature would you like to see in the package?

### Why Is This Needed?

Describe the problem this solves or the use case it enables. Is it related to drivers, caching, Blade directives, Artisan commands, Inertia integration, per-flag routing, etc.?

### Suggested API / Implementation

If you have an idea of how this should look, share a code sketch.

```php
// e.g. proposed method signature, config key, or usage example
```

### Alternatives Considered

Are there workarounds you've tried, or alternative approaches you've ruled out?

### Backwards Compatibility

Would this change break existing API surface (facade methods, Blade directives, drivers, config keys, migrations)?

### Additional Context

Add any relevant links, references, or related issues.
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/general_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: General Report
about: Provide general feedback, questions, or inquiries about laravel-toggle
title: "[General]: "
labels: general
assignees: ''
---

### Topic

What is this about? (e.g., question, feedback, discussion, support inquiry)

### Details

Describe your question, feedback, or inquiry clearly. Include code samples if relevant.

```php
// Optional: code context
```

### Environment (if applicable)

- Package version: [e.g., 2.0.0]
- Laravel version: [e.g., 11.x, 12.x, 13.x]
- PHP version: [e.g., 8.3, 8.4, 8.5]

### Additional Context

Add any other information that might help us respond.
42 changes: 42 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Description

Please include a summary of the changes and the related issue. Include the motivation and context, and list any package
dependencies impacted by this change.

Fixes # (issue)

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Deprecation (marks existing API as deprecated)
- [ ] Refactor / internal change (no functional impact)
- [ ] Documentation update
- [ ] CI / tooling change

## How Has This Been Tested?

Describe the tests you ran to verify your changes (Pest tests, manual checks in a host Laravel app, etc.). Provide
instructions so reviewers can reproduce.

- [ ] `composer test` passes
- [ ] `composer analyse` (PHPStan / Larastan) passes
- [ ] `composer pint` shows no formatting changes
- [ ] Added or updated tests covering the change

**Test Configuration**:

- PHP version(s): [e.g., 8.3, 8.4, 8.5]
- Laravel version(s): [e.g., 11.x, 12.x, 13.x]
- Driver(s) exercised: [e.g., config, database, both]

## Checklist

- [ ] My code follows the style guidelines of this project (Pint / PSR-12)
- [ ] I have performed a self-review of my code
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing tests pass locally with my changes
- [ ] I have updated the README / docs where relevant
- [ ] My commit messages follow Conventional Commits
- [ ] Any breaking changes are clearly called out above
5 changes: 4 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fail-fast: true
matrix:
php: [ 8.3, 8.4 ]
laravel: [ 12.*, 13.* ]
laravel: [ 11.*, 12.*, 13.* ]
stability: [ prefer-lowest, prefer-stable ]

name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.stability }}
Expand All @@ -36,6 +36,9 @@ jobs:

- name: Install dependencies
run: |
if [[ "${{ matrix.laravel }}" == "11.*" ]]; then
composer config --json policy.advisories.block false
fi
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction

Expand Down
46 changes: 46 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Code of Conduct

## Our pledge

We want this project to be a welcoming, respectful space for everyone who wants to contribute — regardless of background, identity, or experience level.

## Expected behavior

- Be kind and patient. Assume good faith.
- Critique code and ideas, not people.
- Welcome questions, including basic ones.
- Acknowledge differing viewpoints and accept constructive feedback gracefully.
- Take responsibility for mistakes; learn and move on.

## Unacceptable behavior

- Personal attacks, insults, or demeaning language.
- Harassment of any kind, in public or private channels.
- Discriminatory language or behavior.
- Publishing others' private information without consent.
- Disruptive behavior that derails productive discussion.
- Any conduct a reasonable person would consider inappropriate in a professional setting.

## Scope

This Code of Conduct applies to all project spaces — issues, pull requests, discussions, commit messages, and any other communication tied to the project. It also applies when an individual is representing the project in public spaces.

## Enforcement

If you experience or witness behavior that violates this Code of Conduct, please report it via [GitHub Security Advisories](https://github.com/offload-project/laravel-toggle/security/advisories/new) (which supports private reporting) or by opening a private channel with a maintainer.

Maintainers will review reports promptly and respond with appropriate action, which may include:

- A private warning
- A temporary ban from project spaces
- A permanent ban from project spaces

Reports will be handled with discretion. The reporter's identity will be kept confidential unless they choose otherwise.

## Maintainer responsibilities

Maintainers are responsible for clarifying standards, responding to reports fairly, and applying enforcement consistently. Maintainers who do not uphold this Code of Conduct in good faith may face consequences as determined by other maintainers.

## Attribution

This Code of Conduct is inspired by the [Contributor Covenant](https://www.contributor-covenant.org/), adapted to be concise for this project.
Loading