Enjoy PHP The Right Way and want to get involved? Great! There are plenty of ways you can help out.
Please take a moment to review this document in order to make the contribution process easy and effective for everyone involved.
Following these guidelines helps to communicate that you respect the time of the developers managing and developing this open source project. In return, they should reciprocate that respect in addressing your issue or assessing patches and features.
The issue tracker is the preferred channel for changes: spelling mistakes, wording changes, new content and generally submitting pull requests, but please respect the following restrictions:
-
Please do not use the issue tracker for personal support requests (use Stack Overflow or IRC).
-
Please do not derail or troll issues. Keep the discussion on topic and respect the opinions of others.
Pull requests are a great way to add new content to PHP The Right Way, as well as updating any browser issues or other style changes. Pretty much any sort of change is accepted if seen as constructive.
Adhering to the following process is the best way to get your work included in the project:
-
Fork the project, clone your fork, and configure the remotes:
# Clone your fork of the repo into the current directory git clone https://github.com/<your-username>/php-the-right-way.git # Navigate to the newly cloned directory cd php-the-right-way # Assign the original repo to a remote called "upstream" git remote add upstream https://github.com/codeguy/php-the-right-way.git
-
If you cloned a while ago, get the latest changes from upstream:
git checkout gh-pages git pull upstream gh-pages
-
Create a new topic branch (off the main project development branch) to contain your change or fix:
git checkout -b <topic-branch-name>
-
Install the Jekyll gem and dependencies to preview locally:
# Install the needed gems through Bundler bundle install --path vendor/bundle # Run the local server bundle exec jekyll serve
-
Commit your changes in logical chunks. Please adhere to these git commit message guidelines or your content is unlikely be merged into the main project. Use Git's interactive rebase feature to tidy up your commits before making them public.
-
Locally merge (or rebase) the upstream development branch into your topic branch:
git pull [--rebase] upstream gh-pages
-
Push your topic branch up to your fork:
git push origin <topic-branch-name>
-
Open a Pull Request with a clear title and description.
By submitting a pull request to this repository, you agree to allow the project owners to license your work under the the terms of the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
The same content and license will be used for all PHP The Right Way publications, including - but not limited to:
- phptherightway.com
- Translations of phptherightway.com
- LeanPub: PHP The Right Way
- Translations of "LeanPub: PHP The Right Way"
All content is completely free now, and always will be.
- Use American English spelling (primary English repo only)
- Use four (4) spaces to indent text; do not use tabs
- Wrap all text to 120 characters
- Code samples should adhere to PSR-1 or higher
- Use GitHub Flavored Markdown for all content
- Use language agnostic urls when referring to external websites such as the php.net manual