Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Contributing to Open Source PHP Projects

Contributing to Open Source PHP Projects

Developers in the PHP community work on really cool stuff. Whether it's a full-stack framework, CLI tool, ORM, or single-purpose library, developers are contributing code, filing issues, writing docs, adding tests, fixing typos, and more. Don't be afraid to jump in and help! OK, maybe it is a little intimidating at first, so that's why we will discuss everything you need to get started. We'll talk about open source in general, licenses, Git, GitHub, pull requests, autoloading and Composer, testing , project communication, documentation, and... well... that's probably plenty.

Jeremy Lindblom

August 12, 2014
Tweet

More Decks by Jeremy Lindblom

Other Decks in Programming

Transcript

  1. Open Source Software i.e., source code is available associated with

    a license often developed in public and/or collaboratively
  2. Contributing to OSS Find a project. (Ideally, something that you

    already use) — OR — Start a project. (Ideally, something that you already need)
  3. Contributing to OSS Write Code: Bug Fixes, Features, Plugins, Tests,

    Improvements, etc. Write/Improve Docs Community Participation Run Tests Report Bugs Improve Automation Donate Money/In-Kind Use/Share the Software Say Thanks
  4. How to NOT Contribute •  Be overly critical of projects/people

    •  Be rude or disrespectful •  Make unreasonable demands •  Never offer to help •  Be ungrateful for others' time/work •  Be offended if contributions rejected
  5. What's in it for me? •  Improve the code you

    use •  Build reputation, résumé, and portfolio •  Learn new skills (including soft skills) •  Give back •  Personal satisfaction
  6. Anatomy of an OS PHP Project +  lib/   +

     tests/   +  LICENSE   +  README.md  
  7. Anatomy of an OS PHP Project -­‐  lib/   +

     src/      tests/      LICENSE      README.md  
  8. Anatomy of an OS PHP Project +  build/   +

     docs/      src/      tests/      LICENSE      README.md  
  9. Anatomy of an OS PHP Project +  build/   +

     docs/      src/      tests/      LICENSE      README.md  
  10. Anatomy of an OS PHP Project    build/    

     docs/      src/      tests/   +  .gitignore  (and  other  dotfiles)            LICENSE      README.md  (and  other  documentation)   +  composer.json  (and  other  config)  
  11. Anatomy of an OS PHP Project .coveralls.yml   .gitattributes  

    .gitignore   .gitattributes   .scrutinizer.yml   .travis.yml   CONTRIBUTING.md   LICENSE   Makefile   README.md   build.xml   composer.json   composer.lock   phpunit.xml.dist  
  12. Anatomy of an OS PHP Project Some examples: •  https://github.com/symfony/symfony

    •  https://github.com/laravel/framework •  https://github.com/zendframework/zf2 •  https://github.com/guzzle/guzzle •  https://github.com/doctrine/doctrine2
  13. Contribution Process 1.  Find out where people gather. (GitHub, IRC,

    Mailing List, etc.) 2.  Find or create an issue. 3.  Ask if you can work on it. 4.  Do the work. Include tests, if possible. 5.  Submit a pull request (PR).
  14. GitHub Process 1.  Fork repository to your GitHub account. 2. 

    git  clone to your local machine. 3.  composer  install dependencies. 4.  Write code and tests. 5.  git  commit  and push to your fork. 6.  Create a PR to the original repo. 7.  Wait for someone to review and accept.