Thank you for considering contributing to make-bundle!
- Docker and Docker Compose
- Make
# Clone repository
git clone https://github.com/neuralglitch/make-bundle.git
cd make-bundle
# Install dependencies
docker compose run --rm php composer install# Run all tests
make test
# Run tests with coverage
make test-coverage
# View coverage report
open build/coverage/index.htmlCoverage Target: >80% line coverage for testable code
# PHPStan (static analysis)
make phpstan
# Psalm (static analysis)
make psalm
# PHP CS Fixer (code style)
make cs-fix
# Run all checks
make test && make phpstan && make psalmThis project follows:
- PSR-12 coding standards
- PHP 8.1+ features
- Strict types (
declare(strict_types=1)) - Final classes where appropriate
- Array type hints in PHPDoc
When adding new features:
- Update Configuration - Add properties to
BundleConfiguration - Update Wizard - Add questions to
BundleConfigAssistant - Create Templates - Add Twig templates if needed
- Update Service - Extend
CreateBundleServicegeneration logic - Add Tests - Write tests for new functionality
- Update Documentation - Document user-facing changes
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Make your changes
- Add tests (maintain >80% coverage)
- Run quality checks:
make test make phpstan make psalm make cs-fix - Commit with clear message
- Push to your fork
- Open a Pull Request
- ✅ All tests passing
- ✅ PHPStan Level max: 0 errors
- ✅ Psalm: 0 errors, 0 INFO issues
- ✅ Coverage >80% for new code
- ✅ Code follows PSR-12
- ✅ Documentation updated
- ✅ CHANGELOG.md updated (user-facing changes only)
✅ Tests - New code should be tested
✅ Type Safety - Proper type hints and PHPDoc
✅ Documentation - User-facing features documented
✅ Backward Compatibility - No breaking changes without major version
✅ Code Quality - Follows existing patterns
# PHPUnit verbose
docker compose run --rm php vendor/bin/phpunit --verbose
# PHPStan verbose
docker compose run --rm php vendor/bin/phpstan analyse -vvv
# Psalm verbose
docker compose run --rm php vendor/bin/psalm -vvv# Single test class
docker compose run --rm php vendor/bin/phpunit tests/Service/CreateBundleServiceTest.php
# Single test method
docker compose run --rm php vendor/bin/phpunit --filter testCreateBasicBundle# Generate in /tmp for inspection
bin/console make:bundle test/debug-bundle /tmp
# Inspect generated files
cat /tmp/test/debug-bundle/src/TestDebugBundle.php- Update version in CHANGELOG.md
- Run full test suite
- Tag release:
git tag v1.0.0 - Push tag:
git push origin v1.0.0 - GitHub Actions will handle the rest
- Open an Issue
- Check existing discussions
By contributing, you agree that your contributions will be licensed under the MIT License.