Thank you for considering contributing to Craftile PHP! This document outlines the process for contributing to this monorepo.
-
Clone the repository
git clone https://github.com/craftile/php.git cd craftile-php -
Install dependencies
composer install
Git hooks are automatically installed via composer scripts - no manual setup required!
We use Conventional Commits for all commit messages:
feat:- A new featurefix:- A bug fixdocs:- Documentation changesstyle:- Code style changes (formatting, etc.)refactor:- Code refactoringperf:- Performance improvementstest:- Adding or updating testschore:- Maintenance tasks
Breaking changes should use ! (e.g., feat!: or fix!:) or include BREAKING CHANGE: in the footer.
Before each commit, the following tools run automatically via git hooks:
- Laravel Pint - Code formatting
- PHPStan - Static analysis
- PestPHP - Tests (on push)
You can also run these manually:
composer format # Format code
composer analyse # Run static analysis
composer test # Run testsThis is a monorepo with the following packages:
packages/core- Core functionalitypackages/laravel- Laravel integration (depends on core)
- Create package directory under
packages/ - Add
composer.jsonwith proper autoloading - Update root
composer.jsonreplace section - Add to monorepo split workflow if needed
- Write tests for all new features and bug fixes
- Tests are located in each package's
tests/directory - We use PestPHP as our testing framework
- Run tests with
composer test
- Fork the repository and create a feature branch
- Make your changes following our coding standards
- Write tests for your changes
- Ensure all checks pass (formatting, analysis, tests)
- Submit a pull request with:
- Clear description of changes
- Link to any related issues
- Screenshots if applicable
Releases are automated based on conventional commits:
- Patch (
fix:,perf:,refactor:) →v1.0.1 - Minor (
feat:) →v1.1.0 - Major (
feat!:,fix!:,BREAKING CHANGE:) →v2.0.0
Packages are automatically split into separate repositories:
packages/core→craftile/corepackages/laravel→craftile/laravel
- 📝 Open an issue for bugs or feature requests
- 💬 Start a discussion for questions
- 📖 Check existing documentation
By contributing, you agree that your contributions will be licensed under the MIT License.