Thank you for your interest in contributing to Password Toggle Bundle! This document provides guidelines for contributing to the project.
This project adheres to a code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to hectorfranco@nowo.tech.
If you find a bug, please:
- Check that the bug hasn't already been reported in the issues
- Create a new issue with:
- A descriptive title
- Steps to reproduce the problem
- Expected behavior vs. actual behavior
- PHP, Symfony, and bundle versions
- Screenshots if relevant
Enhancement suggestions are welcome:
- Check that the enhancement hasn't already been suggested in the issues
- Create a new issue with:
- A descriptive title
- Detailed description of the proposed enhancement
- Use cases and benefits
- Possible implementations (if you have them)
- Fork the repository on GitHub
- Clone your fork:
git clone https://github.com/your-username/password-toggle-bundle.git cd password-toggle-bundle - Install dependencies:
# With Docker (recommended) make install # Without Docker composer install
The project follows these standards:
- PSR-12: PHP code style
- PHP 8.2+: Modern PHP features
- Strict type hints:
declare(strict_types=1);in all files - PHP-CS-Fixer: Used to maintain code consistency
Before committing:
# Install git hooks (strips accidental Cursor co-author trailers from messages)
make setup-hooks
# Verify git history has no Cursor co-author trailers (also runs in release-check)
make check-no-cursor-coauthor# Check code style
make cs-check
# or
composer cs-check
# Fix code style automatically
make cs-fix
# or
composer cs-fixCI requires at least 95% code coverage (MIN_COVERAGE in .github/workflows/ci.yml). All tests must pass before merging. New features should include tests.
# Run all tests
make test
# or
composer test
# Run tests with coverage
make test-coverage
# or
composer test-coverage
# View coverage report
open coverage/index.htmlTest structure:
- Tests should be in the
tests/directory - Each class should have its corresponding test
- Tests should be descriptive and cover edge cases
- Use mocks when appropriate
- Maintain ≥95% coverage — new features must include tests (
make test-coverage)
-
Create a branch from
main:git checkout -b feature/my-new-feature # or git checkout -b fix/my-bug-fix -
Make your changes:
- Write clean, well-documented code
- Add tests for new features
- Ensure all tests pass
- Run
make qato verify everything
-
Commit your changes:
git add . git commit -m "feat: description of feature" # or git commit -m "fix: description of fix"
Commit conventions:
feat:New featurefix:Bug fixdocs:Documentation changestest:Add or modify testsrefactor:Code refactoringstyle:Formatting changes (doesn't affect functionality)chore:Maintenance tasks
-
Push to your fork:
git push origin feature/my-new-feature
-
Create a Pull Request on GitHub:
- Clearly describe the changes
- Mention any related issues
- Add screenshots if relevant
- Ensure CI passes
- Code follows PSR-12 standards
- Ran
make cs-fix(orcomposer cs-fix) - All tests pass (
make test) - Code coverage is ≥95% (
make test-coverage) - Added tests for new functionality
- Documentation is updated (if necessary)
- CHANGELOG.md is updated (if necessary)
- Code is well commented
- No warnings or errors from PHPStan/Psalm (if used)
password-toggle-bundle/
├── src/ # Bundle source code
│ ├── DependencyInjection/ # Bundle configuration
│ ├── Form/ # Form types
│ └── Resources/ # Resources (templates, assets)
├── tests/ # Tests
├── demo/ # Demo project
├── .github/ # GitHub configuration
└── docs/ # Additional documentation (if any)
The project includes a demo project to test the bundle:
demo/- Demo Symfony project with Docker setup
To run the demo:
# Install dependencies
cd demo
make up
make install
# Start containers
docker-compose up -d
# Access the demo
# http://localhost:8080If you have questions about contributing, you can:
- Open an issue on GitHub
- Contact the maintainers at hectorfranco@nowo.tech
Thank you for contributing to Password Toggle Bundle. Your help makes this project better for everyone.
If CI fails because trailers are already on the remote, see GITHUB_CI.md (REQ-GIT-001) and run make strip-cursor-coauthor-from-history before git push --force-with-lease.