CakePHP loves to welcome your contributions. There are several ways to help out:
There are a few guidelines that we need contributors to follow so that we have a chance of keeping on top of things.
Help us keep CakePHP open and inclusive. Please read and follow our Code of Conduct.
5.x right now.5.x
git branch 5.x/my_contribution 5.x then checkout the new branch with git
checkout 5.x/my_contribution. Better avoid working directly on the
5.x branch, to avoid conflicts if you pull in updates from origin.git diff --check before committing.5.x right now.next branch. For example if you want to contribute to the next 5.x branch, you should base your changes on 5.next.BC breaking code changes mean, that a given PR introduces code changes which can't be performed by everyone without the need to manually adjust code.
Here are some rules which prevent BC breaking code changes:
Also see our current Release Policy
To run the test cases locally use the following command:
composer test
You can copy file phpunit.xml.dist to phpunit.xml and modify the database
driver settings as required to run tests for a particular database.
To run the sniffs for CakePHP coding standards:
composer cs-check
Check the cakephp-codesniffer repository to set up the CakePHP standard. The README contains installation info for the sniff and phpcs.
To run static analysis tools PHPStan and Psalm you first have to install the additional packages via phive.
composer stan-setup
The currently used PHPStan and Psalm versions can be found in .phive/phars.xml.
After that you can perform the checks via:
composer stan
Note that updating the baselines need to be done with the same PHP version it is run online. That is usually the minimum version. Make sure to "composer install" and set up the stan tools with it and then also execute them.
If you've found a security related issue in CakePHP, please don't open an issue in github. Instead, contact us at security@cakephp.org. For more information on how we handle security issues, see the CakePHP Security Issue Process.