Skip to content

Latest commit

 

History

History
52 lines (35 loc) · 1.27 KB

CONTRIBUTING.md

File metadata and controls

52 lines (35 loc) · 1.27 KB

How to contribute to laravel-enum

Hey, thank you for contributing. Here are some tips to make it easy for you.

Committing code

  1. Fork the project
  2. git clone it and composer install the dependencies
  3. Create a new branch
  4. Think about how the changes you are about to make can be tested, write tests before coding
  5. Run tests, make sure they fail
  6. Write the actual code to make the tests pass
  7. Run checks with make
  8. Open a pull request detailing your changes. Make sure to follow the template

Testing

We use PHPUnit for automated tests.

Have a new feature? You can start off by writing some tests that detail the behaviour you want to achieve and go from there.

Fixing a bug? The best way to ensure it is fixed for good and never comes back is to write a failing test for it and then make it pass. If you can not figure out how to fix it yourself, feel free to submit a PR with a failing test.

Run the testsuite:

make test

Codestyle

Formatting is automated through php-cs-fixer.

Apply automated fixes:

make fix

Static Analysis

We use PHPStan for static analysis.

Run static analysis:

make stan