This document provides guidelines and information for contributors to the Neuron AI + Symfony Company Research Application.
- Code of Conduct
- How to Contribute
- Development Environment
- Coding Standards
- Git Workflow
- Pull Request Process
- Testing Guidelines
- Documentation Requirements
- Release Process
- Community
Our project is committed to fostering an open and welcoming environment. We expect all participants to adhere to the following principles:
- Respect: Treat all contributors and users with respect and consideration.
- Inclusivity: Welcome contributions from people of all backgrounds and experience levels.
- Collaboration: Work together constructively and value diverse perspectives.
- Thoughtful Communication: Communicate professionally and considerately.
Unacceptable behaviors include:
- Harassment, discrimination, or derogatory comments
- Personal attacks or trolling
- Public or private harassment
- Any conduct that would be inappropriate in a professional setting
There are many ways to contribute to the project:
Before submitting a bug report:
- Check the TROUBLESHOOTING.md document for known issues
- Search existing issues to avoid duplicates
- Gather relevant information: PHP version, Symfony version, error messages, etc.
When submitting a bug report:
- Use a clear, descriptive title
- Provide detailed steps to reproduce the issue
- Include error messages and logs
- Describe expected vs. actual behavior
- Share environment details
Suggestions for enhancements are welcome. Please include:
- Clear problem statement (what issue is being solved)
- Description of the proposed solution
- Potential benefits and drawbacks
- Any alternative solutions considered
Code contributions should follow these steps:
- Check existing issues and discussions to avoid duplicating work
- For significant changes, open an issue first to discuss your approach
- Follow the development workflow
- Submit a pull request with a clear description
Follow the setup instructions in the DEVELOPMENT.md document to prepare your development environment.
- PHP 8.3+
- Composer
- Git
- Familiarity with Symfony framework
- Development editor (VS Code, PhpStorm recommended)
We follow PSR-12 coding standards. Key points:
- Use 4 spaces for indentation, not tabs
- Lines should not exceed 120 characters
- Use camelCase for method names and variables
- Use CapitalizedCase for class names
- Add appropriate docblocks for classes and methods
Follow the Symfony Best Practices, including:
- Controllers should be thin, with business logic in services
- Use dependency injection rather than static calls
- Use annotations/attributes for routing and entity definitions
- Use Symfony's Form component for form handling
- Follow Doctrine's best practices for database access
Document your code with PHPDoc comments:
/**
* Generates financial analysis for a company
*
* This method uses the Neuron AI service to analyze and generate
* financial insights for the specified company.
*
* @param string $companyName The name of the company to analyze
* @param string $reportType The type of report to generate (e.g., '10-K', 'quarterly')
*
* @return array The generated financial analysis data
*
* @throws \Exception If the AI service fails to generate the analysis
*/
public function generateFinancialAnalysis(string $companyName, string $reportType): array
{
// Method implementation...
}We use a feature branch workflow:
main: Stable, production-ready codedev: Development integration branchfeature/feature-name: For new feature developmentbugfix/bug-name: For bug fixesdocs/change-description: For documentation changes
Use conventional commits format:
type(scope): short description
longer description if needed
Where type is one of:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, no logic change)refactor: Code refactoringtest: Adding or updating testschore: Build process or auxiliary tool changes
Examples:
feat(company): add competitor analysis feature
fix(financial): correct stock price calculation
docs(setup): update PHP extension requirements
- Fork the repository
- Create a feature branch from
dev - Make your changes
- Run tests to ensure your changes don't break existing functionality
- Push your branch to your fork
- Submit a pull request from your branch to our
devbranch
When submitting a pull request:
- Update the README.md or documentation with details of significant changes
- Add or update tests for the changed functionality
- Ensure all tests pass
- Get at least one code review from a maintainer
- Respond to feedback and make requested changes
- Once approved, a maintainer will merge your changes
When creating a pull request, please include:
## Description
Brief description of the changes.
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Code refactoring
- [ ] Other (please describe):
## How Has This Been Tested?
Describe the tests you ran to verify your changes.
## Checklist:
- [ ] My code follows the project's coding standards
- [ ] I have added tests that prove my fix/feature works
- [ ] New and existing unit tests pass with my changes
- [ ] I have updated the documentation accordingly
- [ ] My changes don't introduce new warnings or deprecation noticesWe use multiple testing approaches:
- Unit Tests: Test individual components in isolation
- Functional Tests: Test complete feature workflows
- Integration Tests: Test interactions between components
Aim for high test coverage with these priorities:
- Core business logic in services
- Repository methods with complex queries
- Controller actions with complex logic
- Edge cases and error scenarios
Use PHPUnit to run tests:
# Run all tests
php bin/phpunit
# Run specific test suite
php bin/phpunit --testsuite=Unit
# Run tests with coverage report
php bin/phpunit --coverage-html coverageFor tests involving external services:
- Use mocks or test doubles
- Avoid making real API calls in tests
- Consider using PHP-VCR for API interaction tests
Documentation is a critical part of any contribution. Please:
- Document all public APIs with PHPDoc comments
- Update README.md for user-facing changes
- Update relevant documentation in the docs/ directory
- Include example code when applicable
- Document configuration options and default values
| File | Purpose |
|---|---|
| README.md | Overview, quick start |
| docs/SETUP.md | Environment setup |
| docs/ARCHITECTURE.md | System architecture |
| docs/DEVELOPMENT.md | Development guide |
| docs/DEPLOYMENT.md | Deployment procedures |
| docs/TROUBLESHOOTING.md | Common issues and solutions |
Our release process follows these steps:
- Feature Freeze: No new features added to
devbranch - Stabilization: Bug fixes and documentation improvements
- Release Candidate: Tagged from
devbranch for final testing - Release: Merge to
mainand tag with version number - Announcement: Release notes published
We follow Semantic Versioning:
- MAJOR version for incompatible API changes
- MINOR version for new functionality in a backward compatible manner
- PATCH version for backward compatible bug fixes
If you have questions or need help:
- Check existing documentation
- Search for existing issues
- Open a new issue with the "question" label
Contributors are acknowledged in:
- Release notes
- Contributors section in the README.md
- Community highlights in project communications
- Issues: For bug reports and feature discussions
- Pull Requests: For code review discussions
- Discussions: For general questions and community conversation
Thank you for considering contributing to our project! Your efforts help make this project better for everyone.