Sync GitHub / sync (push) Successful in 8s
Code quality: - Create AppConstants class with shared constants: - FAR_FUTURE_DATE (replaces duplicated '2999-12-31' strings) - MAX_INPUT_LENGTH (replaces duplicated 128 in Payload and StringTrait) - Extract duplicated 'hi $id' response body into StringTrait::authSuccessResponse() method, used by AcceptListener, AllowListener, and LoginManager - Add missing @throws InvalidArgumentException annotations to MonitorCacheKeys (getItem, hasItem, deleteItem, deleteItems, commit) Configuration: - Add proper env var type casting in services.yaml: - COOKIE_TTL → env(int:) - SUBDOMAIN_REDIRECT → env(bool:) - IP_TTL → env(int:) - TEAPOT → env(bool:) Documentation: - Create CONTRIBUTING.md with development setup, code style, testing guidelines, and PR process
1.9 KiB
1.9 KiB
Contributing to Preauth
Thank you for your interest in contributing to Preauth! This document outlines the process for contributing to the project.
Development Setup
- Clone the repository
- Install dependencies:
composer install - Copy
.env.exampleto.envand configure as needed - Run tests:
vendor/bin/phpunit
Code Style
This project follows PSR-12 and
includes php-cs-fixer as a dev dependency.
# Check for style violations
vendor/bin/php-cs-fixer fix --dry-run --diff
# Auto-fix
vendor/bin/php-cs-fixer fix
All code must pass the style check before it can be merged.
Testing
All code changes must include tests. The project maintains 100% code coverage — new code must be fully tested.
# Run tests
vendor/bin/phpunit
# Run with coverage (requires Xdebug)
XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-text
Test Structure
- Unit tests go in
tests/Unit/and mirror thesrc/directory structure - Functional tests go in
tests/Functional/and test the full HTTP kernel - Use the support traits (
TotpTestHelper,ListenerTestHelper) for reusable test fixtures
Pull Request Process
- Create a feature branch from
main - Make your changes, ensuring tests pass and code style is clean
- Update documentation if needed (README, CHANGELOG, docs/)
- Submit a pull request to
main
Commit Messages
Use conventional commit format:
feat:new featurefix:bug fixdocs:documentation onlyrefactor:code change that neither fixes a bug nor adds a featuretest:adding or correcting testschore:build process, tooling, etc.
Architecture
Preauth is an event-listener-driven Symfony application (no controllers).
See ROADMAP.md for the full architecture overview and design decisions.
License
By contributing, you agree that your contributions will be licensed under the MIT License.