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
51 changes: 51 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
name: Bug Report
about: Create a report to help us improve
title: "[BUG] "
labels: bug
assignees: ''

---

## Bug Description

A clear and concise description of what the bug is.

## Environment

**PHP Version:**
<!-- e.g., 8.2.15, 8.3.2 -->

**PHPStan Version:**
<!-- e.g., 2.0.1, 2.1.0 -->

**Extension Version:**
<!-- e.g., 1.0.0 or commit hash if using dev version -->

## Code Sample

Please provide a minimal code sample that demonstrates the issue:

```php
// Your code here that reproduces the issue
```

## Expected Behavior

A clear and concise description of what you expected to happen.

## Actual Behavior

A clear and concise description of what actually happened.

## PHPStan Configuration

If relevant, please share your PHPStan configuration:

```neon
# Your phpstan.neon configuration
```

## Additional Context

Add any other context about the problem here (stack traces, error messages, etc.).
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Ask a Question
url: https://github.com/built-fast/phpstan-sensitive-parameter/discussions
about: Ask questions and discuss with the community
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Feature Request
about: Suggest an idea for this project
title: "[FEATURE] "
labels: enhancement
assignees: ''

---

## Feature Description

A clear and concise description of what you want to happen.

## Use Case

Describe the problem you're trying to solve. Why would this feature be useful?

## Proposed Solution

A clear and concise description of what you want to happen.

## Code Example

If applicable, provide a code example of how this feature would work:

```php
// Example of how the feature would be used
```

## Alternatives Considered

A clear and concise description of any alternative solutions or features you've considered.

## Additional Context

Add any other context, screenshots, or examples about the feature request here.
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 @@
## Summary

Describe what this PR does and why it's needed.

## Type of Change

- [ ] πŸ› Bug fix (non-breaking change that fixes an issue)
- [ ] ✨ New feature (non-breaking change that adds functionality)
- [ ] πŸ’₯ Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] πŸ“š Documentation update
- [ ] 🎨 Code style/formatting change
- [ ] ♻️ Refactoring (no functional changes)
- [ ] ⚑ Performance improvement
- [ ] πŸ§ͺ Test updates

## Changes Made

- [ ] Describe specific change 1
- [ ] Describe specific change 2
- [ ] Describe specific change 3

## Testing

- [ ] Added/updated tests for new functionality
- [ ] All existing tests pass (`vendor/bin/pest`)
- [ ] PHPStan analysis passes (`vendor/bin/phpstan analyze`)
- [ ] Code style check passes (`vendor/bin/pint --test`)
- [ ] Tested with PHP 8.2 and 8.3
- [ ] Tested with multiple PHPStan versions (if applicable)

## Documentation

- [ ] README updated (if applicable)
- [ ] Code comments added for complex logic
- [ ] PHPDoc blocks updated

## Checklist

- [ ] Self-review completed
- [ ] Code follows project style guidelines (PSR-12, enforced by Pint)
- [ ] No breaking changes (or breaking changes documented)
- [ ] Commit messages are clear and descriptive
104 changes: 104 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test:
name: Tests (PHP ${{ matrix.php-version }}, PHPStan ${{ matrix.phpstan-version }})
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php-version: [8.2, 8.3]
phpstan-version: ['2.0.*', '^2.1']

steps:
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: dom, curl, libxml, mbstring, zip
coverage: none

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-

- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Install specific PHPStan version
run: composer require --dev "phpstan/phpstan:${{ matrix.phpstan-version }}" --no-update && composer update phpstan/phpstan

- name: Execute tests via Pest
run: vendor/bin/pest

pint:
name: Code Style (Pint)
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
extensions: dom, curl, libxml, mbstring, zip
coverage: none

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-

- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Run Pint
run: vendor/bin/pint --test

phpstan:
name: Static Analysis (PHPStan)
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
extensions: dom, curl, libxml, mbstring, zip
coverage: none

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-

- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Run PHPStan
run: vendor/bin/phpstan analyze
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
/vendor/
/composer.lock
/composer.lock
/.envrc
/.phpunit.result.cache
/.claude/settings.local.json
.DS_Store
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 BuiltFast.com

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading